cmake: Include iconv when testing ICONV_CONST if needed.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -109,6 +109,7 @@
     set(LIBICONV "iconv")
     check_library_exists(iconv iconv "" HAVE_ICONV)
 endif(NOT HAVE_ICONV)
+set(CMAKE_REQUIRED_LIBRARIES ${LIBICONV})
 CHECK_C_SOURCE_COMPILES(" #include <iconv.h>
  int main() { return iconv(0, (char **)0, 0, (char**)0, 0); }" ICONV_NO_CONST)
 if( ICONV_NO_CONST )
@@ -116,6 +117,7 @@
 else( ICONV_NO_CONST )
   set( ICONV_CONST " ")
 endif( ICONV_NO_CONST )
+set(CMAKE_REQUIRED_LIBRARIES)

 check_library_exists(rt clock_nanosleep "" HAVE_CLOCK_NANOSLEEP)
 if (HAVE_CLOCK_NANOSLEEP)


added fix from issue #414

added fix from issue #414

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -111,11 +111,13 @@
   #     2.  USE_ITK &&  USE_SYSTEM_ITK  <- Need to set ITK_DIR, set with find_package in External_ITK.cmake
   #     3.  USE_ITK && !USE_SYSTEM_ITK  <- No need to do anything (ITK_DIR will get set during the installation of ITK)
   # STIR enables ITK by default (If it is found, so no need to set -DDISABLE_ITK=OFF for cases 2 and 3)
-  if (NOT USE_ITK)
-    set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DDISABLE_ITK:BOOL=ON)
-  elseif (USE_ITK AND USE_SYSTEM_ITK)
-    set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DITK_DIR:PATH=${ITK_DIR})
-  endif()
+  if (NOT USE_ITK)
+   set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DDISABLE_ITK:BOOL=ON)
+ else()
+   set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DDISABLE_ITK:BOOL=OFF)
+   if (USE_SYSTEM_ITK)
+      set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DITK_DIR:PATH=${ITK_DIR})
+ endif()

   ## If building with NiftyPET projector
   if (${USE_NiftyPET})


Change back to 1.58

Change back to 1.58

--- Superbuild/BoostExternal.cmake
+++ Superbuild/BoostExternal.cmake
@@ -73,7 +73,7 @@
   SET(FORCE_64BIT_BUILD ON)
 ENDIF()

-SET(boost_GIT_TAG "origin/v1.66.0")
+SET(boost_GIT_TAG "origin/v1.58.0")
 SET(boost_GIT_URL "https://github.com/CIBC-Internal/boost.git")

 # TODO: fix install step


Update ios-14-1-dep-9-3-arm64-cxx17-bitcode-hide.cmake

Fix guard

--- ios-14-1-dep-9-3-arm64-cxx17-bitcode-hide.cmake
+++ ios-14-1-dep-9-3-arm64-cxx17-bitcode-hide.cmake
@@ -1,10 +1,10 @@
 # Copyright (c) 2017, Ruslan Baratov
 # All rights reserved.

-if(DEFINED POLLY_IOS_14_1_DEP_9_3_ARMV7_ARM64_CXX17_BITCODE_CMAKE_)
+if(DEFINED POLLY_IOS_14_1_DEP_9_3_ARM64_CXX17_BITCODE_CMAKE_)
   return()
 else()
-	set(POLLY_IOS_14_1_DEP_9_3_ARMV7_ARM64_CXX17_BITCODE_CMAKE_ 1)
+	set(POLLY_IOS_14_1_DEP_9_3_ARM64_CXX17_BITCODE_CMAKE_ 1)
 endif()

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_clear_environment_variables.cmake")


Set MITK-Plugins as subproject if MITK_DEFAULT_SUBPROJECTS is not set

--- CMake/mitkFunctionCreatePlugin.cmake
+++ CMake/mitkFunctionCreatePlugin.cmake
@@ -226,8 +226,12 @@
     target_compile_options(${PLUGIN_TARGET} PRIVATE ${plugin_cxx_flags})
   endif()

-  if(MITK_DEFAULT_SUBPROJECTS AND NOT MY_SUBPROJECTS)
-    set(MY_SUBPROJECTS ${MITK_DEFAULT_SUBPROJECTS})
+  if(NOT MY_SUBPROJECTS)
+    if(MITK_DEFAULT_SUBPROJECTS)
+      set(MY_SUBPROJECTS ${MITK_DEFAULT_SUBPROJECTS})
+    else()
+      set(MY_SUBPROJECTS MITK-Plugins)
+    endif()
   endif()

   if(MY_SUBPROJECTS)


- Fix minor borkup on Android toolchain

- Fix minor borkup on Android toolchain

--- cmake/Toolchains/all-android.toolchain.cmake
+++ cmake/Toolchains/all-android.toolchain.cmake
@@ -411,19 +411,19 @@
 # STL specific flags.
 if(ANDROID_STL STREQUAL system)
         set(ANDROID_STL_PREFIX gnu-libstdc++/4.9)
-        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/system/include>")
+        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES_TMP
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/system/include>)
 elseif(ANDROID_STL MATCHES "^stlport_")
         set(ANDROID_STL_PREFIX stlport)
-        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/stlport>"
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/gabi++/include>")
+        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES_TMP
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/stlport>
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/gabi++/include>)
 elseif(ANDROID_STL MATCHES "^gnustl_")
         set(ANDROID_STL_PREFIX gnu-libstdc++/4.9)
-        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/include>"
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/libs/${ANDROID_ABI}/include>"
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/include/backward>")
+        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES_TMP
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/include>
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/libs/${ANDROID_ABI}/include>
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/include/backward>)
 elseif(ANDROID_STL MATCHES "^c\\+\\+_")
         set(ANDROID_STL_PREFIX llvm-libc++)
         if(ANDROID_ABI MATCHES "^armeabi")
@@ -439,29 +439,29 @@
                 list(APPEND ANDROID_COMPILER_FLAGS_CXX
                         -fno-strict-aliasing)
         endif()
-        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/include>"
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/android/support/include>"
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}abi/include>")
+        set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES_TMP
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/include>
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/android/support/include>
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}abi/include>)
 endif()
 set(ANDROID_CXX_STANDARD_LIBRARIES)
 foreach(library ${ANDROID_STL_STATIC_LIBRARIES})
         list(APPEND ANDROID_CXX_STANDARD_LIBRARIES
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/libs/${ANDROID_ABI}/lib${library}.a>")
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/libs/${ANDROID_ABI}/lib${library}.a>)
 endforeach()
 foreach(library ${ANDROID_STL_SHARED_LIBRARIES})
         list(APPEND ANDROID_CXX_STANDARD_LIBRARIES
-                "$<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/libs/${ANDROID_ABI}/lib${library}.so>")
+                $<BUILD_INTERFACE:${ANDROID_NDK}/sources/cxx-stl/${ANDROID_STL_PREFIX}/libs/${ANDROID_ABI}/lib${library}.so>)
 endforeach()
 if(ANDROID_ABI STREQUAL armeabi AND NOT ANDROID_STL MATCHES "^(none|system)$")
         list(APPEND ANDROID_CXX_STANDARD_LIBRARIES
                 -latomic)
 endif()
 set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lm")
-set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
+set(CMAKE_CXX_STANDARD_LIBRARIES_INIT_TMP "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
 if(ANDROID_CXX_STANDARD_LIBRARIES)
         string(REPLACE ";" "\" \"" ANDROID_CXX_STANDARD_LIBRARIES "\"${ANDROID_CXX_STANDARD_LIBRARIES}\"")
-        set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_CXX_STANDARD_LIBRARIES_INIT} ${ANDROID_CXX_STANDARD_LIBRARIES}")
+        set(CMAKE_CXX_STANDARD_LIBRARIES_INIT_TMP "${CMAKE_CXX_STANDARD_LIBRARIES_INIT_TMP} ${ANDROID_CXX_STANDARD_LIBRARIES}")
 endif()

 # Configuration specific flags.
@@ -653,8 +653,8 @@
     set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
 endif()

-include_directories ( SYSTEM "${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES}" )
-LINK_LIBRARIES( "${CMAKE_CXX_STANDARD_LIBRARIES_INIT};${CMAKE_C_STANDARD_LIBRARIES_INIT}" )
+include_directories ( SYSTEM "${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES_TMP}" )
+LINK_LIBRARIES( "${CMAKE_CXX_STANDARD_LIBRARIES_INIT_TMP};${CMAKE_C_STANDARD_LIBRARIES_INIT}" )

 set ( CMAKE_FIND_ROOT_PATH
     "${CMAKE_FIND_ROOT_PATH};${COFFEE_ROOT_DIR};${NATIVE_LIBRARY_DIR};${CMAKE_SOURCE_DIR}/libs"


fix CHECK_MPI_INTERFACE for CMake 3.10

fix CHECK_MPI_INTERFACE for CMake 3.10

--- cmake/macros/macro_check_mpi_interface.cmake
+++ cmake/macros/macro_check_mpi_interface.cmake
@@ -22,7 +22,7 @@
 #

 MACRO(CHECK_MPI_INTERFACE _feature _var)
-  IF(DEAL_II_WITH_MPI)
+  IF(DEAL_II_WITH_MPI AND MPI_LIBRARIES)

     SET(_nope FALSE)


ctest: download test data from GSI URL

ctest: download test data from GSI URL

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- tests/download.cmake
+++ tests/download.cmake
@@ -1 +1 @@
-file(DOWNLOAD "http://compeng.uni-frankfurt.de/~kretz/Vc-testdata/${filename}" "./${filename}")
+file(DOWNLOAD "http://web-docs.gsi.de/~mkretz/Vc-testdata/${filename}" "./${filename}")


Add some doc for pch macro.

Add some doc for pch macro.

--- cmake/AddPch.cmake
+++ cmake/AddPch.cmake
@@ -1,5 +1,22 @@
-# Given a variable, adds pch support to suitable files.
-# Does nothing if not MSVC
+# #############################################################################
+# Adds precompiled header (pch) support to suitable files.
+# Currently only implemented for MSVC. For platforms the macro does nothing.
+#
+# Usage :
+# add_precompiled_header(AddedPrecompiledSource PchIncludeFilename PchSourceFilename CandidateSourceFile [CandidateSourceFile1...])
+# Arguments:
+# Output :
+#   AddedPrecompiledSource  : variable name that will contain source files
+#       that need to be added to your target.
+# Input :
+#   PchIncludeFilename : name of the header file
+#   PchSourceFilename : name of the source file used to generate the pch
+#   CandidateSourceFiles : source file names to which pch support may be added.
+#
+# Note : Adding a PCH to a file has the considerable side effect
+# of implicity forcing #include <pchfile.h> at the start of the file. This may
+# have undesired consequences.
+# #############################################################################

 macro(add_msvc_precompiled_header AddedPrecompiledSource PrecompiledHeader PrecompiledSource CandidateSourceFiles)
   if(MSVC)
@@ -21,8 +38,8 @@

         if( ${nameMatchLength} GREATER 0 AND ( NOT (${fileItAbsolute} STREQUAL ${PchSourceAbsolute}) ) )

-            LIST(APPEND PchSources ${fileIt})
-            MESSAGE(" Added Precompiled header support to ${fileIt}")
+            list(APPEND PchSources ${fileIt})
+#            message(" Added Precompiled header support to ${fileIt}")
         endif( ${nameMatchLength} GREATER 0 AND ( NOT (${fileItAbsolute} STREQUAL ${PchSourceAbsolute}) ) )
     endforeach(fileIt)

@@ -44,8 +61,10 @@

 endmacro(add_msvc_precompiled_header)

-# General version.
+
+
 macro(add_precompiled_header AddedPrecompiledSource PrecompiledHeader PrecompiledSource CandidateSourceFiles)
+
 if(MSVC)
   add_msvc_precompiled_header(${AddedPrecompiledSource} ${PrecompiledHeader} ${PrecompiledSource} ${CandidateSourceFiles} ${ARGN})
 endif(MSVC)


use CMAKE_INSTALL_LIBDIR to catch lib64 on certain platforms for lib/ installation location #871

--- cmake/macros.cmake
+++ cmake/macros.cmake
@@ -220,7 +220,7 @@
 macro(SET_INSTALL_DIRS)
   string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
   if (NOT DEFINED PDAL_LIB_INSTALL_DIR)
-    set(PDAL_LIB_INSTALL_DIR "lib")
+    set(PDAL_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
   endif ()
     set(PDAL_INCLUDE_INSTALL_ROOT "include/")
     set(PDAL_INCLUDE_INSTALL_DIR


Options to cmake in re-cmake step go through file

Avoids problem with command-line construction in cmake.

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -166,19 +166,23 @@
     # there is no need for a recursive cmake step.
     if(NOT DEFINED ${found_var} OR NOT ${${found_var}})
         _get_sane_name(${recurse_name} SANENAME)
-        set(cmake_arguments -DCMAKE_PROGRAM_PATH:PATH=${EXTERNAL_ROOT}/bin
-                            -DCMAKE_LIBRARY_PATH:PATH=${EXTERNAL_ROOT}/lib
-                            -DCMAKE_INCLUDE_PATH:PATH=${EXTERNAL_ROOT}/include
-                            -DCMAKE_PREFIX_PATH:PATH=${EXTERNAL_ROOT}
-                            -D${SANENAME}_RECURSIVE:BOOL=TRUE
-                            --no-warn-unused-cli)
+        set(cmakefile "${PROJECT_BINARY_DIR}/CMakeFiles/external")
+        set(cmakefile "${cmakefile}/${name}_recursive.cmake")
+        file(WRITE "${cmakefile}"
+            "set(CMAKE_PROGRAM_PATH \"${EXTERNAL_ROOT}/bin\" CACHE PATH \"\")\n"
+            "set(CMAKE_LIBRARY_PATH \"${EXTERNAL_ROOT}/lib\" CACHE PATH \"\")\n"
+            "set(CMAKE_INCLUDE_PATH \"${EXTERNAL_ROOT}/include\" CACHE PATH \"\")\n"
+            "set(CMAKE_PREFIX_PATH \"${EXTERNAL_ROOT}\" CACHE PATH \"\")\n"
+            "set(${SANENAME}_RECURSIVE TRUE CACHE INTERNAL \"\")\n"
+        )
         if(NOT recursive_NOCHECK)
-            set(cmake_arguments ${cmake_arguments}
-                -D${SANENAME}_REQUIREDONRECURSE:INTERNAL=TRUE)
+            file(APPEND "${cmakefile}"
+                "set(${SANENAME}_REQUIREDONRECURSE TRUE CACHE INTERNAL \"\")\n"
+            )
         endif()
         ExternalProject_Add_Step(
             ${name} reCMake
-            COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} ${cmake_arguments}
+            COMMAND ${CMAKE_COMMAND} -C "${cmakefile}" --no-varn-unused-cli "${CMAKE_SOURCE_DIR}"
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
             ${recursive_UNPARSED_ARGUMENTS}
         )


fixed: out of order lib collection errors

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

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -737,7 +737,9 @@
     FOREACH(OSGDEP ${${PROJECT_NAME}_DEP_OSG_LIB})
         OSG_CHECKED_INCLUDE  ("${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")

-        GET_PROPERTY(_OSGDEP_IMPORTED TARGET ${OSGDEP} PROPERTY IMPORTED)
+        IF(${OSGDEP})
+          GET_PROPERTY(_OSGDEP_IMPORTED TARGET ${OSGDEP} PROPERTY IMPORTED)
+        ENDIF(${OSGDEP})

         IF(NOT _OSGDEP_IMPORTED)
           ADD_DEPENDENCIES     (${PROJECT_NAME} ${OSGDEP})


Try at least a little to pre-set MSVC redistributable

--- CMake/mitkSetupCPack.cmake
+++ CMake/mitkSetupCPack.cmake
@@ -30,7 +30,35 @@
   set(CPACK_VISUAL_STUDIO_VERSION_MAJOR "${VISUAL_STUDIO_VERSION_MAJOR}")
   set(CPACK_VISUAL_STUDIO_PRODUCT_NAME "${VISUAL_STUDIO_PRODUCT_NAME}")
   set(CPACK_LIBRARY_ARCHITECTURE "${CMAKE_LIBRARY_ARCHITECTURE}")
-  set(CMAKE_${CPACK_VISUAL_STUDIO_PRODUCT_NAME}_REDISTRIBUTABLE "" CACHE FILEPATH "Path to the appropriate Microsoft Visual Studio Redistributable")
+
+  # Visual Studio 2017 already comes with redistributable installers.
+  # Try to find the right one.
+
+  set(vswhere "$ENV{PROGRAMFILES\(X86\)}\\Microsoft Visual Studio\\Installer\\vswhere.exe")
+
+  if(EXISTS ${vswhere})
+    execute_process(COMMAND ${vswhere} -latest -property installationPath
+      OUTPUT_VARIABLE installationPath
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    file(TO_CMAKE_PATH ${installationPath} installationPath)
+    set(redistPath "${installationPath}/VC/Redist/MSVC")
+    file(GLOB redistPath "${installationPath}/VC/Redist/MSVC/*")
+    list(LENGTH redistPath length)
+    if(length EQUAL 1)
+      if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+        set(redistPath "${redistPath}/vc_redist.x64.exe")
+      else()
+        set(redistPath "${redistPath}/vc_redist.x86.exe")
+      endif()
+      if(EXISTS ${redistPath})
+        set(CMAKE_${CPACK_VISUAL_STUDIO_PRODUCT_NAME}_REDISTRIBUTABLE ${redistPath} CACHE FILEPATH "Path to the appropriate Microsoft Visual Studio Redistributable")
+      endif()
+    endif()
+  endif()
+
+  if(NOT DEFINED CMAKE_${CPACK_VISUAL_STUDIO_PRODUCT_NAME}_REDISTRIBUTABLE)
+    set(CMAKE_${CPACK_VISUAL_STUDIO_PRODUCT_NAME}_REDISTRIBUTABLE "" CACHE FILEPATH "Path to the appropriate Microsoft Visual Studio Redistributable")
+  endif()
 endif()

 if(EXISTS ${CMAKE_${CPACK_VISUAL_STUDIO_PRODUCT_NAME}_REDISTRIBUTABLE} )


Specify missing dependencies on swift_static .swiftmodule files (#41320)

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -956,6 +956,13 @@
         OUTPUT ${module_outputs_static}
         DEPENDS
           "${module_dependency_target}"
+          "${line_directive_tool}"
+          "${file_path}"
+          ${swift_compiler_tool_dep}
+          ${source_files} ${SWIFTFILE_DEPENDS}
+          ${swift_ide_test_dependency}
+          ${create_dirs_dependency_target}
+          ${copy_legacy_layouts_dep}
         COMMENT "Generating ${module_file}")
       set("${dependency_module_target_out_var_name}" "${module_dependency_target_static}" PARENT_SCOPE)
     else()


Add some documentation to the cmake find module

--- cmake/FindVisionaray.cmake
+++ cmake/FindVisionaray.cmake
@@ -1,3 +1,20 @@
+#.rst:
+# FindVisionaray
+# --------------
+#
+# Find the Visionaray ray tracing library
+#
+# Result Variables
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines the following variables:
+#
+# ::
+#
+# VISIONARAY_INCLUDE_DIR - include directories of Visionaray
+# VISIONARAY_LIBRARIES - libraries to link against Visionaray
+# VISIONARAY_FOUND - true if Visionaray has been found and can be used
+
 include(FindPackageHandleStandardArgs)

 set(paths


Fix typo : SVR5=>SVR4

Fix typo : SVR5=>SVR4

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -86,7 +86,7 @@
     SET(CMAKE_INSTALL_PREFIX ${default_prefix}
       CACHE PATH "install prefix" FORCE)
   ENDIF()
-  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR5")
+  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
   LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
   IF(ind EQUAL -1)
     MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."


Fix from wlad.

Fix from wlad.

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -195,9 +195,40 @@
    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug"  debug_target_location "${target_location}" )
   ENDIF()

+  # Define permissions
+  # For executable files
+  SET(PERMISSIONS_EXECUTABLE
+      PERMISSIONS
+      OWNER_READ OWNER_WRITE OWNER_EXECUTE
+      GROUP_READ GROUP_EXECUTE
+      WORLD_READ WORLD_EXECUTE)
+
+  # Permissions for shared library (honors CMAKE_INSTALL_NO_EXE which is
+  # typically set on Debian)
+  IF(CMAKE_INSTALL_SO_NO_EXE)
+    SET(PERMISSIONS_SHARED_LIBRARY
+      PERMISSIONS
+      OWNER_READ OWNER_WRITE
+      GROUP_READ
+      WORLD_READ)
+  ELSE()
+    SET(PERMISSIONS_SHARED_LIBRARY ${PERMISSIONS_EXECUTABLE})
+  ENDIF()
+
+  # Shared modules get the same permissions as shared libraries
+  SET(PERMISSIONS_MODULE_LIBRARY ${PERMISSIONS_SHARED_LIBRARY})
+
+  #  Define permissions for static library
+  SET(PERMISSIONS_STATIC_LIBRARY
+      PERMISSIONS
+      OWNER_READ OWNER_WRITE
+      GROUP_READ
+      WORLD_READ)
+
   INSTALL(${INSTALL_TYPE} ${debug_target_location}
     DESTINATION ${ARG_DESTINATION}
     ${RENAME_PARAM}
+    ${PERMISSIONS_${target_type}}
     CONFIGURATIONS Release RelWithDebInfo
     OPTIONAL)


Change octave version regex to handle more general version numbers.

svn path=/trunk/; revision=7142

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -63,7 +63,7 @@
   OUTPUT_VARIABLE _OCTAVE_VERSION
   )
   string(REGEX REPLACE
-  "^.*version ([0-9]\\.[0-9]\\.[0-9][0-9]).*$"
+  "^.*version ([0-9]\\.[0-9]\\.[0-9]*).*$"
   "\\1"
   OCTAVE_VERSION
   ${_OCTAVE_VERSION}


update petsc interface

update petsc interface

--- cmake_find/FindPETSc.cmake
+++ cmake_find/FindPETSc.cmake
@@ -130,9 +130,7 @@
   message (SEND_ERROR "The pair PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} do not specify a valid PETSc installation")
 endif ()

-if (petsc_conf_rules AND petsc_conf_variables )
-#RESTORE
-#AND NOT petsc_config_current)
+if (petsc_conf_rules AND petsc_conf_variables AND NOT petsc_config_current)
   petsc_get_version()

   # Put variables into environment since they are needed to get


added mitkSplineMapper2D

added mitkSplineMapper2D

--- Core/Rendering/files.cmake
+++ Core/Rendering/files.cmake
@@ -26,6 +26,7 @@
   mitkPointSetVtkMapper3D.cpp
   mitkPolyDataGLMapper2D.cpp
   mitkRenderWindow.cpp
+  mitkSplineMapper2D.cpp
   mitkSplineVtkMapper3D.cpp
   mitkSurfaceMapper2D.cpp
   mitkSurfaceVtkMapper3D.cpp


fasm_extra_features: Rename instead of copy

Signed-off-by: Tomasz Michalak <a2fdaa543b4cc5e3d6cd8672ec412c0eb393b86e@antmicro.com>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -1339,6 +1339,7 @@
     # -------------------------------------------------------------------------
     set(OUT_FASM ${OUT_LOCAL}/${TOP}.fasm)
     set(OUT_FASM_CONCATENATED ${OUT_LOCAL}/${TOP}.concat.fasm)
+    set(OUT_FASM_GENFASM ${OUT_LOCAL}/${TOP}.genfasm.fasm)
     add_custom_command(
       OUTPUT ${OUT_FASM}
       DEPENDS ${OUT_ROUTE} ${OUT_PLACE} ${VPR_DEPS} ${GENFASM_TARGET}
@@ -1346,9 +1347,11 @@
       COMMAND
         ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/vpr_stdout.log
           ${OUT_LOCAL}/genhlc.log
+      COMMAND
+        ${CMAKE_COMMAND} -E copy ${OUT_FASM} ${OUT_FASM_GENFASM}
       COMMAND cat ${OUT_FASM} ${OUT_FASM_EXTRA} > ${OUT_FASM_CONCATENATED}
       COMMAND
-        ${CMAKE_COMMAND} -E copy ${OUT_FASM_CONCATENATED} ${OUT_FASM}
+        ${CMAKE_COMMAND} -E rename ${OUT_FASM_CONCATENATED} ${OUT_FASM}
       WORKING_DIRECTORY ${OUT_LOCAL}
     )
     add_custom_target(${NAME}_fasm DEPENDS ${OUT_FASM})


changed default MSI install path to Embree3

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -166,7 +166,7 @@
   IF (NOT EMBREE_ZIP_MODE)
     SET(CPACK_GENERATOR WIX)
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}")
-    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree v${EMBREE_VERSION} ${ARCH}")
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree${EMBREE_VERSION_MAJOR} ${ARCH}")
     SET(CPACK_WIX_PRODUCT_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_NUMBER}")
     SET(CPACK_WIX_UPGRADE_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_MAJOR}0000") # upgrade as long as major version is the same
     SET(CPACK_WIX_CMAKE_PACKAGE_REGISTRY TRUE)


modules: properly handle platforms with empty CMAKE_FIND_LIBRARY_PREFIXES.

For example Windows with MSVC. The variable is set to empty list, which
we need to preserve when setting it back. Otherwise CMake complains
loudly.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -422,7 +422,7 @@
                 MAGNUM_${_COMPONENT}_LIBRARY_RELEASE)

             # Reset back
-            set(CMAKE_FIND_LIBRARY_PREFIXES ${_tmp_prefixes})
+            set(CMAKE_FIND_LIBRARY_PREFIXES "${_tmp_prefixes}")
         endif()

         # Library location for libraries/plugins


Make Bii generate dynamic library

Make Bii generate dynamic library

--- biicode.cmake
+++ biicode.cmake
@@ -4,4 +4,6 @@
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 ENDIF(APPLE)

+SET(BII_LIB_TYPE SHARED)
+
 ADD_BII_TARGETS()


enforce membership to rosidl_interface_packages (#252)

--- rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
@@ -114,6 +114,16 @@
   )

   if(NOT _ARG_SKIP_INSTALL)
+    set(_interface_packages_group_name "rosidl_interface_packages")
+    if(NOT _AMENT_PACKAGE_NAME)
+      ament_package_xml()
+    endif()
+    if(NOT _interface_packages_group_name IN_LIST ${_AMENT_PACKAGE_NAME}_MEMBER_OF_GROUPS)
+      message(FATAL_ERROR
+        "Packages installing interfaces must include \
+        '<member_of_group>${_interface_packages_group_name}</member_of_group>' in their package.xml"
+      )
+    endif()
     # register interfaces with the ament index
     set(_idl_files_lines)
     foreach(_idl_file ${_ARG_UNPARSED_ARGUMENTS})


fmu-v2 fixedwing: add CONSTRAINED_FLASH to the config

--- boards/px4/fmu-v2/fixedwing.cmake
+++ boards/px4/fmu-v2/fixedwing.cmake
@@ -11,6 +11,7 @@
 	#TESTING
 	CONSTRAINED_FLASH
 	#UAVCAN_INTERFACES 2
+	CONSTRAINED_FLASH

 	SERIAL_PORTS
 		GPS1:/dev/ttyS3


Small oversight: Make CMake recognise that Poco was found

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

 # POCO
 find_package(POCO)
-macro_log_feature(Poco_FOUND "POCO" "POCO framework" "http://pocoproject.org/" FALSE "" "")
+macro_log_feature(POCO_FOUND "POCO" "POCO framework" "http://pocoproject.org/" FALSE "" "")


fix the missing game id

fix the missing game id

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -63,6 +63,7 @@
 zillians_register_game(GAME_NAME "Emu"                                        GAME_ID 0)
 zillians_register_game(GAME_NAME "SimpleTextClientTest-SingleCommand"         GAME_ID 0)
 zillians_register_game(GAME_NAME "SimpleTest"                                 GAME_ID 0)
+zillians_register_game(GAME_NAME "PaperScissorsRock"                          GAME_ID 0)

 zillians_register_game(GAME_NAME "ScheduleAPITest"                            GAME_ID 0)


STYLE: ExternalData: Replace MATCHES with STREQUAL where possible

Change-Id: I884a02a45d31acca62537d9a5f149febf8fd9e29

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -409,7 +409,7 @@
       # Regular expression to match associated files.
       string(REGEX REPLACE "^REGEX:" "" regex "${opt}")
       list(APPEND associated_regex "${regex}")
-    elseif("x${opt}" MATCHES "^x:$")
+    elseif(opt STREQUAL ":")
       # Activate series matching.
       set(series_option "${opt}")
     elseif("x${opt}" MATCHES "^[^][:/*?]+$")


Added an extra dependency ordering step to iron out some fringe cases.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -128,25 +128,25 @@
 #  endmacro(add_project)
 #else ()

-  macro(add_project project_name)
-    if (NOT MSVC)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-    endif ()
-
-    project(${project_name})
-    if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${project_name}-config.cmake")
-#      message("* ${CMAKE_CURRENT_LIST_DIR}/${project_name}-config.cmake")
-      set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR})
-      set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)
-      include(${project_name}-config.cmake)
-    else ()
-#      message(${CMAKE_CURRENT_LIST_DIR}/source)
-      set(${project_name}_project_includes "${CMAKE_CURRENT_LIST_DIR}/source")
-      set(${project_name}_project_includes "${CMAKE_CURRENT_LIST_DIR}/source" PARENT_SCOPE)
-      include_directories(${CMAKE_CURRENT_LIST_DIR}/source)
-    endif ()
-
-  endmacro(add_project)
+macro(add_project project_name)
+  if (NOT MSVC)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+  endif ()
+
+  project(${project_name})
+  if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${project_name}-config.cmake")
+    #      message("* ${CMAKE_CURRENT_LIST_DIR}/${project_name}-config.cmake")
+    set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR})
+    set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)
+    include(${project_name}-config.cmake)
+  else ()
+    #      message(${CMAKE_CURRENT_LIST_DIR}/source)
+    set(${project_name}_project_includes "${CMAKE_CURRENT_LIST_DIR}/source")
+    set(${project_name}_project_includes "${CMAKE_CURRENT_LIST_DIR}/source" PARENT_SCOPE)
+    include_directories(${CMAKE_CURRENT_LIST_DIR}/source)
+  endif ()
+
+endmacro(add_project)

 #endif ()

@@ -203,7 +203,7 @@
     else ()
       add_custom_command(TARGET ${CURRENT_TARGET}
         COMMAND ${CMAKE_COMMAND} -E copy_directory
-        ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} $<TARGET_FILE_DIR:${CURRENT_TARGET}>/${resources_dir}
+        ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${resources_dir}
         COMMENT "Copying ${CURRENT_TARGET} files"
         )
     endif ()
@@ -226,20 +226,21 @@
   target_sources(${CURRENT_TARGET} PUBLIC ${ARGN})
 endmacro()

-function(set_lib_prefix varname)
-  set(path "${ARGV1}")
-
-  #    message(WARNING "${${varname}} ${path}")
-  if (path AND EXISTS ${path}/${${varname}})
-
-  else ()
-    string(SUBSTRING "${${varname}}" 0 3 libprefix)
-    #  message(WARNING "substring ${libprefix} ${libname}")
-    if (NOT libprefix STREQUAL "lib")
-      set(${varname} "lib${${varname}}" PARENT_SCOPE)
-    endif ()
-  endif ()
-endfunction()
+macro(move_dependency_item output_variable parent_name)
+  #      message("check ${library_index}, ${parent_index}")
+  list(FIND ${output_variable} ${parent_name} parent_index)
+#  if (${parent_name} STREQUAL "bloom_scenery" AND ${library_name} STREQUAL "scenery")
+#    message("${parent_name} ${library_name} | ${parent_index} GREATER ${library_index}")
+#  endif ()
+  if (${parent_index} GREATER ${library_index})
+#    message(" < ${library_name} ${parent_name}")
+#    message("befor ${${output_variable}}")
+#    message("move ${parent_index} ${library_index}")
+    list(REMOVE_AT ${output_variable} ${parent_index})
+    list(INSERT ${output_variable} ${library_index} ${parent_name})
+#    message("after ${${output_variable}}")
+  endif ()
+endmacro()

 macro(append_dependency_hierarchy libraries output_variable parent_name)
   set(parent ${parent_name})
@@ -248,25 +249,39 @@
     #    message("'${${output_variable}}' ${library_name} ${library_index}")
     if (${library_index} EQUAL "-1")
       list(APPEND ${output_variable} ${library_name})
-      #message("${CURRENT_TARGET} ${library_name} ${${library_name}_dependencies}")
+#      if (IS_EXECUTABLE) # AND "${CURRENT_TARGET}" STREQUAL ""
+#        message(" + ${library_name} ${parent_name}")
+#      endif ()
       append_dependency_hierarchy("${${library_name}_dependencies}" ${output_variable} ${library_name})
     elseif (IS_EXECUTABLE AND MINGW AND NOT "${parent_name}" STREQUAL "")
-      #      message("check ${library_index}, ${parent_index}")
-      list(FIND ${output_variable} ${parent_name} parent_index)
-      if (${parent_index} GREATER ${library_index})
-        #message("move ${library_index}, ${parent_index}")
-        #        message("before ${${output_variable}}")
-        list(REMOVE_AT ${output_variable} ${parent_index})
-        list(INSERT ${output_variable} ${library_index} ${parent_name})
-        #        message("after ${${output_variable}}")
-      endif ()
-    endif ()
+      move_dependency_item(${output_variable} ${parent_name})
+    endif ()
+  endforeach ()
+
+endmacro()
+
+macro(clean_up_dependency_order output_variable)
+  foreach (parent_name ${${output_variable}})
+    foreach (library_name ${${parent_name}_dependencies})
+      list(FIND ${output_variable} ${library_name} library_index)
+#      message(" * ${parent_name} ${library_name}")
+      move_dependency_item(${output_variable} ${parent_name})
+    endforeach ()
   endforeach ()
 endmacro()

 macro(get_dependency_hierarchy libraries output_variable)
   set(${output_variable} "")
   append_dependency_hierarchy("${libraries}" ${output_variable} "")
+
+  if (IS_EXECUTABLE AND MINGW)
+#    message("-")
+#    message("-")
+#    message("-")
+#    message("-")
+    clean_up_dependency_order(${output_variable})
+  endif ()
+
 endmacro()

 macro(include_project library_name)
@@ -281,11 +296,12 @@

   if (LOCAL_TARGET)
     get_dependency_hierarchy("${ARGN}" all_dependencies)
-        #message("  ${CURRENT_TARGET}: ${all_dependencies}")
+    #message("  ${CURRENT_TARGET}: ${all_dependencies}")

     if (IS_EXECUTABLE)
       #      set(reverse_list ${all_dependencies})
       #      list(REVERSE reverse_list)
+#      message("  ${CURRENT_TARGET}: ${all_dependencies}")

       foreach (library_name ${all_dependencies})
         if (TARGET ${library_name})


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/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   27)
+SET(KWSYS_DATE_STAMP_DAY   28)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/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   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


ENH: updating MCI: adjusting to split between threads and work units in ITKv5

Change-Id: I15985b5defa0ae19e7c69436a7eaf898f52f1afe

--- Modules/Remote/MorphologicalContourInterpolation.remote.cmake
+++ Modules/Remote/MorphologicalContourInterpolation.remote.cmake
@@ -14,5 +14,5 @@
 This work is supported by NIH grant R01 EB014346
 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'."
   GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git
-  GIT_TAG 951661892808cf659310e0cc4e90faa1862ff6fd
+  GIT_TAG e132944a3fad51465919464b57ed54e8194fe5ae
   )


Add TBB offload flag instructions to plugin generation if appropriate.


libmfxhw64: add -ldl to linker flags

libmfxhw64: add -ldl to linker flags

Add "-Wl,--no-as-needed -ldl" to linker flags.

On Ubuntu Trusty 14.04 LTS with GCC 4.8.4, fix linker
error in vm_shared_object_linux32.c.o for libmfxhw64.so:

  undefined reference to `dlopen'
  undefined reference to `dlsym'
  undefined reference to `dlclose'

Fixes #34

Signed-off-by: U. Artie Eoff <32aece0d55055227b44d04b7d0051cf3d04ee871@intel.com>

--- builder/FindPackages.cmake
+++ builder/FindPackages.cmake
@@ -82,7 +82,7 @@
   if( NOT Linux )
     return() # should not occur; just in case
   endif()
-  set( link_flags_list "-Wl,--no-undefined,-z,relro,-z,now,-z,noexecstack")
+  set( link_flags_list "-Wl,--no-undefined,-z,relro,-z,now,-z,noexecstack -Wl,--no-as-needed -ldl")
   append_property( ${ARGV0} LINK_FLAGS "${link_flags_list} ${MFX_LDFLAGS} -fstack-protector" )
 #  message( STATUS "Libva located at: ${PKG_LIBVA_LIBRARY_DIRS}" )


Bump to paraview 4.3 release

Bump to paraview 4.3 release

--- Superbuild/versions.cmake
+++ Superbuild/versions.cmake
@@ -29,7 +29,7 @@
 set(PARAVIEW_VERSION 4.3)
 add_revision(paraview
   GIT_REPOSITORY git://github.com/Kitware/ParaView.git
-  GIT_TAG v4.3.0-RC1)
+  GIT_TAG v4.3.1)

 add_revision(veloview
     SOURCE_DIR ${CMAKE_SOURCE_DIR}/..


Fix build on Visual Studio 2017 15.8 (#694)

--- CMake/CompilerFlags.cmake
+++ CMake/CompilerFlags.cmake
@@ -46,6 +46,7 @@
         /DWIN32_LEAN_AND_MEAN
         /D_CRT_SECURE_NO_WARNINGS
         /D_SCL_SECURE_NO_WARNINGS
+        /D_ENABLE_EXTENDED_ALIGNED_STORAGE #https://developercommunity.visualstudio.com/comments/279328/view.html
     )
     add_compile_options(
         /MP # Enable multi-processor compilation


add separation compilation to GPU

add separation compilation to GPU

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -10,8 +10,6 @@
 set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11")

 include_directories(src/GPU)
-#set(CUDA_VERBOSE_BUILD ON)
-set(CUDA_SEPARABLE_COMPILATION ON)

 set(GPU_NPT_flags "-DENSEMBLE=4 -DGOMC_CUDA")
 set(GPU_NPT_name "GOMC_GPU_NPT")
@@ -27,6 +25,7 @@
     add_executable(GPU_NVT ${cudaSources} ${cudaHeaders}
     ${sources} ${headers} ${libHeaders} ${libSources})
     set_target_properties(GPU_NVT PROPERTIES
+        CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_NVT_name}
         COMPILE_FLAGS "${GPU_NVT_flags}")
 ######## For CUDA Debugging in Eclipse/cuda-gdb
@@ -49,6 +48,7 @@
     add_executable(GPU_GEMC ${cudaSources} ${cudaHeaders} ${sources}
     ${headers} ${libHeaders} ${libSources})
     set_target_properties(GPU_GEMC PROPERTIES
+        CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_GE_name}
         COMPILE_FLAGS "${GPU_GE_flags}")
 ######## For CUDA Debugging in Eclipse/cuda-gdb
@@ -70,6 +70,7 @@
     add_executable(GPU_GCMC ${cudaSources} ${cudaHeaders} ${sources}
     ${headers} ${libHeaders} ${libSources})
     set_target_properties(GPU_GCMC PROPERTIES
+        CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_GC_name}
         COMPILE_FLAGS "${GPU_GC_flags}")
 ######## For CUDA Debugging in Eclipse/cuda-gdb
@@ -91,6 +92,7 @@
     add_executable(GPU_NPT ${cudaSources} ${cudaHeaders} ${sources}
     ${headers} ${libHeaders} ${libSources})
     set_target_properties(GPU_NPT PROPERTIES
+        CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_NPT_name}
         COMPILE_FLAGS "${GPU_NPT_flags}")
 ######## For CUDA Debugging in Eclipse/cuda-gdb


Installer: dependency of BALLView on COMPONENT_LIBVIEW suffices.

--- cmake/BALLComponents.cmake
+++ cmake/BALLComponents.cmake
@@ -174,6 +174,6 @@
 	"BALLView"
 	"BALLView is a feature-rich molecular viewing and modelling application based on BALL."
 )
-SET_COMPONENT_DEPENDENCIES(${COMPONENT_BALLVIEW} "${COMPONENT_LIBBALL} ${COMPONENT_LIBVIEW}")
+SET_COMPONENT_DEPENDENCIES(${COMPONENT_BALLVIEW} "${COMPONENT_LIBVIEW}")

 SET(CPACK_COMPONENTS_ALL ${BALL_COMPONENTS})


cmake: add option to override default library type for complex submodules

--- cmake/ComplexLibrary.cmake
+++ cmake/ComplexLibrary.cmake
@@ -73,11 +73,18 @@
 		"MODULE;TYPE;MONOLITHIC"
 		"SOURCES"
 		${ARGN})
-
+
+	string(TOUPPER "${${PREFIX}_MODULE}_TYPE" ${PREFIX}_TYPE_OPTION)
+	string(REGEX REPLACE "-" "_" ${PREFIX}_TYPE_OPTION ${${PREFIX}_TYPE_OPTION})
+
 	if(${${PREFIX}_MONOLITHIC})
 		add_library(${${PREFIX}_MODULE} ${${PREFIX}_TYPE} ${${PREFIX}_SOURCES})
 	else()
-		add_library(${${PREFIX}_MODULE} ${${PREFIX}_SOURCES})
+		if (NOT DEFINED ${${PREFIX}_TYPE_OPTION})
+			add_library(${${PREFIX}_MODULE} ${${PREFIX}_SOURCES})
+		else()
+			add_library(${${PREFIX}_MODULE} ${${${PREFIX}_TYPE_OPTION}} ${${PREFIX}_SOURCES})
+		endif()
 	endif()
 	if (${PREFIX}_EXPORT)
 		export_complex_library(LIBNAME ${${PREFIX}_MODULE})


Removed unnecessary flags

Removed unnecessary flags

--- cmake/External_build.cmake
+++ cmake/External_build.cmake
@@ -7,7 +7,7 @@

   # Build external project
   execute_process(
-    COMMAND ${CMAKE_COMMAND} --build . --verbose --parallel --config ${CONFIG}
+    COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     COMMAND_ECHO STDOUT
     RESULT_VARIABLE BUILD_RESULT)


Squashed '3rdparty/github/cmake-utils/' changes from d346a5f6..1dc43034

1dc43034 Add support of _GNU_SOURCE

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 1dc430346be6220dbdf84855e85f52860cf128d3

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -103,12 +103,31 @@
         IF (MYPACKAGE_DEBUG)
           MESSAGE (STATUS "[${PROJECT_NAME}-START-STATUS] Adding compile definition ${_definition}")
         ENDIF ()
-	    ADD_DEFINITIONS("-D${_definition}")
+	ADD_DEFINITIONS("-D${_definition}")
       ENDIF ()
     ENDFOREACH ()
   ELSE ()
     IF (MYPACKAGE_DEBUG)
       MESSAGE (STATUS "[${PROJECT_NAME}-START-STATUS] CMAKE_C_COMPILER_ID does not match MSVC: ${CMAKE_C_COMPILER_ID}")
+    ENDIF ()
+  ENDIF ()
+  #
+  # Check if it safe to define _GNU_SOURCE unless it is already defined
+  #
+  GET_DIRECTORY_PROPERTY (_DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
+  LIST (FIND _DirDefs _GNU_SOURCE _index)
+  IF (${_index} GREATER -1)
+    IF (MYPACKAGE_DEBUG)
+      MESSAGE (STATUS "[${PROJECT_NAME}-START-STATUS] Compile definition _GNU_SOURCE already set")
+    ENDIF ()
+  ELSE ()
+    INCLUDE(CheckSymbolExists)
+    CHECK_SYMBOL_EXISTS(__GNU_LIBRARY__ "features.h" _GNU_SOURCE)
+    IF (_GNU_SOURCE)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-START-STATUS] Adding compile definition D_GNU_SOURCE")
+      ENDIF ()
+      ADD_DEFINITIONS("-D_GNU_SOURCE")
     ENDIF ()
   ENDIF ()
   #


also putting latest TBB to tar.gz file under Linux

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -102,11 +102,10 @@
 IF (WIN32)
   INSTALL(PROGRAMS ${TBB_BINDIR}/tbb.dll ${TBB_BINDIR}/tbbmalloc.dll DESTINATION bin COMPONENT examples)
   INSTALL(PROGRAMS ${TBB_BINDIR}/tbb.dll ${TBB_BINDIR}/tbbmalloc.dll DESTINATION lib COMPONENT lib)
-ELSEIF (APPLE)
-  # install TBB with libc++ linkage for MacOSX
-  IF (NOT ENABLE_INSTALLER)
-#    INSTALL(PROGRAMS ${TBB_ROOT}/lib/libc++/libtbb.dylib ${TBB_ROOT}/lib/libc++/libtbbmalloc.dylib DESTINATION bin COMPONENT examples)
+ELSEIF (NOT ENABLE_INSTALLER)
+  IF (APPLE)
     INSTALL(PROGRAMS ${TBB_ROOT}/lib/libc++/libtbb.dylib ${TBB_ROOT}/lib/libc++/libtbbmalloc.dylib DESTINATION lib COMPONENT lib)
+  ELSE()
+    INSTALL(PROGRAMS ${TBB_ROOT}/lib/intel64/gcc4.4/libtbb.dylib ${TBB_ROOT}/lib/intel64/gcc4.4/libtbbmalloc.dylib DESTINATION lib COMPONENT lib)
   ENDIF()
-
 ENDIF()


Hint Eigen3 location

Hint Eigen3 location

--- common/cmake/MyEigen.cmake
+++ common/cmake/MyEigen.cmake
@@ -1,2 +1,4 @@
-find_package (Eigen3 3.3 REQUIRED NO_MODULE PATHS ${PROJECT_ROOT_DIR}/external/eigen)
+set (Eigen3_ROOT ${PROJECT_ROOT}/external/eigen/)

+find_package (Eigen3 3.3 REQUIRED NO_MODULE)
+


CMake: add REQUIRED_TOOLS to add_msr_test function

--- cmake/Modules/LibAddTest.cmake
+++ cmake/Modules/LibAddTest.cmake
@@ -89,6 +89,9 @@
 # REQUIRED_PLUGINS:
 # 	This optional variable specifies a list of plugins required to run the test.
 #
+# REQUIRED_TOOLS:
+# 	This optional variable specifies a list of tools required to run the test.
+#
 # ENVIRONMENT:
 # 	This optional argument specifies environment variables defined while CTest executes the MSR test.
 # ~~~
@@ -105,6 +108,17 @@
 			return ()
 		endif (plugin_index GREATER -1)
 	endforeach (plugin ${ARG_REQUIRED_PLUGINS})
+
+	set (multiValueArgs REQUIRED_TOOLS ENVIRONMENT)
+	cmake_parse_arguments (ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+	foreach (tool ${ARG_REQUIRED_TOOLS})
+		list (FIND REMOVED_TOOLS
+				${tool}
+				tool_index)
+		if (tool_index GREATER -1)
+			return ()
+		endif ()
+	endforeach ()

 	add_test (NAME testshell_markdown_${NAME}
 		  COMMAND "${CMAKE_BINARY_DIR}/tests/shell/shell_recorder/tutorial_wrapper/markdown_shell_recorder.sh" "${FILE}"
@@ -130,6 +144,9 @@
 # REQUIRED_PLUGINS:
 # 	This optional variable specifies a list of plugins required to run the MSR test.
 #
+# REQUIRED_TOOLS:
+# 	This optional variable specifies a list of tools required to run the test.
+#
 # ENVIRONMENT:
 # 	This optional argument specifies environment variables defined while CTest executes the MSR test.
 # ~~~
@@ -138,5 +155,11 @@
 	cmake_parse_arguments (ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 	list (APPEND ARG_REQUIRED_PLUGINS
 		     ${PLUGIN})
-	add_msr_test (${PLUGIN} "${CMAKE_SOURCE_DIR}/src/plugins/${PLUGIN}/README.md" ${ARGN} REQUIRED_PLUGINS ${ARG_REQUIRED_PLUGINS})
+
+	set (multiValueArgs REQUIRED_TOOLS)
+	cmake_parse_arguments (ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+	list (APPEND ARG_REQUIRED_TOOLS
+		     ${TOOL})
+
+	add_msr_test (${PLUGIN} "${CMAKE_SOURCE_DIR}/src/plugins/${PLUGIN}/README.md" ${ARGN} REQUIRED_PLUGINS ${ARG_REQUIRED_PLUGINS} REQUIRED_TOOLS ${ARG_REQUIRED_TOOLS})
 endfunction ()


Added lib64 path suffix to find opencl library [tested for default cuda8.0+opencl installation on Ubuntu 14.04]

--- cmake_modules/FindOpenCL.cmake
+++ cmake_modules/FindOpenCL.cmake
@@ -143,6 +143,7 @@
       /usr
       /usr/local
     PATH_SUFFIXES
+      lib64
       lib/x86_64
       lib/x64
       lib)


start 3.2.1

start 3.2.1

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

 set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set (Mathematica_CMAKE_MODULE_VERSION "3.2.0")
+set (Mathematica_CMAKE_MODULE_VERSION "3.2.1")

 # activate select policies
 if (POLICY CMP0025)


* [Build] BugFix: Correct CMake errors on Windows.

--- Tools/CMake/basics.cmake
+++ Tools/CMake/basics.cmake
@@ -400,17 +400,17 @@
 #option(TORQUE_STATIC "enables or disable static" OFF)

 if(WIN32)
-    set(TORQUE_CXX_FLAGS_EXECUTABLES "/wd4018 /wd4100 /wd4121 /wd4127 /wd4130 /wd4244 /wd4245 /wd4389 /wd4511 /wd4512 /wd4800 /wd4995 " CACHE STRING)
+    set(TORQUE_CXX_FLAGS_EXECUTABLES "/wd4018 /wd4100 /wd4121 /wd4127 /wd4130 /wd4244 /wd4245 /wd4389 /wd4511 /wd4512 /wd4800 /wd4995 " CACHE STRING "")
     mark_as_advanced(TORQUE_CXX_FLAGS_EXECUTABLES)

-    set(TORQUE_CXX_FLAGS_LIBS "/W0" CACHE STRING)
+    set(TORQUE_CXX_FLAGS_LIBS "/W0" CACHE STRING "")
     mark_as_advanced(TORQUE_CXX_FLAGS_LIBS)

     set(TORQUE_CXX_FLAGS_COMMON_DEFAULT "-DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS /MP /O2 /Ob2 /Oi /Ot /Oy /GT /Zi /W4 /nologo /GF /EHsc /GS- /Gy- /Qpar- /fp:precise /fp:except- /GR /Zc:wchar_t-" )
     if( TORQUE_CPU_X32 )
        set(TORQUE_CXX_FLAGS_COMMON_DEFAULT "${TORQUE_CXX_FLAGS_COMMON_DEFAULT} /arch:SSE2")
     endif()
-    set(TORQUE_CXX_FLAGS_COMMON ${TORQUE_CXX_FLAGS_COMMON_DEFAULT} CACHE STRING)
+    set(TORQUE_CXX_FLAGS_COMMON ${TORQUE_CXX_FLAGS_COMMON_DEFAULT} CACHE STRING "")

     mark_as_advanced(TORQUE_CXX_FLAGS_COMMON)


Fixed typo

Fixed typo


Update gitmodules.cmake

Update gitmodules.cmake

removed TODO note, it looks like it's already done, not just lingered.

--- git-dep/gitmodules.cmake
+++ git-dep/gitmodules.cmake
@@ -25,10 +25,3 @@
         demangle )
 endif()

-
-##
-# TODO ITEMS
-##
-# 1) export CXXFLAGS here as an option, list them here, action
-# takes place in /cmake/CheckGitDep.cmake file, same for libs
-##


disabled tests that are not working TODO follow up and fix them

--- Modules/PhotoacousticsAlgorithms/test/files.cmake
+++ Modules/PhotoacousticsAlgorithms/test/files.cmake
@@ -8,13 +8,14 @@
   # mark it as critical.
   ################## DISABLED TESTS #####################################################

+  #mitkBandpassFilterTest.cpp #This test is disabled because of T25780
+  #mitkBeamformingFilterTest.cpp #This test is disabled because of T25780
+
   ################# RUNNING TESTS #######################################################

   mitkPhotoacousticMotionCorrectionFilterTest.cpp
   mitkPAFilterServiceTest.cpp
   mitkCastToFloatImageFilterTest.cpp
-  mitkBandpassFilterTest.cpp
-  mitkBeamformingFilterTest.cpp
   mitkCropImageFilterTest.cpp
   )
 set(RESOURCE_FILES)


Add MCIMAPConnectOperation.cc for cmake build

--- src/cmake/async.cmake
+++ src/cmake/async.cmake
@@ -6,6 +6,7 @@
   async/imap/MCIMAPAsyncSession.cc
   async/imap/MCIMAPCapabilityOperation.cc
   async/imap/MCIMAPCheckAccountOperation.cc
+  async/imap/MCIMAPConnectOperation.cc
   async/imap/MCIMAPCopyMessagesOperation.cc
   async/imap/MCIMAPCreateFolderOperation.cc
   async/imap/MCIMAPDeleteFolderOperation.cc


Pass pie LD flag for executables

Pass pie LD flag for executables

CMAKE_EXEC_LINKER_FLAGS is a misprint.

Signed-off-by: Dmitry Ermilov <b906d09bf4e9d5ffa97d91f4baa9152f6d31529a@intel.com>

--- builder/FindGlobals.cmake
+++ builder/FindGlobals.cmake
@@ -1,15 +1,15 @@
 # Copyright (c) 2017 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
 # in the Software without restriction, including without limitation the rights
 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 # copies of the Software, and to permit persons to whom the Software is
 # furnished to do so, subject to the following conditions:
-#
+#
 # The above copyright notice and this permission notice shall be included in all
 # copies or substantial portions of the Software.
-#
+#
 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -95,7 +95,7 @@

   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -pipe -fPIC ${c_warnings} ${no_warnings}")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fPIC ${cxx_warnings} ${no_warnings}")
-  append("-fPIE -pie" CMAKE_EXEC_LINKER_FLAGS)
+  append("-fPIE -pie" CMAKE_EXE_LINKER_FLAGS)

   # CACHE + FORCE should be used only here to make sure that this parameters applied globally
   # End user is responsible to adjust configuration parameters further if needed. Here


Update broken(?) exprtk commit hash

Update broken(?) exprtk commit hash

--- cmake/ExternalTools.cmake
+++ cmake/ExternalTools.cmake
@@ -11,7 +11,7 @@
 CPMAddPackage("gh:onqtam/doctest#2.4.6")
 CPMAddPackage("gh:mateidavid/zstr#v1.0.4")
 CPMAddPackage("gh:imneme/pcg-cpp#ffd522e7188bef30a00c74dc7eb9de5faff90092")
-CPMAddPackage("gh:ArashPartow/exprtk#7135f4ddb12e626d2a355c587d9d7d0d74b6aab3")
+CPMAddPackage("gh:ArashPartow/exprtk#93a9f44f99b910bfe07cd1e933371e83cea3841c")

 CPMAddPackage(
     NAME nlohmann_json VERSION 3.9.1


COMP: remove nvcc flags with shared libraries and MSVC

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -29,10 +29,13 @@

 # GCS 2012-09-25 - Seems this is needed too
 if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
-	#  set (CUDA_CXX_FLAGS "${CUDA_CXX_FLAGS},-fPIC")
   set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -Xcompiler -fPIC")
 endif ()

+# SR Remove warning with shared libs and MSVC
+if(MSVC)
+  set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -DRTK_EXPORTS")
+endif()

 set (CUDA_FOUND ${CUDA_FOUND} CACHE BOOL "Did we find cuda?")
 mark_as_advanced(CUDA_FOUND)


Fix doxygen_tools.cmake

Fix doxygen_tools.cmake

--- cmake/doxygen_tools.cmake
+++ cmake/doxygen_tools.cmake
@@ -18,7 +18,9 @@
       list(APPEND DOXY_INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir})
     endif()
   endforeach()
-  list(REMOVE_DUPLICATES DOXY_INPUTS)
+  if(DOXY_INPUTS)
+      list(REMOVE_DUPLICATES DOXY_INPUTS)
+  endif()
   # Save doxy_inputs to cache.
   set(DOXY_INPUTS ${DOXY_INPUTS} CACHE INTERNAL "doxy inputs")
 endmacro()


Adds ${LXQTMOUNT_INCLUDE_DIRS} to header search path

On some systems it was causing an FTBFS when building
lxqt-panel/plugin-mount. Closes lxqt-panel #73.

--- cmake/lxqtmount_use.cmake
+++ cmake/lxqtmount_use.cmake
@@ -1 +1,2 @@
+include_directories(${LXQTMOUNT_INCLUDE_DIRS})
 link_directories(${LXQTMOUNT_LIBRARY_DIRS})


FIX: Skip compiler checking for iOS

FIX: Skip compiler checking for iOS

--- cmake/toolchain/ios.cmake
+++ cmake/toolchain/ios.cmake
@@ -10,6 +10,11 @@
 set(MACOSX_BUNDLE_GUI_IDENTIFIER com.example)
 set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
 set(CMAKE_MACOSX_BUNDLE YES)
+
+set (CMAKE_CXX_COMPILER_WORKS TRUE)
+set (CMAKE_C_COMPILER_WORKS TRUE)
+set (CMAKE_C_FLAGS_INIT "")
+set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden")

 set(IPHONEOS_ARCHS armv7;arm64)
 set(IPHONESIMULATOR_ARCHS i386;x86_64)


cmake: ZEPHYR_MODULES_NAMES list created before ext-root

Create the ZEPHYR_MODULES_NAMES list of zephyr modules present in the
system before calling roots defined in `MODULE_EXT_ROOT`.

This will allow external module roots to process based on Zephyr modules
available in the system.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/zephyr_module.cmake
+++ cmake/zephyr_module.cmake
@@ -80,6 +80,20 @@
     endforeach()
   endif()

+  if(EXISTS ${CMAKE_BINARY_DIR}/zephyr_modules.txt)
+    file(STRINGS ${CMAKE_BINARY_DIR}/zephyr_modules.txt ZEPHYR_MODULES_TXT
+         ENCODING UTF-8)
+
+    set(ZEPHYR_MODULE_NAMES)
+    foreach(module ${ZEPHYR_MODULES_TXT})
+      # Match "<name>":"<path>" for each line of file, each corresponding to
+      # one module. The use of quotes is required due to CMake not supporting
+      # lazy regexes (it supports greedy only).
+      string(REGEX REPLACE "\"(.*)\":\".*\":\".*\"" "\\1" module_name ${module})
+      list(APPEND ZEPHYR_MODULE_NAMES ${module_name})
+    endforeach()
+  endif()
+
   foreach(root ${MODULE_EXT_ROOT})
     if(NOT EXISTS ${root})
       message(FATAL_ERROR "No `modules.cmake` found in module root `${root}`.")
@@ -88,11 +102,7 @@
     include(${root}/modules/modules.cmake)
   endforeach()

-  if(EXISTS ${CMAKE_BINARY_DIR}/zephyr_modules.txt)
-    file(STRINGS ${CMAKE_BINARY_DIR}/zephyr_modules.txt ZEPHYR_MODULES_TXT
-         ENCODING UTF-8)
-    set(ZEPHYR_MODULE_NAMES)
-
+  if(DEFINED ZEPHYR_MODULES_TXT)
     foreach(module ${ZEPHYR_MODULES_TXT})
       # Match "<name>":"<path>" for each line of file, each corresponding to
       # one module. The use of quotes is required due to CMake not supporting
@@ -101,8 +111,6 @@
       string(REGEX REPLACE "\"(.*)\":\".*\":\".*\"" "\\1" module_name ${module})
       string(REGEX REPLACE "\".*\":\"(.*)\":\".*\"" "\\1" module_path ${module})
       string(REGEX REPLACE "\".*\":\".*\":\"(.*)\"" "\\1" cmake_path ${module})
-
-      list(APPEND ZEPHYR_MODULE_NAMES ${module_name})

       zephyr_string(SANITIZE TOUPPER MODULE_NAME_UPPER ${module_name})
       if(NOT ${MODULE_NAME_UPPER} STREQUAL CURRENT)


build(CMake): Fix setting default C++ standard

--- src/docker/itk-wasm/ITKWebAssemblyInterface.cmake
+++ src/docker/itk-wasm/ITKWebAssemblyInterface.cmake
@@ -1,7 +1,7 @@
 # Override the default set in the Emscripten toolchain (11) to be compatible
 # with ITK's requirement for c++14 or newer.
 # C++17 for string_view support
-set(CMAKE_C_STANDARD_COMPUTED_DEFAULT 17)
+set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT 17)

 if(NOT _ITKWebAssemblyInterface_INCLUDED)


Fix typo !

Fix typo !

C/C is the evil, C/C is the evil, C/C is the evil !

--- conf.d/cmake/config.cmake
+++ conf.d/cmake/config.cmake
@@ -115,7 +115,7 @@
 # Optional location for config.xml.in
 # -----------------------------------
 set(WIDGET_ICON ${PROJECT_APP_TEMPLATES_DIR}/wgt/${PROJECT_ICON})
-set(WIDGET_CONFIG_TEMPLATE ${CMAKE_SOURCE_DIR}/conf.d/wgt/config.xml.in CACHE PATH "Path to widget config file template (config.xml.in)" CACHE PATH "Path to the widget config file")
+set(WIDGET_CONFIG_TEMPLATE ${CMAKE_SOURCE_DIR}/conf.d/wgt/config.xml.in CACHE PATH "Path to widget config file template (config.xml.in)")

 # Mandatory widget Mimetype specification of the main unit
 # --------------------------------------------------------------------------


perform ios compiler detection

perform ios compiler detection

- this now works
- CMAKE_CXX_COMPILER_VERSION variable must be set for conan to work

--- toolchains/ios.toolchain.cmake
+++ toolchains/ios.toolchain.cmake
@@ -37,10 +37,6 @@
     message( FATAL_ERROR "iOS toolchain supports only XCode generator" )
 endif()

-# Compiler detection is skipped, so we must manually set these variables so code that depend on them can work
-set( CMAKE_CXX_COMPILER_ID "AppleClang" CACHE STRING "C++ compiler id" )
-set( CMAKE_C_COMPILER_ID   "AppleClang" CACHE STRING "C compiler id"   )
-
 set( TNUN_os_suffix iOS )

 set( TNUN_cpu_archs default )
@@ -48,6 +44,7 @@
 # Skip the platform compiler checks for cross compiling (or not)...
 set( CMAKE_CXX_COMPILER_WORKS true CACHE STRING "Skip CMake compiler detection (requires a functioning code signing identity and provisioning profile)." )
 set( CMAKE_C_COMPILER_WORKS   ${CMAKE_CXX_COMPILER_WORKS} )
+
 if ( NOT CMAKE_CXX_COMPILER_WORKS )
     # Make sure all executables are bundles otherwise try compiles will fail.
     set( CMAKE_MACOSX_BUNDLE                         true                         )
@@ -68,7 +65,7 @@
 # http://stackoverflow.com/questions/1211854/xcode-conditional-build-settings-based-on-architecture-device-arm-vs-simulat
 # http://cmake.3232098.n2.nabble.com/Different-settings-for-different-configurations-in-Xcode-td6908021.html
 # http://public.kitware.com/Bug/view.php?id=8915 Missing feature to set Xcode specific build settings
-set( XCODE_ATTRIBUTE_CFLAGS_armv7  "-mcpu=cortex-a8 -mfpu=neon -mtune=cortex-a9"  )
+set( XCODE_ATTRIBUTE_CFLAGS_armv7  "-mcpu=cortex-a8 -mfpu=neon -mtune=cortex-a9"  )
 set( XCODE_ATTRIBUTE_CFLAGS_armv7s "                -mfpu=neon -mtune=cortex-a15" ) # http://www.anandtech.com/show/6292/iphone-5-a6-not-a15-custom-core
 set( CMAKE_XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=armv7]          "${XCODE_ATTRIBUTE_CFLAGS_armv7}  $(OTHER_CFLAGS)"         )
 set( CMAKE_XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=armv7s]         "${XCODE_ATTRIBUTE_CFLAGS_armv7s} $(OTHER_CFLAGS)"         )


update user options

update user options

--- config/user_options.cmake
+++ config/user_options.cmake
@@ -34,8 +34,6 @@
     SET (TBB_ROOT "C:/Program Files/Intel/TBB")
     SET (TBB_INC_PATH "${TBB_ROOT}/include" CACHE PATH "TBB include")
     SET (TBB_LIB_PATH "${TBB_ROOT}/lib/intel64/vc12" CACHE PATH "TBB lib")
-    SET (VSMC_MPI_FOUND FALSE CACHE BOOL "NO MPI")
-    SET (OPENCL_FOUND FALSE CACHE BOOL "NO OpenCL")
 ENDIF (MSVC)

 IF (UNIX AND NOT APPLE AND NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")


Add assert_file_exists and assert_file_does_not_exist assertions.

--- CMakeUnit.cmake
+++ CMakeUnit.cmake
@@ -490,3 +490,47 @@
     endif (RESULT)

 endfunction (assert_does_not_have_property_with_value)
+
+function (_file_exists FILE RESULT_VARIABLE)
+
+    set (${RESULT_VARIABLE} TRUE PARENT_SCOPE)
+
+    if (EXISTS ${FILE})
+
+        set (${RESULT_VARIABLE} FALSE PARENT_SCOPE)
+
+    endif (EXISTS ${FILE})
+
+endfunction (_file_exists)
+
+# assert_file_exists:
+#
+# Throws a non-fatal error if the file specified by FILE
+# does not exist on the filesystem
+function (assert_file_exists FILE)
+
+    _file_exists (${FILE} RESULT)
+
+    if (NOT RESULT)
+
+        message (SEND_ERROR "The file ${FILE} does not exist")
+
+    endif (NOT RESULT)
+
+endfunction (assert_file_exists)
+
+# assert_file_does_not_exist:
+#
+# Throws a non-fatal error if the file specified by FILE
+# exists the filesystem
+function (assert_file_does_not_exist FILE)
+
+    _file_exists (${FILE} RESULT)
+
+    if (RESULT)
+
+        message (SEND_ERROR "The file ${FILE} does exists")
+
+    endif (RESULT)
+
+endfunction (assert_file_does_not_exist)


chore(build): build 0.1.2

chore(build): build 0.1.2

--- dist/consort.cmake
+++ dist/consort.cmake
@@ -64,30 +64,26 @@
 	if( APPLE )
 		execute_process(
 			COMMAND df -T nfs "${CMAKE_BINARY_DIR}"
-			RESULT_VARIABLE BINARY_DIR_IS_NFS_STATUS
-			OUTPUT_VARIABLE DF_SENT_TO_NULL
+			RESULT_VARIABLE _result
+			OUTPUT_QUIET
 		)

-		if("${BINARY_DIR_IS_NFS_STATUS}" STREQUAL "0")
-			set(BINARY_DIR_IS_NFS ON)
-		else()
-			set(BINARY_DIR_IS_NFS OFF)
+		if("${_result}" STREQUAL "0")
+			set(_nfs_build 1)
 		endif()
 	else()
 		execute_process(
 			COMMAND stat -f -c %T "${CMAKE_BINARY_DIR}"
-			OUTPUT_VARIABLE BINARY_DIR_FS
+			OUTPUT_VARIABLE _result
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 		)

-		if(NOTBINARY_DIR_FS STREQUAL "nfs")
-			set(BINARY_DIR_IS_NFS ON)
-		else()
-			set(BINARY_DIR_IS_NFS OFF)
-		endif()
-	endif()
-
-	if(BINARY_DIR_IS_NFS)
+		if(NOT _result STREQUAL "nfs")
+			set(_nfs_build 1)
+		endif()
+	endif()
+
+	if(_nfs_build)
 		if(CONSORT_PERMIT_NFS_BUILDS)
 			message( WARNING "Network build directory detected, your build may be slow." )
 		else()
@@ -108,7 +104,7 @@

 ## Variables/CONSORT_VERSION
 # Contains the current version of Consort
-set(CONSORT_VERSION 0.1.1)
+set(CONSORT_VERSION 0.1.2)
 # 32/64 bit detection
 ## Variables/CONSORT_64BIT
 # This variable is 1 if `sizeof(void*) >= 8`.


tbb compiles on win and ubuntu at least

tbb compiles on win and ubuntu at least

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -159,7 +159,7 @@
     set(TBB_ARGS "-DTBB_TEST=OFF")

     if (WIN32)
-      set(TBB_LIB "lib/tbb12.lib")
+      set(TBB_LIB "${CMAKE_INSTALL_LIBDIR}/tbb12.lib")
       set(TBB_DLL "bin/tbb12.dll")

       add_external_project(tbb SHARED
@@ -169,12 +169,13 @@
         BUILD_BYPRODUCTS "<INSTALL_DIR>/${TBB_DLL}" "<INSTALL_DIR>/${TBB_LIB}"
       )
       add_external_library(tbb
+        PROJECT tbb
         LIBRARY "${TBB_DLL}"
         IMPORT_LIBRARY "${TBB_LIB}"
       )
     else()
       # todo this is surely not portable, as always
-      set(TBB_LIB "lib64/libtbb.so.12.3")
+      set(TBB_LIB "${CMAKE_INSTALL_LIBDIR}/libtbb.so.12.3")

       add_external_project(tbb SHARED
         GIT_REPOSITORY ${TBB_REPO}
@@ -183,6 +184,7 @@
         BUILD_BYPRODUCTS "<INSTALL_DIR>/${TBB_LIB}"
       )
       add_external_library(tbb
+        PROJECT tbb
         LIBRARY "${TBB_LIB}"
       )
     endif()


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@2403 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyThinkGearAPI.cmake
+++ trunk/cmake-modules/FindThirdPartyThinkGearAPI.cmake
@@ -4,7 +4,7 @@
 # Adds include path
 # ---------------------------------
 IF(WIN32)
-	FIND_PATH(PATH_ThinkGearAPI thinkgear.h PATHS "C:/Program Files/MindSet Development Tools/tgcd/win32" $ENV{OpenViBE_dependencies})
+	FIND_PATH(PATH_ThinkGearAPI thinkgear.h PATHS "C:/Program Files/MindSet Development Tools/tgcd/win32" "C:\Program Files\MindSet Development Tools\ThinkGear Communications Driver\win32" $ENV{OpenViBE_dependencies})
 	IF(PATH_ThinkGearAPI)
 		MESSAGE(STATUS "  Found ThinkGear API...")
 		INCLUDE_DIRECTORIES(${PATH_ThinkGearAPI})


-ENH: turn on mevis dicom tiff testing for linux cluster as well. I just discovered that itk4.1 has libtiff4 included, so maybe it will work right away.

--- src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
+++ src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
@@ -51,7 +51,7 @@
 ELASTIX_BUILD_TESTING:BOOL=ON
 ELASTIX_ENABLE_PACKAGER:BOOL=ON
 ELASTIX_USE_CUDA:BOOL=OFF
-ELASTIX_USE_MEVISDICOMTIFF:BOOL=OFF
+ELASTIX_USE_MEVISDICOMTIFF:BOOL=ON
 ELASTIX_IMAGE_DIMENSION:STRING=2;3;4
 ELASTIX_IMAGE_2D_PIXELTYPES:STRING=float
 ELASTIX_IMAGE_3D_PIXELTYPES:STRING=float


ilastik.cmake: Updated default ilastik checkout sha

--- ilastik.cmake
+++ ilastik.cmake
@@ -36,7 +36,7 @@
 include (futures)

 # select the desired ilastik commit
-set(DEFAULT_ILASTIK_VERSION "v1.0.2")
+set(DEFAULT_ILASTIK_VERSION 233886caf405623d8e17b260716b743cb4b96527) # 2014-06-10
 IF(NOT DEFINED ILASTIK_VERSION)
     SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
 ENDIF()


COMP: Make module header tests depend on module libraries

Some header files may be generated at build time while building their
libraries.  Do not compile header test sources until after the libraries
are available to ensure that such generated headers will exist.

Change-Id: If6975d956835555dcd799ae273ca614f31414db7

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -80,6 +80,7 @@
         )
       add_executable( ${_test_name} ${_header_test_src} )
       target_link_libraries( ${_test_name} ITKCommon )
+      add_dependencies(${_test_name} ${${_name}_LIBRARIES})
       add_dependencies(${_name}-all ${_test_name})
       math( EXPR _test_num "${_test_num} + 1" )
     endforeach()


Fixed line endings

Fixed line endings

--- CMakeModules/FindFreetype.cmake
+++ CMakeModules/FindFreetype.cmake
@@ -6,11 +6,11 @@
 #  This is the concatenation of the paths:
 #  FREETYPE_INCLUDE_DIR_ft2build
 #  FREETYPE_INCLUDE_DIR_freetype2
-#
+#
 # $FREETYPE_DIR is an environment variable that would
 # correspond to the ./configure --prefix=$FREETYPE_DIR
 # used in building FREETYPE.
-# Created by Eric Wing.
+# Created by Eric Wing.

 # prefer FindFreetype from cmake distribution
 if(EXISTS ${CMAKE_ROOT}/Modules/FindFreetype.cmake)
@@ -21,31 +21,31 @@
   endif()
 endif()

-# Ugh, FreeType seems to use some #include trickery which
+# Ugh, FreeType seems to use some #include trickery which
 # makes this harder than it should be. It looks like they
 # put ft2build.h in a common/easier-to-find location which
-# then contains a #include to a more specific header in a
+# then contains a #include to a more specific header in a
 # more specific location (#include <freetype/config/ftheader.h>).
-# Then from there, they need to set a bunch of #define's
+# Then from there, they need to set a bunch of #define's
 # so you can do something like:
 # #include FT_FREETYPE_H
 # Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
 # wants explicit full paths and this trickery doesn't work too well.
-# I'm going to attempt to cut out the middleman and hope
+# I'm going to attempt to cut out the middleman and hope
 # everything still works.

-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
+FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
   PATHS
   $ENV{FREETYPE_DIR}
   NO_DEFAULT_PATH
-  PATH_SUFFIXES include
+  PATH_SUFFIXES include
 )
-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
+FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
   PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
   NO_DEFAULT_PATH
   PATH_SUFFIXES include
 )
-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
+FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
   PATHS
   /usr/local
   /usr
@@ -61,16 +61,16 @@
   PATH_SUFFIXES include include/freetype2
 )

-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
+FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
   $ENV{FREETYPE_DIR}/include/freetype2
   NO_DEFAULT_PATH
 )
-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
+FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
   PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
   NO_DEFAULT_PATH
   PATH_SUFFIXES include/freetype2
 )
-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
+FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
   /usr/local/include/freetype2
   /usr/include/freetype2
   /usr/local/X11R6/include/freetype2
@@ -84,7 +84,7 @@
   /usr/freeware/include/freetype2
 )

-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
+FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
   /usr/local/include/freetype2
   /usr/include/freetype2
   /usr/local/X11R6/include/freetype2
@@ -98,20 +98,20 @@
   /usr/freeware/include/freetype2
 )

-FIND_LIBRARY(FREETYPE_LIBRARY
+FIND_LIBRARY(FREETYPE_LIBRARY
   NAMES freetype libfreetype freetype219
   PATHS
   $ENV{FREETYPE_DIR}
   NO_DEFAULT_PATH
-  PATH_SUFFIXES lib64 lib
+  PATH_SUFFIXES lib64 lib
 )
-FIND_LIBRARY(FREETYPE_LIBRARY
+FIND_LIBRARY(FREETYPE_LIBRARY
   NAMES freetype libfreetype freetype219
   PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
   NO_DEFAULT_PATH
-  PATH_SUFFIXES lib64 lib
+  PATH_SUFFIXES lib64 lib
 )
-FIND_LIBRARY(FREETYPE_LIBRARY
+FIND_LIBRARY(FREETYPE_LIBRARY
   NAMES freetype libfreetype freetype219
   PATHS
   /usr/local


Update clBLAS release tag

Update clBLAS release tag

--- CMakeModules/build_clBLAS.cmake
+++ CMakeModules/build_clBLAS.cmake
@@ -14,7 +14,7 @@
 ExternalProject_Add(
     clBLAS-ext
     GIT_REPOSITORY https://github.com/arrayfire/clBLAS.git
-    GIT_TAG 102c832825e8e4d60ad73ca97e95668463294068
+    GIT_TAG arrayfire-release-test
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


ilastik.cmake: Require opengm

ilastik.cmake: Require opengm

--- ilastik.cmake
+++ ilastik.cmake
@@ -32,6 +32,7 @@
 include (nose)
 include (faulthandler)
 include (jsonschema) # Required for the dvid extension.
+include (opengm)

 # select the desired ilastik commit
 set(DEFAULT_ILASTIK_VERSION "v1.0.2")
@@ -71,8 +72,8 @@
 message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...")

 set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME}
-                            ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME}
-                            ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME})
+                          ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME}
+                          ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} )

 if (${build_pgmlink})
     # Tracking depends on pgmlink, which depends on CPLEX.


added fatal error when no gams was found

--- include.cmake
+++ include.cmake
@@ -60,6 +60,11 @@
 endif()
 set(GAMS_DISTRIB_C_API "${GAMS_DISTRIB}/apifiles/C/api")
 set(GAMS_DISTRIB_CPP_API "${GAMS_DISTRIB}/apifiles/C++/api")
+
+if (NOT EXISTS ${GAMS_DISTRIB_C_API})
+    message(FATAL_ERROR "No GAMS found in path ${GAMS_DISTRIB}. GAMS is required to compile the C++ API.
+Please adjust ${CMAKE_SOURCE_DIR}/gamsinclude.txt to point to your GAMS installation.")
+endif()

 # create variable GAMSPATH from gamsinclude.txt
 if("$ENV{GAMS_BUILD}" STREQUAL "")


cleaned up

cleaned up

--- cmake-d/UseDUnittest.cmake
+++ cmake-d/UseDUnittest.cmake
@@ -8,33 +8,28 @@
 #

 macro(target_add_unittests _target _sourceFiles)
-    set(_testname "test_${_target}")
-    set(main_unittest "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/unittest.d")
+    set(_testtarget "test_${_target}")

-    if(NOT EXISTS ${main_unittest})
-        file(WRITE ${main_unittest} "// Generated by UseDUnittest.cmake\nint main() { return 0; }")
-    endif()
-
-    add_executable(test_${_target} ${_sourceFiles})
-    add_dependencies(test_${_target} ${_target})
+    add_executable(${_testtarget} ${_sourceFiles})
+    add_dependencies(${_testtarget} ${_target})
     target_compile_options(flow-core PRIVATE "-unittest")
-    set_target_properties(test_${_target} PROPERTIES LINK_FLAGS "-main")
+    set_target_properties(${_testtarget} PROPERTIES LINK_FLAGS "-main")

     get_target_property(include_dirs ${_target} INCLUDE_DIRECTORIES)
     foreach(include_dir ${include_dirs})
         if(include_dir)
-            target_include_directories(test_${_target} PRIVATE "${include_dir}")
+            target_include_directories(${_testtarget} PRIVATE "${include_dir}")
         endif()
     endforeach()

     get_target_property(libs ${_target} LINK_LIBRARIES)
     foreach(lib ${libs})
         if(lib)
-            target_link_libraries(test_${_target} ${lib})
+            target_link_libraries(${_testtarget} ${lib})
         endif()
     endforeach()

-    add_test(NAME test_${_target}
+    add_test(NAME ${_testtarget}
         COMMAND "$<TARGET_FILE:test_${_target}>")
-    set_tests_properties(test_${_target} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+    set_tests_properties(${_testtarget} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 endmacro()


Eliminate /Yu at project level

Eliminate /Yu at project level

Not needed, this is already specified at the source level and also specifying it at project level is adding confusion.

--- cmake-modules/AddPCH.cmake
+++ cmake-modules/AddPCH.cmake
@@ -13,6 +13,5 @@
             )
     endforeach( src_file ${${SourcesVar}} )
     list(APPEND ${SourcesVar} ${PrecompiledHeader} ${PrecompiledSource})
-    add_compile_options(/Yu)
   endif(MSVC)
-endmacro(add_pch)+endmacro(add_pch)


[cmake] improve PATH support

[cmake] improve PATH support

--- cmake/FindPathFerris.cmake
+++ cmake/FindPathFerris.cmake
@@ -40,8 +40,13 @@
   SET(HAVE_PATHFERRIS TRUE)
 endif()
 IF (NOT PathFerris_FIND_QUIETLY)
-  MESSAGE(STATUS "Found PathFerris: ${PathFerris_LIBRARY}")
-  MESSAGE(STATUS "PathFerris_LIBRARIES: ${PathFerris_LIBRARIES}")
+  IF(${PathFerris_LIBRARY} MATCHES ".*-NOTFOUND")
+     MESSAGE(STATUS "Could not find library named path${PathFerris_VERSION} for PathFerris support")
+     MESSAGE(STATUS "Try setting either PathFerris_DIR or (DY)LD_LIBRARY_PATH to the directory where the library is")
+  ELSE()
+    MESSAGE(STATUS "Found PathFerris: ${PathFerris_LIBRARY}")
+    MESSAGE(STATUS "PathFerris_LIBRARIES: ${PathFerris_LIBRARIES}")
+  ENDIF()
 ENDIF (NOT PathFerris_FIND_QUIETLY)

 # Final check :


boost-download: Removed logging.

boost-download: Removed logging.

--- cmake/boost-download.cmake
+++ cmake/boost-download.cmake
@@ -23,7 +23,7 @@
         set(args_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
     endif()

-    message("Running git-command: git ${args_COMMAND}")
+    #message("Running git-command: git ${args_COMMAND}")

     execute_process(
         COMMAND ${GIT_EXECUTABLE} ${args_COMMAND}


change mklml download url to bce

change mklml download url to bce

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -28,7 +28,7 @@

 SET(MKLML_PROJECT       "extern_mklml")
 SET(MKLML_VER           "mklml_lnx_2018.0.1.20171007")
-SET(MKLML_URL           "https://github.com/01org/mkl-dnn/releases/download/v0.11/${MKLML_VER}.tgz")
+SET(MKLML_URL           "http://paddlepaddledeps.bj.bcebos.com/${MKLML_VER}.tgz")
 SET(MKLML_SOURCE_DIR    "${THIRD_PARTY_PATH}/mklml")
 SET(MKLML_DOWNLOAD_DIR  "${MKLML_SOURCE_DIR}/src/${MKLML_PROJECT}")
 SET(MKLML_DST_DIR       "mklml")


do not use MT

do not use MT

--- cmake/internal_utils.cmake
+++ cmake/internal_utils.cmake
@@ -32,7 +32,11 @@
         # preferable to use CRT as static libraries, as we don't have to rely
         # on CRT DLLs being available. CMake always defaults to using shared
         # CRT libraries, so we override that default here.
-        string(REPLACE "/MD" "-MT" ${flag_var} "${${flag_var}}")
+
+		# for pass error LNK2005: xxx already defined in MSVCRT.lib(MSVCR100.dll)
+		# C:\something\LIBCMT.lib(setlocal.obj) error
+        # string(REPLACE "/MD" "-MT" ${flag_var} "${${flag_var}}")
+
       endif()

       # We prefer more strict warning checking for building Google Test.


cmake: Make SVNVersion.inc work on Windows if svn is called svn.bat.

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

--- cmake/modules/GetSVN.cmake
+++ cmake/modules/GetSVN.cmake
@@ -20,6 +20,11 @@
 set(ENV{TERM} "dumb")

 macro(get_source_info_svn path revision repository)
+  # If svn is a bat file, find_program(Subversion) doesn't find it.
+  # Explicitly search for that here; Subversion_SVN_EXECUTABLE will override
+  # the find_program call in FindSubversion.cmake.
+  find_program(Subversion_SVN_EXECUTABLE NAMES svn svn.bat)
+
   # FindSubversion does not work with symlinks. See PR 8437
   if (NOT IS_SYMLINK "${path}")
     find_package(Subversion)


ilastik: Updated tag for latest bugfix related to absolute vs. relative path args.

--- ilastik.cmake
+++ ilastik.cmake
@@ -27,7 +27,7 @@
 include (greenlet)

 external_git_repo (ilastik
-    flyem-20130207
+    flyem-20130207B
     http://github.com/janelia-flyem/flyem-ilastik)

 message ("Installing ${ilastik_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")


- Add somewhat standard path for SDL2 on Windows

--- cmake/Find/FindSDL2.cmake
+++ cmake/Find/FindSDL2.cmake
@@ -75,6 +75,7 @@
   /opt/csw # Blastwave
   /opt
   ${CMAKE_BINARY_DIR}/libs
+  "C:\\SDL2_64"
 )

 FIND_PATH(SDL2_INCLUDE_DIR SDL.h


Remove warnings

Remove warnings

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -17,6 +17,7 @@
   # the flag -ftest-coverage causes nvcc to barf, so exclude that one
   if (CMAKE_COMPILER_IS_GNUCC)
     string (REPLACE "-ftest-coverage" "" TMP "${CMAKE_CXX_FLAGS}")
+    string (REPLACE "-ftemplate-depth-50" "" TMP "${TMP}"
     string (REPLACE " " "," TMP "${TMP}")
     set (CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS} ${TMP})
   endif ()


Use ovrlib release version if no debug present

Oculus SDK ships with only release version of the library pre-built.
They are possible to build from source, but this change makes it
possible to run the CMake configuration without the debug library.
Instead it will use the release version in the debug build as well.
This is bad form and the CMake script will emitt a warning urging the
user to build the debug version of ovrlib from source.

This closes #65

--- cmake/FindOculusSDK.cmake
+++ cmake/FindOculusSDK.cmake
@@ -85,9 +85,15 @@
 FIND_LIBRARY(OCULUS_SDK_LIBRARY_DEBUG NAMES libovr${CMAKE_DEBUG_POSTFIX} libovr64${CMAKE_DEBUG_POSTFIX} ovr${CMAKE_DEBUG_POSTFIX} ovr libovr HINTS
                                                       ${OCULUS_SDK_ROOT_DIR}/LibOVR/Lib/Windows/${_OCULUS_SDK_LIB_ARCH}/Debug/${_OCULUS_MSVC_DIR}
                                                     )
-
+
 MARK_AS_ADVANCED(OCULUS_SDK_LIBRARY)
 MARK_AS_ADVANCED(OCULUS_SDK_LIBRARY_DEBUG)
+
+# If no debug library is found, use the release version instead
+IF(OCULUS_SDK_LIBRARY AND NOT OCULUS_SDK_LIBRARY_DEBUG)
+	MESSAGE("Warning: Could not find the debug version of libovr in the OculusSDK directory. Please consider building it from source.")
+    SET(OCULUS_SDK_LIBRARY_DEBUG ${OCULUS_SDK_LIBRARY})
+ENDIF()

 SET(OCULUS_SDK_LIBRARIES optimized ${OCULUS_SDK_LIBRARY} debug ${OCULUS_SDK_LIBRARY_DEBUG})


Updated libarchive dependency

Updated libarchive dependency

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -31,8 +31,8 @@
 hunter_config(
     libarchive
     VERSION "3.4.2-p0"
-    URL "https://github.com/luxonis/libarchive/archive/ace98b6abd6790eb43f043aaa261e468a3f44cd2.tar.gz"
-    SHA1 "8996d316f21b88b38cec026eef56aa0fd1fd5008"
+    URL "https://github.com/luxonis/libarchive/archive/e6c4150eb4f08e98e2629aa51f52d2d0c5b0f8d4.tar.gz"
+    SHA1 "AEA3E76511A7BECD2173B14AC1322626E23A1B9B"
     CMAKE_ARGS
         ENABLE_ACL=OFF
         ENABLE_BZip2=OFF


Squashed '3rdparty/github/cmake-utils/' changes from 1dddd0db..1a27b81f

1a27b81f Add some STATUS messages

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 1a27b81fceab2e99858f04ce9cd1f9d0f0bf99f9

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -21,22 +21,14 @@
       SET (CPACK_RESOURCE_FILE_LICENSE     "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
     ELSE ()
       IF (MYPACKAGE_DEBUG)
-        MESSAGE (STATUS "[${PROJECT_NAME}-START-DEBUG] No LICENSE")
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] No LICENSE")
       ENDIF ()
       SET (CPACK_RESOURCE_FILE_LICENSE)
     ENDIF ()
     #
-    # Enable component to all archive packaging types
-    #
-    SET (CPACK_ARCHIVE_COMPONENT_INSTALL TRUE)
-    #
     # Get all components in one package
     #
-    SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
-    #
-    # Do not get fooled by components out of our control
-    #
-    SET (CPACK_COMPONENTS_ALL ManpageComponent DynamicLibraryComponent StaticLibraryComponent HeaderComponent ApplicationComponent)
+    SET (CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
     #
     # Include CPack - from now on we will have access to CPACK own macros
     #
@@ -53,6 +45,10 @@
       SET (_CAN_DEVELOPMENTTYPE TRUE)
     ELSE ()
       SET (_CAN_DEVELOPMENTTYPE FALSE)
+    ENDIF ()
+    IF (MYPACKAGE_DEBUG)
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Full install type        : ${_CAN_FULLTYPE}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Development install type : ${_CAN_DEVELOPMENTTYPE}")
     ENDIF ()
     IF (_CAN_FULLTYPE)
       CPACK_ADD_INSTALL_TYPE (FullType        DISPLAY_NAME "Full")
@@ -82,6 +78,12 @@
       SET (_CAN_RUNTIMEGROUP TRUE)
     ELSE ()
       SET (_CAN_RUNTIMEGROUP FALSE)
+    ENDIF ()
+    IF (MYPACKAGE_DEBUG)
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Development group        : ${_CAN_DEVELOPMENTGROUP}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Development Library group: ${_CAN_DEVELOPMENTLIBRARYGROUP}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Document group           : ${_CAN_DOCUMENTGROUP}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Runtime group            : ${_CAN_RUNTIMEGROUP}")
     ENDIF ()
     IF (_CAN_DEVELOPMENTGROUP)
       CPACK_ADD_COMPONENT_GROUP (DevelopmentGroup        DISPLAY_NAME "Development" DESCRIPTION "Develoment files\n\nThis group contains libraries and headers"  EXPANDED)
@@ -134,6 +136,13 @@
                           INSTALL_TYPES FullType
                           DEPENDS DynamicLibraryComponent)
     ENDIF ()
+    IF (MYPACKAGE_DEBUG)
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Manpage component        : ${_HAVE_MANPAGECOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Dynamic Library component: ${_HAVE_DYNAMICLIBRARYCOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Static Library component : ${_HAVE_STATICLIBRARYCOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Header component         : ${_HAVE_HEADERCOMPONENT}")
+      MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] Application component    : ${_HAVE_APPLICATIONCOMPONENT}")
+    ENDIF ()
     #
     # Quite subtil, but the "package" target is not visible at this time. There is a old standing bug
     # in CMake about this.


cmake: Fix API doc for qi_create_gtest.

cmake: Fix API doc for qi_create_gtest.

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -59,6 +59,7 @@
 # ${CMAKE_SOURCE_DIR}/test-results/${test_name}.xml
 # The name of the test will always be the name of the target.
 #
+# \arg:name name of the test
 # \flag:NO_ADD_TEST Do not call add_test, just create the binary
 # \argn: source files, like the SRC group, argn and SRC will be merged
 # \param:TIMEOUT The timeout of the test


zlib do not change behaviour of build locations if subproject

--- cmake/zlib_external.cmake
+++ cmake/zlib_external.cmake
@@ -1,7 +1,7 @@
 # ZLIB

 # Fix Windows missing "zlib.dll":
-if(WIN32)
+if(WIN32 AND (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}))
     set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}/$<CONFIG> CACHE INTERNAL "" FORCE)
 endif()


cmake add better logs_symlink dependencies

--- src/firmware/posix/sitl_target.cmake
+++ src/firmware/posix/sitl_target.cmake
@@ -44,10 +44,10 @@
 file(MAKE_DIRECTORY ${SITL_WORKING_DIR})

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

 add_custom_target(run_config
 		COMMAND Tools/sitl_run.sh
@@ -60,8 +60,8 @@
 			${PX4_BINARY_DIR}
 			WORKING_DIRECTORY ${SITL_WORKING_DIR}
 			USES_TERMINAL
+		DEPENDS px4 logs_symlink
 		)
-add_dependencies(run_config px4)

 # project to build sitl_gazebo if necessary
 ExternalProject_Add(sitl_gazebo
@@ -80,8 +80,7 @@
 # create targets for each viewer/model/debugger combination
 set(viewers none jmavsim gazebo replay)
 set(debuggers none ide gdb lldb ddd valgrind callgrind)
-set(models none iris iris_opt_flow iris_rplidar
-	standard_vtol plane solo tailsitter typhoon_h480 rover)
+set(models none iris iris_opt_flow iris_rplidar standard_vtol plane solo tailsitter typhoon_h480 rover)
 set(all_posix_vmd_make_targets)
 foreach(viewer ${viewers})
 	foreach(debugger ${debuggers})
@@ -125,6 +124,7 @@
 						${PX4_BINARY_DIR}
 						WORKING_DIRECTORY ${SITL_WORKING_DIR}
 						USES_TERMINAL
+					DEPENDS logs_symlink
 					)
 			list(APPEND all_posix_vmd_make_targets ${_targ_name})
 			if (viewer STREQUAL "gazebo")


COMP: Compile ModuleElastix with OpenMP flags if supported by target machine

--- Modules/Components/Elastix/ModuleElastix.cmake
+++ Modules/Components/Elastix/ModuleElastix.cmake
@@ -7,6 +7,14 @@
 endif()

 include( ${ELASTIX_USE_FILE} )
+
+# If OpenMP is supported by this machine, elastix will be compiled with
+# OpenMP flags, and we need to add them here as well
+find_package( OpenMP )
+if (OPENMP_FOUND)
+  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
+  set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
+endif()

 # Export include files
 set( ${MODULE}_INCLUDE_DIRS


COMP: Fixed Boost configure command syntax (works for both, paths with and without spaces).

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -120,7 +120,7 @@
       CONFIGURE_COMMAND "<SOURCE_DIR>/bootstrap${_shell_extension}"
         --with-toolset=${_boost_toolset}
         --with-libraries=${_boost_libs}
-        "--prefix=\"<INSTALL_DIR>\""
+        "--prefix=<INSTALL_DIR>"
       ${_boost_build_cmd}
       INSTALL_COMMAND ${_install_cmd}
       DEPENDS ${proj_DEPENDENCIES}


cmake: Include Abseil first, update deps

This fixes Abseil's `ABSL_INTERNAL_AT_LEAST_CXX17` test, that always fails if
GoogleTest is included before Abseil.

This also updates the deps to the latest versions.

PiperOrigin-RevId: 478473989
Change-Id: Ibd766f196609698e7704600f560c8ce5d636786e

--- cmake/BinExportDeps.cmake
+++ cmake/BinExportDeps.cmake
@@ -22,20 +22,10 @@

 include(FetchContent)

-# Googletest
-FetchContent_Declare(googletest
-  GIT_REPOSITORY https://github.com/google/googletest.git
-  GIT_TAG        0320f517fd920866d918e564105d68fd4362040a # 2022-06-01
-)
-FetchContent_MakeAvailable(googletest)
-binexport_check_target(gtest)
-binexport_check_target(gtest_main)
-binexport_check_target(gmock)
-
 # Abseil
 FetchContent_Declare(absl
   GIT_REPOSITORY https://github.com/abseil/abseil-cpp
-  GIT_TAG        ab2e2c4f6062999afaf960759dfccb77f350c702 # 2022-09-15
+  GIT_TAG        7f3c0d781134d25b24e0b55346482a2d366bf59b # 2022-09-30
 )
 set(ABSL_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
 set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
@@ -43,10 +33,20 @@
 FetchContent_MakeAvailable(absl)
 binexport_check_target(absl::core_headers)

+# Googletest (need to come after Abseil due to C++ standard propagation)
+FetchContent_Declare(googletest
+  GIT_REPOSITORY https://github.com/google/googletest.git
+  GIT_TAG        93f08be653c36ddc6943e9513fc14c7292b4d007 # 2022-09-30
+)
+FetchContent_MakeAvailable(googletest)
+binexport_check_target(gtest)
+binexport_check_target(gtest_main)
+binexport_check_target(gmock)
+
 # Protocol Buffers
 FetchContent_Declare(protobuf
   GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
-  GIT_TAG        66ed6dd75b0b5f0d62a9bf90509638f380cbcd7f # 2022-09-15
+  GIT_TAG        488b8b91f81e6f7d50bd5f879ba429d50b0ba901 # 2022-10-01
 )
 set(protobuf_ABSL_PROVIDER "package" CACHE STRING "" FORCE)
 set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
@@ -69,7 +69,7 @@
   else()
     set(_binexport_binaryninjacore_suffix "")
     set(_binexport_binaryninja_git_tag
-        "22c0d1f1f85d9438ece720761060c1011c24b388") # 2022-08-29
+        "727d2be6872c878b5ed49b8dd33c23a6543826f6") # 2022-09-30
   endif()
   FetchContent_Declare(binaryninjaapi
     GIT_REPOSITORY https://github.com/Vector35/binaryninja-api.git


BuildTreeDeps.cmake: Remove minimum cmake required version

--- cmake/BuildTreeDeps.cmake
+++ cmake/BuildTreeDeps.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required( VERSION 2.6 )
-
 # Set the required build unit dependencies based on the chosen CMake options

 if( NOM_BUILD_MATH_UNIT )


Add cuda path to nccl build

Add cuda path to nccl build

Summary:
This was found necessary on some CentOS. aaronmarkham
Closes https://github.com/caffe2/caffe2/pull/240

Differential Revision: D4819591

Pulled By: Yangqing

fbshipit-source-id: 40161cd484a2c8d43f26077919ad2762440dde13

--- cmake/External/nccl.cmake
+++ cmake/External/nccl.cmake
@@ -22,7 +22,8 @@
       SOURCE_DIR ${nccl_PREFIX}
       BUILD_IN_SOURCE 1
       CONFIGURE_COMMAND ""
-      BUILD_COMMAND make "CXX=${CMAKE_CXX_COMPILER}"
+      BUILD_COMMAND
+          make "CXX=${CMAKE_CXX_COMPILER}" "CUDA_HOME=${CUDA_TOOLKIT_ROOT_DIR}"
       INSTALL_COMMAND ""
       )


Fixed issue when the package is called from another directory

--- cmake/FindGengetopt.cmake
+++ cmake/FindGengetopt.cmake
@@ -2,7 +2,7 @@
 # Attempt to find gengetopt. If not found, compile it.
 FIND_PROGRAM(GENGETOPT gengetopt)
 IF (GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
-  ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmake/gengetopt)
+  ADD_SUBDIRECTORY(${CMAKE_CURRENT_LIST_DIR}/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt)
 ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
   ADD_EXECUTABLE(gengetopt IMPORTED)
   SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})


Fixed wrong branch info.

Fixed wrong branch info.

--- cmake/Modules/gmock.cmake
+++ cmake/Modules/gmock.cmake
@@ -1,4 +1,4 @@
-set(GMOCK_DIR "../../../gmock"
+set(GMOCK_DIR "./gmock"
     CACHE PATH "The path to the GoogleMock test framework.")

 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")


Components pre-registration

Components pre-registration

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -32,7 +32,37 @@
     #
     # Do not get fooled by components out of our control
     #
-    SET (CPACK_COMPONENTS_ALL)
+	SET (CPACK_COMPONENTS_ALL)
+    IF (_HAVE_MANPAGECOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Registering ManpageComponent")
+      ENDIF ()
+	  LIST(APPEND CPACK_COMPONENTS_ALL "ManpageComponent")
+    ENDIF ()
+    IF (_HAVE_DYNAMICLIBRARYCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Registering DynamicLibraryComponent")
+      ENDIF ()
+	  LIST(APPEND CPACK_COMPONENTS_ALL "DynamicLibraryComponent")
+    ENDIF ()
+    IF (_HAVE_STATICLIBRARYCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Registering StaticLibraryComponent")
+      ENDIF ()
+	  LIST(APPEND CPACK_COMPONENTS_ALL "StaticLibraryComponent")
+    ENDIF ()
+    IF (_HAVE_HEADERCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Registering HeaderComponent")
+      ENDIF ()
+	  LIST(APPEND CPACK_COMPONENTS_ALL "HeaderComponent")
+    ENDIF ()
+    IF (_HAVE_APPLICATIONCOMPONENT)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-PACK-DEBUG] ... Registering ApplicationComponent")
+      ENDIF ()
+	  LIST(APPEND CPACK_COMPONENTS_ALL "ApplicationComponent")
+    ENDIF ()
     #
     # Include CPack - from now on we will have access to CPACK own macros
     #
@@ -187,8 +217,9 @@
     # In addition documentation is generated using the INSTALL(CODE xxx) hack.
     #
     ADD_CUSTOM_TARGET(pack
-      COMMAND ${CMAKE_MAKE_PROGRAM} man package
+      COMMAND ${CMAKE_MAKE_PROGRAM} package
       COMMENT "Packaging ${PROJECT_NAME}"
+	  DEPENDS man
       VERBATIM
     )
   ENDIF ()


Removed unnecessary MSVC check.

Removed unnecessary MSVC check.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -159,9 +159,9 @@
   else(EIGEN_COVERAGE_TESTING)
     set(COVERAGE_FLAGS "")
   endif(EIGEN_COVERAGE_TESTING)
-  if((EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x) AND NOT MSVC)
+  if(EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-  endif((EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x) AND NOT MSVC)
+  endif(EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x)
   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")


libnd4jwindows

--- cmake/FindOpenBLAS.cmake
+++ cmake/FindOpenBLAS.cmake
@@ -1,3 +1,96 @@
+if(WIN32)
+    if(DEFINED ENV{MINGW_HOME})
+        set(MINGW_HOME ENV{MINGW_HOME})
+        else()
+          message("NO MINGW HOME DEFINED USING C:\\MinGW")
+        set(MINGW_HOME C:/MinGW)
+    endif()
+
+    if(DEFINED ENV{MSYS_HOME})
+        set(MSYS_HOME ENV{MSYS_HOME})
+    else()
+        message("NO MSYS HOME DEFINED USING ${MINGW_HOME}/msys")
+        set(MSYS_HOME ${MINGW_HOME}/msys)
+    endif()
+
+    if(DEFINED ENV{MSYS_HOME})
+        set(MSYS_HOME ENV{MSYS_HOME})
+    else()
+        message("NO MSYS HOME DEFINED USING ${MINGW_HOME}/msys")
+        set(MSYS_HOME ${MINGW_HOME}/msys)
+    endif()
+
+
+    if(DEFINED ENV{MSYS_VERSION})
+        set(MSYS_VERSION ENV{MSYS_VERSION})
+    else()
+        message("NO MSYS VERSION DEFINED USING 1.0")
+        set(MSYS_VERSION 1.0)
+    endif()
+
+
+    if(DEFINED ENV{MSYS_ROOT})
+        set(MSYS_ROOT ENV{MSYS_ROOT})
+    else()
+        message("NO MSYS ROOT DEFINED USING ${MSYS_HOME}/${MSYS_VERSION}")
+        set(MSYS_ROOT ${MSYS_HOME}/${MSYS_VERSION})
+    endif()
+    SET(Open_BLAS_INCLUDE_SEARCH_PATHS
+            ${MSYS_ROOT}/usr/include
+            ${MSYS_ROOT}/usr/include/openblas
+            ${MSYS_ROOT}/usr/include/openblas-base
+            ${MSYS_ROOT}${MSYS_ROOT}/usr/local/include
+            ${MSYS_ROOT}/usr/local/include/openblas
+            ${MSYS_ROOT}/usr/local/include/openblas-base
+            ${MSYS_ROOT}/opt/OpenBLAS/include
+            ${MSYS_ROOT}$ENV{OpenBLAS_HOME}
+            ${MSYS_ROOT}$ENV{OpenBLAS_HOME}/include
+            )
+
+    SET(Open_BLAS_LIB_SEARCH_PATHS
+            ${MSYS_ROOT}/lib/
+            ${MSYS_ROOT}/lib/openblas-base
+            ${MSYS_ROOT}/lib64/
+            ${MSYS_ROOT}/usr/lib
+            ${MSYS_ROOT}/usr/lib/openblas-base
+            ${MSYS_ROOT}/usr/lib64
+            ${MSYS_ROOT}/usr/local/lib
+            ${MSYS_ROOT}/usr/local/lib64
+            ${MSYS_ROOT}/opt/OpenBLAS/lib
+            ${MSYS_ROOT}/$ENV{OpenBLAS}cd
+            ${MSYS_ROOT}/$ENV{OpenBLAS}/lib
+#           ${MSYS_ROOT}/$ENV{OpenBLAS_HOME}
+            ${MSYS_ROOT}/$ENV{OpenBLAS_HOME}/lib
+            )
+    else()
+    SET(Open_BLAS_INCLUDE_SEARCH_PATHS
+            /usr/include
+            /usr/include/openblas
+            /usr/include/openblas-base
+            /usr/local/include
+            /usr/local/include/openblas
+            /usr/local/include/openblas-base
+            /opt/OpenBLAS/include
+            $ENV{OpenBLAS_HOME}
+            $ENV{OpenBLAS_HOME}/include
+            )
+
+    SET(Open_BLAS_LIB_SEARCH_PATHS
+            /lib/
+            /lib/openblas-base
+            /lib64/
+            /usr/lib
+            /usr/lib/openblas-base
+            /usr/lib64
+            /usr/local/lib
+            /usr/local/lib64
+            /opt/OpenBLAS/lib
+            $ENV{OpenBLAS}cd
+            $ENV{OpenBLAS}/lib
+            $ENV{OpenBLAS_HOME}
+            $ENV{OpenBLAS_HOME}/lib
+            )
+endif()
 SET(Open_BLAS_INCLUDE_SEARCH_PATHS
         /usr/include
         /usr/include/openblas


[cmake] improve rpath handling

[cmake] improve rpath handling

--- cmake/SiconosSetup.cmake
+++ cmake/SiconosSetup.cmake
@@ -194,8 +194,11 @@
   # (but later on when installing)
   set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

-  # the RPATH to be used when installing
-  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+  # when building a binary package, it makes no sense to add this rapth
+  if(NOT FORCE_SKIP_RPATH)
+    # the RPATH to be used when installing
+    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+  endif(NOT FORCE_SKIP_RPATH)

   # don't add the automatically determined parts of the RPATH
   # which point to directories outside the build tree to the install RPATH


Add missing dependencies.

Add missing dependencies.

--- cmake/UseDOImageIO.cmake
+++ cmake/UseDOImageIO.cmake
@@ -11,8 +11,8 @@
   get_property(DO_ImageIO_ADDED GLOBAL PROPERTY _DO_ImageIO_INCLUDED)
   if (NOT DO_ImageIO_ADDED)
     do_glob_directory(${DO_SOURCE_DIR}/ImageIO)
-    do_set_internal_dependencies("ImageIO" "easyexif;jpeg;png;tiff;zlib")
     do_create_common_variables("ImageIO")
     do_generate_library("ImageIO")
+    target_link_libraries(DO_ImageIO easyexif jpeg png tiff zlib)
   endif ()
 endif ()


remove extra script

remove extra script

--- cmake/build_shared.cmake
+++ cmake/build_shared.cmake
@@ -38,14 +38,6 @@
   target_link_libraries(${shared_target}
     ${SHARED_TARGET_LINK_LIB_NAMES}
   )
-
-  # target_include_directories(${shared_target}
-  #   PUBLIC
-  #     ${CMAKE_CURRENT_LIST_DIR}
-  #   PRIVATE
-  #     ${FIREBASE_CPP_SDK_DIR}
-  #     ${FIREBASE_UNITY_DIR}
-  # )

   # Update output name
   set_target_properties(${shared_target}