--- Modules/ManageEnvironment.cmake
+++ Modules/ManageEnvironment.cmake
@@ -70,8 +70,20 @@
 IF(NOT DEFINED _MANAGE_ENVIRONMENT_CMAKE_)
     SET(_MANAGE_ENVIRONMENT_CMAKE_ "DEFINED")
     SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
-    CMAKE_POLICY(VERSION 2.6)
+    CMAKE_POLICY(VERSION 2.6.2)
+
+    # Silence the cmake CMP0017 warning for cmake-2.8.4 and later
+    #  Module files located in the the CMake module directory
+    #  are preferred over the files in CMAKE_MODULE_PATH
+    IF(POLICY CMP0017)
+	CMAKE_POLICY(PUSH)
+	CMAKE_POLICY(SET CMP0017 NEW)
+    ENDIF(POLICY CMP0017)
     INCLUDE(ManageMessage)
+    IF(POLICY CMP0017)
+	CMAKE_POLICY(POP)
+    ENDIF(POLICY CMP0017)
+
     M_MSG(${M_INFO1} "CMAKE_HOST_SYSTEM=${CMAKE_HOST_SYSTEM}")
     M_MSG(${M_INFO1} "CMAKE_SYSTEM=${CMAKE_SYSTEM}")


BUG: Removed vtkRenderingParallel from StandAlone.

This was introducing an MPI dependency from the StandAlone group.

Change-Id: I00392390c67fee4242ec8e72567a9b7c2bb3e00d

--- Rendering/Parallel/module.cmake
+++ Rendering/Parallel/module.cmake
@@ -1,6 +1,4 @@
 vtk_module(vtkRenderingParallel
-  GROUPS
-    StandAlone
   DEPENDS
     vtkParallelCore
     vtkFiltersParallel


The new library computes joint initial position with all rotation around X. This calls for a new output.


Update tetgen version. Closes #1240

Update tetgen version. Closes #1240

--- Superbuild/TetgenExternal.cmake
+++ Superbuild/TetgenExternal.cmake
@@ -26,7 +26,7 @@

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
 ExternalProject_Add(Tetgen_external
-  URL "http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz"
+  URL "http://www.tetgen.org/1.5/src/tetgen1.5.1-beta1.tar.gz"
   PATCH_COMMAND ""
   INSTALL_COMMAND ""
   CMAKE_CACHE_ARGS


whoops

whoops

git-svn-id: 45c2c4a2387ab509d51a0462740e0050158f91df@76 10163329-09b4-48c1-bceb-0bacdf617a99

--- src/pito/config.hpp.cmake
+++ src/pito/config.hpp.cmake
@@ -9,7 +9,7 @@
 #define _SHARED_LIB_FILE_EXTENSION_ "@CMAKE_SHARED_LIBRARY_SUFFIX@"
 #cmakedefine APPLE
 #ifdef APPLE
-#define _LD_PRELOAD "DYN_INSERT"
+#define _LD_PRELOAD "DYLD_INSERT_LIBRARIES"
 #else
 #define _LD_PRELOAD "LD_PRELOAD"
 #endif


Added clang version 3.7.

Added clang version 3.7.

--- src/cmake/Modules/FindLibClang.cmake
+++ src/cmake/Modules/FindLibClang.cmake
@@ -14,7 +14,8 @@
 #               Known LLVM release numbers.

 # most recent versions come first
-set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.6.2
+set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.7
+  3.6.2
   3.6.1
   3.6
   3.5.1


ARC: nSIM: fix missing core numbers for mdb-hw runner args

We don't set core numbers for mdb-hw runner for nSIM
board, so it defaults to 1, so mdb-hw runner doesn't work with
SMP boards.

Fix that.

Signed-off-by: Eugeniy Paltsev <ec089b543c2604b626d7ce60c03e4d074ed102c7@synopsys.com>
Signed-off-by: Evgeniy Paltsev <7de4ab8b01334d64e4e84734c688a8a936513edc@gmail.com>

--- boards/arc/nsim/board.cmake
+++ boards/arc/nsim/board.cmake
@@ -12,6 +12,7 @@
 string(REPLACE "nsim" "mdb" MDB_ARGS "${BOARD}.args")
 if((CONFIG_SOC_NSIM_HS_SMP OR CONFIG_SOC_NSIM_HS6X_SMP))
   board_runner_args(mdb-nsim "--cores=${CONFIG_MP_NUM_CPUS}" "--nsim_args=${MDB_ARGS}")
+  board_runner_args(mdb-hw "--cores=${CONFIG_MP_NUM_CPUS}")
 else()
   board_runner_args(mdb-nsim "--nsim_args=${MDB_ARGS}")
 endif()


always define MONGOC_HAVE_SASL_CLIENT_DONE in cmake

--- build/cmake/FindSASL2.cmake
+++ build/cmake/FindSASL2.cmake
@@ -33,4 +33,5 @@
     endif ()
 else ()
     set (SASL2_FOUND 0)
+    set (MONGOC_HAVE_SASL_CLIENT_DONE 0)
 endif ()


Fix email address.

Fix email address.

--- PackageInfo.cmake
+++ PackageInfo.cmake
@@ -15,7 +15,7 @@
 set(CPACK_PACKAGE_NAME "extract-sv-reads${EXE_VERSION_SUFFIX}")
 set(CPACK_PACKAGE_VENDOR "wugc")
 set(CPACK_PACKAGE_VERSION ${FULL_VERSION})
-set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Dave Larson delarson@wustl.edu>")
+set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Dave Larson <delarson@wustl.edu>")
 set(CPACK_SYSTEM_NAME "Linux-${ARCH}")
 set(CPACK_TOPLEVEL_TAG "Linux-${ARCH}")
 set(CPACK_DEBIAN_PACKAGE_PROVIDES "extract-sv-reads")


Standardized the MSCV INSTALL lines between applications and examples

--- CMakeModules/OsgMacroUtils.cmake
+++ CMakeModules/OsgMacroUtils.cmake
@@ -458,8 +458,8 @@
         ELSE(APPLE)
             INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph  )
             IF(MSVC)
-                INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS RelWithDebInfo)
-                INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS Debug)
+                INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS RelWithDebInfo)
+                INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS Debug)
             ENDIF(MSVC)
         ENDIF(APPLE)

@@ -491,8 +491,8 @@
         ELSE(APPLE)
             INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples )
             IF(MSVC)
-                INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS RelWithDebInfo)
-                INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS Debug)
+                INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS RelWithDebInfo)
+                INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS Debug)
             ENDIF(MSVC)
         ENDIF(APPLE)


BUG: enable also optional dependencies at first pass, they may be filtered in 2nd pass

--- CMake/OTBModuleEnablement.cmake
+++ CMake/OTBModuleEnablement.cmake
@@ -158,6 +158,9 @@
   if(NOT ${otb-module}_ENABLED)
     set(${otb-module}_ENABLED 1)
     foreach(dep IN LISTS OTB_MODULE_${otb-module}_DEPENDS)
+      otb_module_enable(${dep} ${otb-module})
+    endforeach()
+    foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
       otb_module_enable(${dep} ${otb-module})
     endforeach()
     if(${otb-module}_TESTED_BY AND (OTB_BUILD_DEFAULT_MODULES OR OTB_BUILD_ALL_MODULES_FOR_TESTS OR Module_${otb-module}))


MatchPoint CmakeLists.txt has unix style line endings now

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -26,9 +26,8 @@
       set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
     else()
       set(download_step
-          URL /home/neher/Downloads/MatchPoint_rev1681_unix-lineendings-cmakelists.tar.gz
-          #URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1681.tar.gz
-          #URL_MD5 fa18c890751a192ac72803d115a1c702
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1681_unix-lineendings-cmakelists.tar.gz
+          URL_MD5 00c7fb2734ba53b9746d7a695d35eb4b
          )
     endif()


Do not set a default FFTW complex precision

The FFTW macro now is able to handle this by itsself.
Thanks to Stefan Helfrich for nailing this down.

--- cmake/BALLConfigTypes.cmake
+++ cmake/BALLConfigTypes.cmake
@@ -62,6 +62,3 @@
 ELSE()
 	MESSAGE(SEND_ERROR "Could not find appropriate numeric type for 32bit int")
 ENDIF()
-
-## The default complex precision
-SET(BALL_COMPLEX_PRECISION float CACHE STRING "The default precision for complex values")


ConfigureChecks: Correct HAVE_SYS_SYS_DOMAIN_H include check

This commit fixes a regression introduced in 37ed748

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -304,7 +304,7 @@
 check_include_files("sys/types.h;sys/kern_control.h" HAVE_SYS_KERN_CONTROL_H)
 check_include_files(sys/sendfile.h HAVE_SYS_SENDFILE_H)
 check_include_files(sys/syscall.h HAVE_SYS_SYSCALL_H)
-check_include_files(sys/domain.h HAVE_SYS_SYS_DOMAIN_H)
+check_include_files(sys/sys_domain.h HAVE_SYS_SYS_DOMAIN_H)
 check_include_files(sys/uio.h HAVE_SYS_UIO_H)
 check_include_files(sys/xattr.h HAVE_SYS_XATTR_H)


Implement HAVE_PROTOTYPES compile platform test

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -959,6 +959,17 @@
   set(volatile 0)
 endif(NOT volatile_WORKS)

+
+# Check for prototypes
+set(check_src ${PROJECT_BINARY_DIR}/have_prototypes.c)
+file(WRITE ${check_src} "int foo(int x) { return 0; } int main() { return foo(10); }")
+python_platform_test(
+  HAVE_PROTOTYPES
+  "Checking for prototypes"
+  ${check_src}
+  DIRECT
+  )
+
 if(HAVE_STDARG_PROTOTYPES)
    set(vaargsHeader "stdarg.h")
 else(HAVE_STDARG_PROTOTYPES)
@@ -1137,7 +1148,6 @@

 # todo
 set(HAVE_UCS4_TCL 0)
-set(HAVE_PROTOTYPES 1)
 set(PTHREAD_SYSTEM_SCHED_SUPPORTED 1)
 set(HAVE_DEVICE_MACROS ${HAVE_MAKEDEV})


Squashed '3rdparty/github/cmake-utils-remote/' changes from 09fb2f1..8923133

8923133 Install of export file bis

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: 89231332a81d1e2fcbc01a191fedeb25d24c80dc

--- cmake/MyPackageExport.cmake
+++ cmake/MyPackageExport.cmake
@@ -11,6 +11,6 @@
     STATIC_DEFINE ${PROJECT_NAME}_STATIC)
   ADD_CUSTOM_TARGET(${PROJECT_NAME}Export SOURCES "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
   INSTALL(FILES ${_file} DESTINATION ${_dir})
-  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION ${PROJECT_NAME})
+  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION include/${PROJECT_NAME}/)

 ENDMACRO()


Don't copy qt4 anymore, if build_apps is diasabled, but the qmake variable still defined

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@1093 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/OpenMeshPackage.cmake
+++ cmake/OpenMeshPackage.cmake
@@ -87,8 +87,8 @@
   # TODO: fillme
   # set (CPACK_NSIS_CONTACT "")

-  # Copy all shared Qt files to build binary dir
-  if ( NOT Q_WS_MAC)
+  # Copy all shared Qt files to build binary dir if we build openmesh with the apps
+  if ( NOT Q_WS_MAC AND BUILD_APPS)
       if (DEFINED QT_QMAKE_EXECUTABLE)
           SET (QTLIBLIST QtCore QtGui)


We prefer to shared BZip2, as we prefer shared boost.

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -33,7 +33,7 @@
 hunter_config(Android-SDK-Tools VERSION 24.3.3)
 hunter_config(Android-Support-Repository VERSION 16)
 hunter_config(Avahi VERSION 0.6.31)
-hunter_config(BZip2 VERSION 1.0.6-p1)
+hunter_config(BZip2 VERSION 1.0.6-p1 CMAKE_ARGS BUILD_SHARED_LIBS=ON )
 hunter_config(Boost VERSION 1.58.0-p1)
 hunter_config(CLAPACK VERSION 3.2.1)
 hunter_config(Clang VERSION 3.6.2)


MinGW: Do not use Qt 5.9

MinGW: Do not use Qt 5.9

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -100,8 +100,9 @@
 hunter_config(Protobuf VERSION 3.0.0-p1)

 string(COMPARE EQUAL "${CMAKE_SYSTEM_NAME}" "Linux" _is_linux)
-if(_is_linux)
+if(_is_linux OR MINGW)
   # qt-qml example is broken on Linux
+  # qt-core example is broken on MinGW
   hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9)
 else()
   hunter_config(Qt VERSION 5.9.1-p0)


update ngraph to v0.27 test=develop (#21677)

--- cmake/external/ngraph.cmake
+++ cmake/external/ngraph.cmake
@@ -17,7 +17,7 @@
 INCLUDE(ExternalProject)

 SET(NGRAPH_PROJECT         "extern_ngraph")
-SET(NGRAPH_GIT_TAG         "e26d602a756f5f83e6c8220f910b61d7089fa951")
+SET(NGRAPH_GIT_TAG         "a9a3ae79012c5193ed4e72ec68cf9860e232a8ec")
 SET(NGRAPH_SOURCES_DIR     ${THIRD_PARTY_PATH}/ngraph)
 SET(NGRAPH_INSTALL_DIR     ${THIRD_PARTY_PATH}/install/ngraph)
 SET(NGRAPH_INC_DIR         ${NGRAPH_INSTALL_DIR}/include)
@@ -57,7 +57,7 @@
     CMAKE_ARGS               -DMKLDNN_INCLUDE_DIR=${MKLDNN_INC_DIR}
     CMAKE_ARGS               -DMKLDNN_LIB_DIR=${MKLDNN_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}
     CMAKE_ARGS               -DMKLML_LIB_DIR=${MKLML_INSTALL_DIR}/lib
-    CMAKE_ARGS               -NGRAPH_USE_LEGACY_MKLDNN=TRUE
+    CMAKE_ARGS               -NGRAPH_USE_LEGACY_MKLDNN=FALSE
 )

 add_library(ngraph INTERFACE)


include kernel_example in "make test"

include kernel_example in "make test"

--- cmake/Tests.cmake
+++ cmake/Tests.cmake
@@ -1 +1,2 @@
-add_test(testall ${CMAKE_CURRENT_BINARY_DIR}/testall)
+add_test(testall        ${CMAKE_CURRENT_BINARY_DIR}/testall)
+add_test(kernel_example ${CMAKE_CURRENT_BINARY_DIR}/kernel_example)


BUG: force usage of the ld gold linker for linux QT5 build in the Superbuild (link errors with ld bfd)

--- SuperBuild/CMake/External_qt5.cmake
+++ SuperBuild/CMake/External_qt5.cmake
@@ -98,7 +98,7 @@
     set(QT5_SB_CONFIG "${QT5_SB_CONFIG} -no-framework")
   else()
       #Linux
-      set(QT5_SB_CONFIG "${QT5_SB_CONFIG} -no-glib -no-fontconfig")
+      set(QT5_SB_CONFIG "${QT5_SB_CONFIG} -linker gold -no-glib -no-fontconfig")
   endif()
   #common for all unix
   set(QT5_SB_CONFIG "${QT5_SB_CONFIG} -no-dbus -no-icu -v")


add new options to disable Gadgetron native Python/MATLAB support

Gadgetron has accepted my PR to introduce 2 new CMake options
BUILD_PYTHON_SUPPORT and BUILD_MATLAB_SUPPORT, so use them
here (default to OFF)

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -52,6 +52,12 @@
     set(MKLROOT_PATH=)
   endif ()
 endif ()
+
+  option(BUILD_GADGETRON_NATIVE_PYTHON_SUPPORT
+    "Build Gadgetron Python gadgets (not required for SIRF)" OFF)
+  option(BUILD_GADGETRON_NATIVE_MATLAB_SUPPORT
+    "Build Gadgetron MATLAB gadgets (not required for SIRF)" OFF)
+
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY ${${proj}_URL}
@@ -59,6 +65,8 @@
     SOURCE_DIR ${SOURCE_DOWNLOAD_CACHE}/${proj}

     CMAKE_ARGS
+        -DBUILD_PYTHON_SUPPORT=${BUILD_GADGETRON_NATIVE_PYTHON_SUPPORT}
+        -DBUILD_MATLAB_SUPPORT=${BUILD_GADGETRON_NATIVE_MATLAB_SUPPORT}
         -DCMAKE_PREFIX_PATH=${SUPERBUILD_INSTALL_DIR}
         -DCMAKE_LIBRARY_PATH=${SUPERBUILD_INSTALL_DIR}/lib
         -DCMAKE_INCLUDE_PATH=${SUPERBUILD_INSTALL_DIR}


chore(cmake/Modules/FindLua): disable TRY_RUN in cross-compilation.

--- src/cmake/Modules/FindLua.cmake
+++ src/cmake/Modules/FindLua.cmake
@@ -118,30 +118,33 @@

 # Print out version number
 if (LUA_FOUND)
-  try_run(LUA_CHECK LUA_CHECK_BUILD
-    ${LEAN_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
-    ${LEAN_SOURCE_DIR}/cmake/Modules/CheckLuaNewstate.cc
-    CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${LUA_INCLUDE_DIR}
-    -DLINK_LIBRARIES=${LUA_LIBRARIES}
-    RUN_OUTPUT_VARIABLE LUA_TRY_OUT)
-  if ("${LUA_CHECK}" MATCHES "0" AND "${LUA_CHECK_BUILD}$" MATCHES "TRUE")
-    message(STATUS "lua_newstate works")
-    set(HAS_LUA_NEWSTATE TRUE)
+  if (CMAKE_CROSSCOMPILING)
+    message(STATUS "Cross-compiling: can't find whether lua_objlen or lua_newstate is available.")
   else()
-    message(STATUS "lua_newstate is not supported by your Lua engine, Lean will not be able to track memory consumed by the Lua engine")
+    try_run(LUA_CHECK LUA_CHECK_BUILD
+      ${LEAN_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
+      ${LEAN_SOURCE_DIR}/cmake/Modules/CheckLuaNewstate.cc
+      CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${LUA_INCLUDE_DIR}
+      -DLINK_LIBRARIES=${LUA_LIBRARIES}
+      RUN_OUTPUT_VARIABLE LUA_TRY_OUT)
+    if ("${LUA_CHECK}" MATCHES "0" AND "${LUA_CHECK_BUILD}$" MATCHES "TRUE")
+      message(STATUS "lua_newstate works")
+      set(HAS_LUA_NEWSTATE TRUE)
+    else()
+      message(STATUS "lua_newstate is not supported by your Lua engine, Lean will not be able to track memory consumed by the Lua engine")
+    endif()
+
+    try_run(LUA_CHECK2 LUA_CHECK_BUILD2
+      ${LEAN_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
+      ${LEAN_SOURCE_DIR}/cmake/Modules/CheckLuaObjlen.cc
+      CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${LUA_INCLUDE_DIR}
+      -DLINK_LIBRARIES=${LUA_LIBRARIES}
+      RUN_OUTPUT_VARIABLE LUA_TRY_OUT)
+    if ("${LUA_CHECK2}" MATCHES "0" AND "${LUA_CHECK_BUILD2}$" MATCHES "TRUE")
+      message(STATUS "lua_objlen found")
+      set(HAS_LUA_OBJLEN TRUE)
+    else()
+      message(STATUS "lua_objlen is not available, using lua_rawlen instead")
+    endif()
   endif()
-
-  try_run(LUA_CHECK2 LUA_CHECK_BUILD2
-    ${LEAN_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
-    ${LEAN_SOURCE_DIR}/cmake/Modules/CheckLuaObjlen.cc
-    CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${LUA_INCLUDE_DIR}
-    -DLINK_LIBRARIES=${LUA_LIBRARIES}
-    RUN_OUTPUT_VARIABLE LUA_TRY_OUT)
-  if ("${LUA_CHECK2}" MATCHES "0" AND "${LUA_CHECK_BUILD2}$" MATCHES "TRUE")
-    message(STATUS "lua_objlen found")
-    set(HAS_LUA_OBJLEN TRUE)
-  else()
-    message(STATUS "lua_objlen is not available, using lua_rawlen instead")
-  endif()
-
 endif ()


define different macros depending on MIC native vs. offload

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -135,39 +135,9 @@
    endif()
 endif()

-if(MIC_NATIVE_FOUND AND MIC_OFFLOAD_FOUND)
+if(MIC_NATIVE_FOUND OR MIC_OFFLOAD_FOUND)
    set(MIC_FOUND true)
-endif()
-
-if(NOT MIC_FOUND)
-   message(WARNING "MIC SDK was not found!")
-else()
-   #set(_mic_cflags "-diag-disable" "191")
-   #set(_mic_cflags "-diag-disable" "913")
-   macro(mic_offload _target)
-      set(_mic_debug)
-      if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
-         set(_mic_debug "-g")
-      endif()
-      add_target_property(${_target} COMPILE_FLAGS "-offload-build -DCAN_OFFLOAD ${_mic_debug}")
-      set(_offload_ldflags "${_mic_debug}")
-      set(_libTargets)
-      foreach(_lib ${ARGN})
-         get_target_property(_tmp "${_lib}" OUTPUT_NAME)
-         if(_tmp)
-            set(_offload_ldflags "${_offload_ldflags} ${_tmp}")
-            set(_libTargets ${_libTargets} "${_arg}")
-         else()
-            get_filename_component(_lpath "${_arg}" PATH)
-            get_filename_component(_lname "${_arg}" NAME)
-            set(_offload_ldflags "${_offload_ldflags} -L${_lpath} -l${_lname}")
-         endif()
-      endforeach()
-      add_target_property(${_target} LINK_FLAGS "-offload-build -offload-ldopts=\"${_offload_ldflags}\" ${_mic_debug}")
-      if(_libTargets)
-         add_dependencies(${_target} ${_libTargets})
-      endif()
-   endmacro()
+
    macro(mic_add_definitions)
       add_definitions(${ARGN})
       foreach(_def ${ARGN})
@@ -185,6 +155,11 @@
       endforeach()
       include_directories(${ARGN})
    endmacro()
+else()
+   message(WARNING "MIC SDK was not found!")
+endif()
+
+if(MIC_NATIVE_FOUND)
    macro(_mic_add_object _target _source _output)
       get_filename_component(_abs "${_source}" ABSOLUTE)
       get_filename_component(_ext "${_source}" EXT)
@@ -380,3 +355,30 @@
       set_target_properties("${_target}" PROPERTIES OUTPUT_NAME "${_exec_output_name}")
    endmacro()
 endif()
+
+if(MIC_OFFLOAD_FOUND)
+   macro(mic_offload _target)
+      set(_mic_debug)
+      if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+         set(_mic_debug "-g")
+      endif()
+      add_target_property(${_target} COMPILE_FLAGS "-offload-build -DCAN_OFFLOAD ${_mic_debug}")
+      set(_offload_ldflags "${_mic_debug}")
+      set(_libTargets)
+      foreach(_lib ${ARGN})
+         get_target_property(_tmp "${_lib}" OUTPUT_NAME)
+         if(_tmp)
+            set(_offload_ldflags "${_offload_ldflags} ${_tmp}")
+            set(_libTargets ${_libTargets} "${_arg}")
+         else()
+            get_filename_component(_lpath "${_arg}" PATH)
+            get_filename_component(_lname "${_arg}" NAME)
+            set(_offload_ldflags "${_offload_ldflags} -L${_lpath} -l${_lname}")
+         endif()
+      endforeach()
+      add_target_property(${_target} LINK_FLAGS "-offload-build -offload-ldopts=\"${_offload_ldflags}\" ${_mic_debug}")
+      if(_libTargets)
+         add_dependencies(${_target} ${_libTargets})
+      endif()
+   endmacro()
+endif()


[cmake] allow cmake to find nix libs named nix and libnix

--- cmake/FindNIX.cmake
+++ cmake/FindNIX.cmake
@@ -14,14 +14,13 @@
   endif()
 endif()

-
 find_path(NIX_INCLUDE_DIR nix.hpp
   HINTS /usr/local/include
   /usr/include
   $ENV{NIX_ROOT}/include
   PATH_SUFFIXES nix)

-find_library(NIX_LIBRARY NAMES nix libnix
+find_library(NIX_LIBRARY NAMES nix libnix nixio libnixio
   HINTS $ENV{NIX_ROOT}/build/Release
   HINTS $ENV{NIX_BUILD_DIR}
   HINTS ${NIX_INCLUDE_DIR}/../lib


FIX: Replace static libs check via system warning

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -101,23 +101,16 @@

   # First get the file names of the libraries to be merged
   foreach(lib ${libs})
-    get_target_property(libtype ${lib} TYPE)
-    if(NOT libtype STREQUAL "STATIC_LIBRARY")
-      message(FATAL_ERROR "merge_static_libs can only process static libraries")
-    endif()
     set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
   endforeach()

   if(APPLE) # Use OSX's libtool to merge archives
-    add_custom_target(${TARGET_NAME}_archive
-      COMMAND libtool -static -o "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a" ${libfiles}
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-      DEPENDS ${libs}
-      )
-    add_library(${TARGET_NAME} STATIC IMPORTED GLOBAL)
-    set_property(TARGET ${TARGET_NAME} PROPERTY
-      IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a")
-    add_dependencies(${TARGET_NAME} ${TARGET_NAME}_archive)
+    set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_dummy.c)
+    file(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
+    add_library(${TARGET_NAME} STATIC ${dummyfile})
+		add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
+      COMMAND rm "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a"
+      COMMAND /usr/bin/libtool -static -o "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a" ${libfiles})
 	else() # general UNIX: use "ar" to extract objects and re-add to a common lib
     foreach(lib ${libs})
       set(objlistfile ${lib}.objlist) # list of objects in the input library


fix for gsFetch (initialize submodule only once) (#240)

--- cmake/gsFetch.cmake
+++ cmake/gsFetch.cmake
@@ -85,12 +85,16 @@
     #  set(git_repo https://github.com/gismo/${ARGV0}.git)
     #endif()
     # gismo_fetch_directory(${ARGN} GIT_REPOSITORY  ${git_repo})
-    find_package(Git REQUIRED)
-    execute_process(COMMAND "${GIT_EXECUTABLE}" "submodule" "update" "--init" "extensions/${ARGV0}"
-      WORKING_DIRECTORY ${gismo_SOURCE_DIR}
-      #RESULT_VARIABLE gresult
-      #OUTPUT_QUIET
-      )
+
+    if(NOT EXISTS "${gismo_SOURCE_DIR}/extensions/${ARGV0}/CMakeLists.txt")
+      message(STATUS "Initializing remote submodule ${ARGV0}")
+      find_package(Git REQUIRED)
+      execute_process(COMMAND "${GIT_EXECUTABLE}" "submodule" "update" "--init" "extensions/${ARGV0}"
+        WORKING_DIRECTORY ${gismo_SOURCE_DIR}
+        #RESULT_VARIABLE gresult
+        #OUTPUT_QUIET
+        )
+    endif()
   elseif("x${GISMO_REPO}" STREQUAL "xsvn")
     #if("x${GISMO_FETCH_PROT}" STREQUAL "xssh") message(ERROR "GitHub does not support svn+ssh") endif()
     gismo_fetch_directory(${ARGN}


It seems the most of debian package deps are not needed.

Becasue of extern package.

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -10,7 +10,7 @@
 set(CPACK_DEBIAN_PACKAGE_MAINTAINER PaddlePaddle Dev <paddle-dev@baidu.com>)
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Paddle")
 set(CPACK_PACKAGE_DESCRIPTION "")
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "libatlas3-base, libgflags2, libgoogle-glog0, libprotobuf8, libpython2.7, libstdc++6, python-numpy, python-pip, python-pip-whl, python-protobuf, curl")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython2.7, libstdc++6, python-pip, curl")
 set(CPACK_DEBIAN_PACKAGE_SECTION Devel)
 set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJ_ROOT}/paddle/scripts/deb/postinst")
 #set(CPACK_GENERATOR "DEB")


Strip symbols for packages

Strip symbols for packages

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -73,7 +73,7 @@
 SET(CPACK_PACKAGE_FILE_NAME "ospray-${OSPRAY_VERSION}")
 #SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/ospray-doc/images/icon.png)
 #SET(CPACK_PACKAGE_RELOCATABLE TRUE)
-#SET(CPACK_STRIP_FILES TRUE) # keep symbols, useful for bug reports?
+SET(CPACK_STRIP_FILES TRUE)

 SET(CPACK_PACKAGE_VERSION_MAJOR ${OSPRAY_VERSION_MAJOR})
 SET(CPACK_PACKAGE_VERSION_MINOR ${OSPRAY_VERSION_MINOR})


Fix for CONC-494:

Fix for CONC-494:

Install all symlinks for shared and static libraries in
component Development instead of SharedLibraries.

--- cmake/symlink.cmake
+++ cmake/symlink.cmake
@@ -30,6 +30,6 @@

   # presumably this will be used for libmysql*.so symlinks
   INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${symlink_name} DESTINATION ${install_path}
-          COMPONENT SharedLibraries)
+          COMPONENT Development)
 ENDIF()
 ENDMACRO()


install target

install target

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -21,3 +21,6 @@
 add_library(abi STATIC ${LIBRARY_SOURCES})

 CopyHeaders()
+
+install(DIRECTORY ${PROJECT_BINARY_DIR}/include/abi DESTINATION include)
+install (TARGETS abi ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)


Updated lua macros

Updated lua macros

--- cmake/lua.cmake
+++ cmake/lua.cmake
@@ -54,11 +54,13 @@
         DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_name}
     )
     # Install with run permissions
-    install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${_name} DESTINATION ${INSTALL_BIN} )
+    install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${_name} DESTINATION ${INSTALL_BIN} COMPONENT Runtime)
   else()
     # Add .lua suffix and install as is
     install ( PROGRAMS ${_source} DESTINATION ${INSTALL_BIN}
-            RENAME ${_source_name}.lua )
+            RENAME ${_source_name}.lua
+            COMPONENT Runtime
+    )
   endif()
 endmacro ()

@@ -102,7 +104,9 @@

     if ( ${is_install} )
       install ( FILES ${_first_source} DESTINATION ${INSTALL_LMOD}/${_module_dir}
-                RENAME ${_module_filename} )
+                RENAME ${_module_filename}
+                COMPONENT Runtime
+      )
     endif ()
   else ()  # Lua C binary module
     enable_language ( C )
@@ -123,7 +127,7 @@
     set_target_properties ( ${_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY
                 "${_module_dir}" PREFIX "" OUTPUT_NAME "${_module_filenamebase}" )
     if ( ${is_install} )
-      install ( TARGETS ${_target} DESTINATION ${INSTALL_CMOD}/${_module_dir})
+      install ( TARGETS ${_target} DESTINATION ${INSTALL_CMOD}/${_module_dir} COMPONENT Runtime)
     endif ()
   endif ()
 endmacro ()


Changed configuration to use vpm_include_directories

--- configure.cmake
+++ configure.cmake
@@ -3,4 +3,4 @@

 vpm_depend(crunch_base)

-include_directories(${CMAKE_CURRENT_LIST_DIR}/include)+vpm_include_directories(${CMAKE_CURRENT_LIST_DIR}/include)


Updated the emscripten toolchain for new WebAssembly flags

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -126,9 +126,9 @@
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s ASSERTIONS=0")

 if (FIPS_EMSCRIPTEN_USE_WASM)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s BINARYEN=1 -s 'BINARYEN_METHOD=\"native-wasm\"' -s 'BINARYEN_SCRIPTS=\"spidermonkify.py\"' -s GLOBAL_BASE=1000 -s ALIASING_FUNCTION_POINTERS=0")
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm\"'")
 elseif(FIPS_EMSCRIPTEN_USE_WASM_ASMJS)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s BINARYEN=1 -s 'BINARYEN_METHOD=\"native-wasm,asmjs\"' -s 'BINARYEN_SCRIPTS=\"spidermonkify.py\"' -s GLOBAL_BASE=1000 -s ALIASING_FUNCTION_POINTERS=0")
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm,asmjs\"'")
 endif()
 set(EMSCRIPTEN_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")


Update FW

Update FW

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "f480b8f4c161ccda18d78f147a2dc210851bea65")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "127b920c32b208d5c49c604158358433bc7db2d7")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Add MSVC specific compilation flags

Add MSVC specific compilation flags

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -638,7 +638,11 @@
   endif()

   set(CLING_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/interpreter/cling/include)
-  set(CLING_CXXFLAGS "-fvisibility-inlines-hidden -fno-strict-aliasing -Wno-unused-parameter -Wwrite-strings -Wno-long-long -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS")
+  if(MSVC)
+    set(CLING_CXXFLAGS "-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DNOMINMAX")
+  else()
+    set(CLING_CXXFLAGS "-fvisibility-inlines-hidden -fno-strict-aliasing -Wno-unused-parameter -Wwrite-strings -Wno-long-long -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS")
+  endif()
   if (CMAKE_COMPILER_IS_GNUCXX)
     set(CLING_CXXFLAGS "${CLING_CXXFLAGS} -Wno-missing-field-initializers")
   endif()


Use -DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON also for building CLING

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -679,6 +679,7 @@
     INSTALL_DIR ${CMAKE_BINARY_DIR}/CLING-install
     CMAKE_ARGS -DCLING_PATH_TO_LLVM_SOURCE=${CMAKE_SOURCE_DIR}/interpreter/llvm/src
                -DCLING_PATH_TO_LLVM_BUILD=${CMAKE_BINARY_DIR}/LLVM-install
+               -DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON
                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
                -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}


Use the source tarfile for the built in Davix instead of the GIT branch.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -770,11 +770,8 @@
     ExternalProject_Add(
       DAVIX
       PREFIX DAVIX
-      #URL http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/davix/davix-embedded-${DAVIX_VERSION}.tar.gz
-      GIT_REPOSITORY http://git.cern.ch/pub/davix  GIT_TAG 0_3_0_branch
-      UPDATE_COMMAND git submodule update --recursive
+      URL http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/davix/davix-embedded-${DAVIX_VERSION}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}/DAVIX-install
-      #PATCH_COMMAND patch -p1 -i ${CMAKE_SOURCE_DIR}/cmake/patches/davix-${DAVIX_VERSION}.patch
       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
                  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                  -DBOOST_EXTERNAL=OFF
@@ -788,7 +785,6 @@
                  -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
                  -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
     )
-    #--TODO we need to install the dynamic library or build the static (which currently fails)
     if(${SYSCTL_OUTPUT} MATCHES x86_64)
       set(_LIBDIR "lib64")
     else()


Remove fake targets for system/unresolved libs to fix dependancies. (#102)

--- cmake/bde_external_dependencies.cmake
+++ cmake/bde_external_dependencies.cmake
@@ -133,7 +133,6 @@
                 NAMES
                     lib${depName}.${bde_install_ufid}${CMAKE_STATIC_LIBRARY_SUFFIX}
                     lib${depName}${CMAKE_STATIC_LIBRARY_SUFFIX}
-
                     ${searchHints}
             )

@@ -153,7 +152,6 @@
                     PROPERTY
                     IMPORTED_LOCATION "${rawLib_${depName}}"
                 )
-
             endif()
             break()
         endif()
@@ -250,12 +248,9 @@
                 continue()
             endif()

-            # The external dependancy is not found. Creating fake target to stop lookup.
+            # The external dependancy is not found.
             # Unresolved dependencies will be added as-is with '-l' flag to the link line.
             message(STATUS  "Not found (raw) external dependency '${depName}'")
-            bde_log(VERY_VERBOSE "Adding ${depName} as IMPORTED INTERFACE library")
-            add_library(${depName} INTERFACE IMPORTED)
-            target_link_options(${depName} INTERFACE "-l${depName}")
         endforeach()
     endwhile()
 endfunction()


Disable MSVC's warning about noreturn destructors

This warning fires on:
  Operator::~Operator() {
    llvm_unreachable("should never destroy an Operator");
  }

That seems like a false positive.  I don't see any good way to silence
the warning here, so I'm disabling it.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -169,6 +169,7 @@
     -wd4551 # Suppress 'function call missing argument list'
     -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible'
     -wd4715 # Suppress ''function' : not all control paths return a value'
+    -wd4722 # Suppress ''function' : destructor never returns, potential memory leak'
     -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)'

     # Promoted warnings.


Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -168,10 +168,8 @@
     # Disabled warnings.
     -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
     -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
-    -wd4181 # Suppress 'qualifier applied to reference type; ignored'
     -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
     -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data'
-    -wd4275 # Suppress 'An exported class was derived from a class that was not exported.'
     -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'
     -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized'
     -wd4355 # Suppress ''this' : used in base member initializer list'


BUG: add openmp flags if shark uses it too

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -41,9 +41,11 @@

 endif() #if(Shark_DIR)

-find_path( SHARK_INCLUDE_DIR shark/Core/Shark.h
+find_path( SHARK_INCLUDE_DIR
+  NAMES shark/Core/Shark.h
   PATHS "${SHARK_SEARCH_PATH}"
-  PATH_SUFFIXES include include/shark shark)
+  PATH_SUFFIXES include include/sharkxx sharkxx
+  )

 find_library( SHARK_LIBRARY
   NAMES shark shark_debug
@@ -51,22 +53,37 @@
   PATH_SUFFIXES lib
   )

-mark_as_advanced( SHARK_INCLUDE_DIR
-                  SHARK_LIBRARY )
-find_package(
-	Boost 1.48.0 REQUIRED QUIET COMPONENTS
+mark_as_advanced( SHARK_INCLUDE_DIR  SHARK_LIBRARY )
+
+find_package( Boost 1.48.0 REQUIRED QUIET COMPONENTS
 	system date_time filesystem
 	program_options serialization thread
 	unit_test_framework
-)
+	)

 if(NOT Boost_FOUND)
   message(FATAL_ERROR "Please make sure Boost 1.48.0 is installed on your system")
 endif()

+if(NOT SHARK_LIBRARY)
+  message(FATAL_ERROR "Cannot find SHARK_LIBRARY. set it with cmake -DSHARK_LIBRARY=")
+  return()
+endif()
+
+if(NOT SHARK_INCLUDE_DIR)
+  message(FATAL_ERROR "Cannot find SHARK_INCLUDE_DIR. Set it with cmake -DSHARK_INCLUDE_DIR=")
+  return()
+endif()
+
+get_filename_component(SHARK_INSTALLDIR ${SHARK_LIBRARY} PATH)
+get_filename_component(SHARK_INSTALLDIR ${SHARK_INSTALLDIR} PATH)
+
 if(NOT SHARK_CONFIG_FILE)
-  find_file(SHARK_CONFIG_FILE SharkConfig.cmake PATH_SUFFIXES lib/cmake/Shark share/Shark)
+  find_file(SHARK_CONFIG_FILE SharkConfig.cmake
+    PATHS ${SHARK_INSTALLDIR}
+    PATH_SUFFIXES lib/cmake/Shark share/Shark cmake/Shark)
 endif()
+
 if(SHARK_CONFIG_FILE)
   file(STRINGS "${SHARK_CONFIG_FILE}" SHARK_CONFIG_FILE_CONTENTS)
   string(REGEX REPLACE
@@ -81,13 +98,42 @@

   set(SHARK_VERSION_STRING
   "${SHARK_VERSION_MAJOR}.${SHARK_VERSION_MINOR}.${SHARK_VERSION_PATCH}")
-
 endif()

+set(SHARK_USE_OPENMP_matched)
+#define SHARK_USE_OPENMP
+file(STRINGS "${SHARK_INSTALLDIR}/include/shark/Core/Shark.h" SHARK_H_CONTENTS)
+string(REGEX MATCH
+  "#define.SHARK_USE_OPENMP"
+  SHARK_USE_OPENMP_matched "${SHARK_H_CONTENTS}")
+
+#this variable is added in cache but not used now
+# you can use it to see if shark installation has openMP
+# later if needed in other places..
+set(SHARK_USE_OPENMP FALSE CACHE BOOL "shark is built with OpenMP")
+if(SHARK_USE_OPENMP_matched)
+  set(SHARK_USE_OPENMP TRUE CACHE BOOL "shark is built with OpenMP" FORCE)
+endif()
+
+if(SHARK_USE_OPENMP)
+  message(STATUS "Shark is built with OpenMP: SHARK_USE_OPENMP = TRUE")
+  find_package(OpenMP REQUIRED QUIET)
+  if(OPENMP_FOUND)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+  else()
+    message(FATAL_ERROR "Your shark libraries are compiled with it OpenMP")
+    set(SHARK_FOUND FALSE)
+  endif()
+else()
+  message(STATUS "Shark is built without OpenMP: SHARK_USE_OPENMP = FALSE")
+endif()
 INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
-                                  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
-                                  VERSION_VAR SHARK_VERSION_STRING)
+  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
+  VERSION_VAR SHARK_VERSION_STRING)
+
 if(SHARK_FOUND)
   set(SHARK_INCLUDE_DIRS ${SHARK_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
   set(SHARK_LIBRARIES ${SHARK_LIBRARY} ${Boost_LIBRARIES} )


Put core's files within the build directory rather than the source directory. (#225)

This avoids poluting the source directory when doing an out of source build.

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -80,7 +80,7 @@
     set(core_tarball_name "${core_basename}-${core_version}.tar.${core_compression}")
     set(core_url "https://static.realm.io/downloads/core/${core_tarball_name}")
     set(core_temp_tarball "/tmp/${core_tarball_name}")
-    set(core_directory_parent "${CMAKE_CURRENT_SOURCE_DIR}${CMAKE_FILES_DIRECTORY}")
+    set(core_directory_parent "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}")
     set(core_directory "${core_directory_parent}/${core_basename}-${core_version}")
     set(core_tarball "${core_directory_parent}/${core_tarball_name}")

@@ -155,7 +155,7 @@
 endmacro()

 function(clone_and_build_realm_core branch)
-    set(core_prefix_directory "${CMAKE_CURRENT_SOURCE_DIR}${CMAKE_FILES_DIRECTORY}/realm-core")
+    set(core_prefix_directory "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/realm-core")
     ExternalProject_Add(realm-core
         GIT_REPOSITORY "https://github.com/realm/realm-core.git"
         GIT_TAG ${branch}
@@ -175,7 +175,7 @@
     get_filename_component(core_directory ${core_directory} ABSOLUTE)
     ExternalProject_Add(realm-core
         URL ""
-        PREFIX ${CMAKE_CURRENT_SOURCE_DIR}${CMAKE_FILES_DIRECTORY}/realm-core
+        PREFIX ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/realm-core
         SOURCE_DIR ${core_directory}
         BUILD_IN_SOURCE 1
         BUILD_ALWAYS 1
@@ -193,7 +193,7 @@
     ExternalProject_Add(realm-sync-lib
         DEPENDS realm-core
         URL ""
-        PREFIX ${CMAKE_CURRENT_SOURCE_DIR}${CMAKE_FILES_DIRECTORY}/realm-sync
+        PREFIX ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/realm-sync
         SOURCE_DIR ${sync_directory}
         BUILD_IN_SOURCE 1
         BUILD_ALWAYS 1
@@ -226,7 +226,7 @@
     ExternalProject_Add(realm-server-lib
         DEPENDS realm-core
         DOWNLOAD_COMMAND ""
-        PREFIX ${CMAKE_CURRENT_SOURCE_DIR}${CMAKE_FILES_DIRECTORY}/realm-sync
+        PREFIX ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/realm-sync
         SOURCE_DIR ${sync_directory}
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""


FIX: retain installation on lib dir for Debian based distros otherwise it breaks Travis CI

--- CMakeLists.unix.cmake
+++ CMakeLists.unix.cmake
@@ -11,6 +11,10 @@
 		set(APP_BUILD_PLATFORM_NAME "i686")
 		set(CPP_LIBRARY_DIR "lib")
 	endif (CMAKE_SIZEOF_VOID_P EQUAL 8)
+
+	if(EXISTS "/etc/debian_version")
+			set(CPP_LIBRARY_DIR "lib")
+	endif(EXISTS "/etc/debian_version")

 else (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
 	message(STATUS "Compiling for " ${CMAKE_SYSTEM_NAME} "")


FIX: use service prefix, not install prefix for the system configuration files

--- CMakeLists.unix.cmake
+++ CMakeLists.unix.cmake
@@ -105,7 +105,7 @@

 		install(FILES
 			${CMAKE_BINARY_DIR}/etc/init.d/${SERVICE_NAME}/${SERVICE_NAME}
-			DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/init.d/
+			DESTINATION ${SERVICE_INSTALL_PREFIX}/etc/init.d/
 			PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
 		)


runner: Forward C and CXX compilers

runner: Forward C and CXX compilers

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -289,6 +289,8 @@
          "set (CMAKE_GENERATOR \"${CMAKE_GENERATOR}\")\n"
          "set (CMAKE_C_COMPILER_ID \"${CMAKE_C_COMPILER_ID}\")\n"
          "set (CMAKE_CXX_COMPILER_ID \"${CMAKE_CXX_COMPILER_ID}\")\n"
+         "set (CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")\n"
+         "set (CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")\n"
          "set (CMAKE_C_COMPILER_VERSION \"${CMAKE_C_COMPILER_VERSION}\")\n"
          "set (CMAKE_CXX_COMPILER_VERSION \"${CMAKE_CXX_COMPILER_VERSION}\")\n"
          "set (CMAKE_UNIT_INVOKING_BINARY_DIR\n"


Polished OpenBLAS find

Polished OpenBLAS find

Former-commit-id: db6c408ea9a849c4b70c8c5b4705a249b389f026


Remove pointless CMake version requirement

--- cmake/Plugin.cmake
+++ cmake/Plugin.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 2.8.6)
-
 function(add_plugin name)
   add_library(${name} MODULE ${ARGN})


Add option USE_LOCKING for single-threaded build with locking support

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -136,6 +136,10 @@

 if (USE_THREAD)
   message(STATUS "Multi-threading enabled with ${NUM_THREADS} threads.")
+else()
+  if (${USE_LOCKING})
+    set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_LOCKING")
+  endif ()
 endif ()

 include("${PROJECT_SOURCE_DIR}/cmake/prebuild.cmake")


NO-JIRA: Mark FIXME items as TODO

NO-JIRA: Mark FIXME items as TODO

--- tests/runtime_check.cmake
+++ tests/runtime_check.cmake
@@ -85,13 +85,13 @@
   assert_has_valgrind()
   message(STATUS "Runtime memory checker: valgrind memcheck")
   set(TEST_EXE_PREFIX "${VALGRIND_EXECUTABLE} --tool=memcheck --leak-check=full ${VALGRIND_COMMON_ARGS}")
-  # FIXME aconway 2018-09-06: NO TEST_WRAP_PREFIX, need --trace-children + many suppressions
+  # TODO aconway 2018-09-06: NO TEST_WRAP_PREFIX, need --trace-children + many suppressions

 elseif(RUNTIME_CHECK STREQUAL "helgrind")
   assert_has_valgrind()
   message(STATUS "Runtime race checker: valgrind helgrind")
   set(TEST_EXE_PREFIX "${VALGRIND_EXECUTABLE} --tool=helgrind ${VALGRIND_COMMON_ARGS}")
-  # FIXME aconway 2018-09-06: NO TEST_WRAP_PREFIX, need --trace-children + many suppressions
+  # TODO aconway 2018-09-06: NO TEST_WRAP_PREFIX, need --trace-children + many suppressions

 elseif(RUNTIME_CHECK STREQUAL "asan")
   assert_has_sanitizers()


IMP-7. Cmake should use the 32-bit version of libhdfs on 32 bit machines

--- be/cmake_modules/FindHDFS.cmake
+++ be/cmake_modules/FindHDFS.cmake
@@ -13,9 +13,23 @@
   $ENV{HADOOP_HOME}/src/c++/libhdfs
 )

-set(HDFS_LIB_PATHS
-  $ENV{HADOOP_HOME}/c++/Linux-amd64-64/lib
-)
+if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
+  set(arch_hint "x64")
+elseif ("$ENV{LIB}" MATCHES "(amd64|ia64)")
+  set(arch_hint "x64")
+else ()
+  set(arch_hint "x86")
+endif()
+
+message(STATUS "Architecture: ${arch_hint}")
+
+if ("${arch_hint}" STREQUAL "x64")
+  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/c++/Linux-amd64-64/lib)
+else ()
+  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/c++/Linux-i386-32/lib)
+endif ()
+
+message(STATUS "HDFS_LIB_PATHS: ${HDFS_LIB_PATHS}")

 find_library(HDFS_LIB NAMES hdfs PATHS ${HDFS_LIB_PATHS})

@@ -29,6 +43,8 @@
 if (HDFS_FOUND)
   if (NOT HDFS_FIND_QUIETLY)
     message(STATUS "${Hadoop_VERSION}")
+    message(STATUS "HDFS_INCLUDE_DIR: ${HDFS_INCLUDE_DIR}")
+    message(STATUS "HDFS_LIBS: ${HDFS_LIBS}")
   endif ()
 else ()
   message(STATUS "HDFS includes and libraries NOT found."


cmake: Add system specific information for Rocky Linux 8.

Signed-off-by: Oliver Freyermuth <297815a44ac0d229e08a814adf0f210787d04d87@googlemail.com>

--- build/cmake/macros/SystemSpecificInformations.cmake
+++ build/cmake/macros/SystemSpecificInformations.cmake
@@ -150,6 +150,15 @@
 	set(SYSTEM_NAME "centos${CMAKE_MATCH_1}")
 	set(RPM_SYSTEM_NAME "${SYSTEM_NAME}")
       endif(LINUX_ISSUE MATCHES "CentOS")
+      # Rocky case
+      # Rocky Linux release 8.4 (Green Obsidian)
+      if(LINUX_ISSUE MATCHES "Rocky Linux")
+	string(REGEX MATCH "release ([0-9]+\\.*[0-9]*)" ROCKY "${LINUX_ISSUE}")
+        set(LINUX_NAME "Rocky")
+	set(LINUX_VER "${CMAKE_MATCH_1}")
+	set(SYSTEM_NAME "rocky${CMAKE_MATCH_1}")
+	set(RPM_SYSTEM_NAME "${SYSTEM_NAME}")
+      endif(LINUX_ISSUE MATCHES "Rocky Linux")
       # Redhat case
       # Red Hat Enterprise Linux Server release 5 (Tikanga)
       if(LINUX_ISSUE MATCHES "Red Hat")


iOS: Changing deployment target to 4.3 (no supp. for armv6 needed)

--- client/iOS/iFreeRDP.xcodeproj/project.pbxproj.cmake
+++ client/iOS/iFreeRDP.xcodeproj/project.pbxproj.cmake
@@ -751,7 +751,7 @@
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
 				ONLY_ACTIVE_ARCH = YES;
 				PROVISIONING_PROFILE = "";
 				SDKROOT = iphoneos;
@@ -775,7 +775,7 @@
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
 				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
 				PROVISIONING_PROFILE = "";
 				SDKROOT = iphoneos;
@@ -798,7 +798,7 @@
 					"\"@FREERDP_IOS_EXTERNAL_SSL_PATH@/include\"",
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/iFreeRDP.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
 				LIBRARY_SEARCH_PATHS = (
 					"\"$(SRCROOT)/../../libfreerdp\"",
 					"\"$(SRCROOT)/../../winpr/libwinpr\"",
@@ -824,7 +824,7 @@
 					"\"@FREERDP_IOS_EXTERNAL_SSL_PATH@/include\"",
 				);
 				INFOPLIST_FILE = "$(SRCROOT)/iFreeRDP.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
 				LIBRARY_SEARCH_PATHS = (
 					"\"$(SRCROOT)/../../libfreerdp\"",
 					"\"$(SRCROOT)/../../winpr/libwinpr\"",


Output a message if collada is missing.

Output a message if collada is missing.

--- build/modules/FindOpenCOLLADA.cmake
+++ build/modules/FindOpenCOLLADA.cmake
@@ -93,5 +93,7 @@
 ELSE()
     IF(OpenCOLLADA_FIND_REQUIRED)
         MESSAGE(FATAL_ERROR "OpenCOLLADA not found")
+    ELSE()
+        MESSAGE("OpenCOLLADA not found")
     ENDIF()
 ENDIF()


Relax the constraint of installed openblas from version==0.3.7 to >=0.3.7 (#33626)

--- cmake/cblas.cmake
+++ cmake/cblas.cmake
@@ -73,7 +73,7 @@
     string(REGEX MATCH "OpenBLAS ([0-9]+\.[0-9]+\.[0-9]+)" tmp ${config_file})
     string(REGEX MATCH "([0-9]+\.[0-9]+\.[0-9]+)" ver ${tmp})

-    if (${ver} VERSION_EQUAL "0.3.7")
+    if (${ver} VERSION_GREATER_EQUAL "0.3.7")
       set(CBLAS_PROVIDER OPENBLAS)
       set(CBLAS_INC_DIR ${OPENBLAS_INC_DIR} ${OPENBLAS_LAPACKE_INC_DIR})
       set(CBLAS_LIBRARIES ${OPENBLAS_LIB})


changes to support Intel MKL

changes to support Intel MKL

--- cmake/win32.cmake
+++ cmake/win32.cmake
@@ -33,16 +33,27 @@
 IF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
 # 32 bit
 SET (THIRDPARTY c:/build/devsim_external)
-SET (BLAS_ARCHIVE
-${THIRDPARTY}/CLAPACK/lib/lapack.lib
-${THIRDPARTY}/CLAPACK/lib/blas.lib
-${THIRDPARTY}/CLAPACK/lib/libf2c.lib
+SET(MKL_DIR
+"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.0.110/windows/mkl/lib/ia32_win"
 )
+SET(INTEL_MKL_LINK
+${MKL_DIR}/mkl_intel_lp64.lib
+${MKL_DIR}/mkl_core.lib
+${MKL_DIR}/mkl_sequential.lib
+)
+SET (BLAS_ARCHIVE
+${INTEL_MKL_LINK}
+)
+#SET (BLAS_ARCHIVE
+#${THIRDPARTY}/CLAPACK64/lib/lapack.lib
+#${THIRDPARTY}/CLAPACK64/lib/blas.lib
+#${THIRDPARTY}/CLAPACK64/lib/libf2c.lib
+#)

 SET (CGNS_ARCHIVE ${THIRDPARTY}/cgnslib/lib/cgns.lib)
 SET (CGNS_INCLUDE ${THIRDPARTY}/cgnslib/include)
-SET (PYTHON_ARCHIVE C:/Python27/libs/python27.lib)
-SET (PYTHON_INCLUDE C:/Python27/include)
+SET (PYTHON_ARCHIVE C:/Anaconda/libs/python27.lib)
+SET (PYTHON_INCLUDE C:/Anaconda/include)
 SET (SQLITE3_ARCHIVE "${THIRDPARTY}/sqlite-amalgamation-3080600/build/Release/sqlite3.lib")
 SET (SQLITE3_INCLUDE "${THIRDPARTY}/sqlite-amalgamation-3080600")
 SET (SUPERLULOCATE  ${THIRDPARTY}/SuperLU_4.3)
@@ -58,27 +69,38 @@

 ELSE (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
 # 64 bit
-SET (THIRDPARTY c:/build/devsim_external)
-SET (BLAS_ARCHIVE
-${THIRDPARTY}/CLAPACK64/lib/lapack.lib
-${THIRDPARTY}/CLAPACK64/lib/blas.lib
-${THIRDPARTY}/CLAPACK64/lib/libf2c.lib
+SET (THIRDPARTY c:/cygwin/home/jsanchez/git/devsim_external)
+SET(MKL_DIR
+"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.0.110/windows/mkl/lib/intel64_win"
 )
+SET(INTEL_MKL_LINK
+${MKL_DIR}/mkl_intel_lp64.lib
+${MKL_DIR}/mkl_core.lib
+${MKL_DIR}/mkl_sequential.lib
+)
+SET (BLAS_ARCHIVE
+${INTEL_MKL_LINK}
+)
+#SET (BLAS_ARCHIVE
+#${THIRDPARTY}/CLAPACK64/lib/lapack.lib
+#${THIRDPARTY}/CLAPACK64/lib/blas.lib
+#${THIRDPARTY}/CLAPACK64/lib/libf2c.lib
+#)

 SET (CGNS_ARCHIVE ${THIRDPARTY}/cgnslib64/lib/cgns.lib)
 SET (CGNS_INCLUDE ${THIRDPARTY}/cgnslib64/include)
-SET (PYTHON_ARCHIVE C:/Python27_win64/libs/python27.lib)
-SET (PYTHON_INCLUDE C:/Python27_win64/include)
+SET (PYTHON_ARCHIVE C:/Anaconda/libs/python27.lib)
+SET (PYTHON_INCLUDE C:/Anaconda/include)
 SET (SQLITE3_ARCHIVE "${THIRDPARTY}/sqlite-amalgamation-3080600/build64/Release/sqlite3.lib")
 SET (SQLITE3_INCLUDE "${THIRDPARTY}/sqlite-amalgamation-3080600")
 SET (SUPERLULOCATE  ${THIRDPARTY}/SuperLU_4.3)
 SET (SUPERLU_ARCHIVE ${SUPERLULOCATE}/build64/Release/superlu.lib)
 SET (SUPERLU_INCLUDE ${SUPERLULOCATE}/SRC)
-SET (SYMDIFF_INCLUDE c:/build/symdiff/include)
-SET (SYMDIFF_ARCHIVE c:/build/symdiff/win64/src/engine/Release/symdiff_static.lib)
-SET (TCL_ARCHIVE "c:/Tcl_win64/lib/tcl85.lib")
-SET (TCL_INCLUDE "c:/Tcl_win64/include")
-SET (TCL_STUB    "c:/Tcl_win64/lib/tclstub85.lib")
+SET (SYMDIFF_INCLUDE ${THIRDPARTY}/symdiff/include)
+SET (SYMDIFF_ARCHIVE ${THIRDPARTY}/symdiff/win64/src/engine/Release/symdiff_static.lib)
+SET (TCL_ARCHIVE "c:/Tcl/lib/tcl85.lib")
+SET (TCL_INCLUDE "c:/Tcl/include")
+SET (TCL_STUB    "c:/Tcl/lib/tclstub85.lib")
 SET (ZLIB_ARCHIVE "${THIRDPARTY}/zlib64/lib/zlibstatic.lib")
 SET (ZLIB_INCLUDE "${THIRDPARTY}/zlib64/include")
 ENDIF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)


ENH:  Update ITK superbuild.

ENH:  Update ITK superbuild.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -160,7 +160,7 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG d433df63e15da55086061ef78e8662a70b1160bc) ## Window convergence
+  set(${proj}_GIT_TAG 877a6ea10e9ed4672b632c313e2265fb0c887930) ##
   set(ITK_VERSION_ID ITK-4.9) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


cmake: fix problem that go_library is never rebuilt.

`merge_static_libs` also have the similar logic of using ${dummyfile},
I am not sure if there needs a change or not.

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -290,8 +290,22 @@
     set(${TARGET_NAME}_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}${TARGET_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE STRING "output library name for target ${TARGET_NAME}")
   endif()

+  set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_dummy.c)
+
+  # This custom command will always run since it depends on a not
+  # existing file.
+  add_custom_command(
+    OUTPUT dummy_rebulid_${TARGET_NAME}
+    COMMAND cmake -E touch ${dummyfile}
+    )
+  # Create a custom target that depends on the custom command output
+  # file, so the custom command can be referenced as a dependency by
+  # `add_dependencies`.
+  add_custom_target(rebuild_${TARGET_NAME}
+    DEPENDS dummy_rebulid_${TARGET_NAME}
+    )
+
   # Add dummy code to support `make target_name` under Terminal Command
-  set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_dummy.c)
   file(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
   if (go_library_SHARED OR go_library_shared)
     add_library(${TARGET_NAME} SHARED ${dummyfile})
@@ -301,6 +315,12 @@
   if(go_library_DEPS)
     add_dependencies(${TARGET_NAME} ${go_library_DEPS})
   endif(go_library_DEPS)
+
+  # The "source file" of the library is `${dummyfile}` which never
+  # change, so the target will never rebuild. Make the target depends
+  # on the custom command that touches the library "source file", so
+  # rebuild will always happen.
+  add_dependencies(${TARGET_NAME} rebuild_${TARGET_NAME})

   set(${TARGET_NAME}_LIB_PATH "${CMAKE_CURRENT_BINARY_DIR}/${${TARGET_NAME}_LIB_NAME}" CACHE STRING "output library path for target ${TARGET_NAME}")


Add LLVM_VERSION also to the config.h for Cmake builds

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -13,7 +13,7 @@
 /* "Build with ICD" */
 #cmakedefine BUILD_ICD

-
+#define LLVM_VERSION "@LLVM_VERSION@"

 #define CLANG "@CLANG@"


Set CMAKE_C_STANDARD variables

Set CMAKE_C_STANDARD variables

--- flags/c11.cmake
+++ flags/c11.cmake
@@ -16,3 +16,10 @@

 # Hunter doesn't run toolchain-id calculation for C compiler
 list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "c11")
+
+# Set CMAKE_C_STANDARD to cache to override project local value if present.
+# FORCE added in case CMAKE_C_STANDARD already set in cache
+# (e.g. set before 'project' by user).
+set(CMAKE_C_STANDARD 11 CACHE STRING "C Standard (toolchain)" FORCE)
+set(CMAKE_C_STANDARD_REQUIRED YES CACHE BOOL "C Standard required" FORCE)
+set(CMAKE_C_EXTENSIONS NO CACHE BOOL "C Standard extensions" FORCE)


Remove last part of analysis interface

Remove last part of analysis interface

--- thirdparty/aspsimple.cmake
+++ thirdparty/aspsimple.cmake
@@ -1,14 +0,0 @@
-# Simple Analysis Server Protocol library
-cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
-
-include(FetchContent)
-
-set(USR_DIR_ASPSIMPLE ${CMAKE_CURRENT_BINARY_DIR}/usr/aspsimple)
-
-FetchContent_Declare(
-  aspsimple
-  GIT_REPOSITORY "https://github.com/maximmenshikov/aspsimple.git"
-)
-
-FetchContent_MakeAvailable(
-  aspsimple)


[cmake] add ultimate dependency to docstring

--- cmake/LibraryProjectSetup.cmake
+++ cmake/LibraryProjectSetup.cmake
@@ -152,6 +152,7 @@
     add_subdirectory(swig)
   endif()

+  add_dependencies(${COMPONENT} ${COMPONENT}_docstrings)

 endmacro()


replaced with version of kdelibs-old one caused cmake error on win32

svn path=/trunk/kdesupport/qca/; revision=705910

--- cmake/modules/FindOpenSSL.cmake
+++ cmake/modules/FindOpenSSL.cmake
@@ -1,104 +1,108 @@
-# - Try to find the OpenSSL encryption library
-# Once done this will define
-#
-#  OPENSSL_FOUND - system has the OpenSSL library
-#  OPENSSL_INCLUDE_DIR - the OpenSSL include directory
-#  OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
-#  OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# on win32 we additional need to link to libeay32.lib
-MACRO(OPENSSL_ADD_LIB_EAY_LIBS)
-   # /MD and /MDd are the standard values - if somone wants to use
-   # others, the libnames have to change here too
-   # use also eay and libeay32 in debug as fallback for openssl < 0.9.8b
-
-   FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd eay libeay libeay32)
-   FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD eay libeay libeay32)
-
-   IF(MSVC_IDE)
-      IF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
-         SET(OPENSSL_EAY_LIBRARIES optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG})
-      ELSE(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
-         MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl (libeay)")
-      ENDIF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
-   ELSE(MSVC_IDE)
-      STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
-      IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-         SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_DEBUG})
-      ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-         SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_RELEASE})
-      ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-   ENDIF(MSVC_IDE)
-   MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE)
-ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS)
-
-IF(OPENSSL_LIBRARIES)
-   SET(OpenSSL_FIND_QUIETLY TRUE)
-ENDIF(OPENSSL_LIBRARIES)
-
-IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-   SET(LIB_FOUND 1)
-ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-
-FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h )
-
-IF(WIN32 AND MSVC)
-   # /MD and /MDd are the standard values - if somone wants to use
-   # others, the libnames have to change here too
-   # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
-
-   FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32)
-   FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32)
-
-   IF(MSVC_IDE)
-      IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-         SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG})
-      ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-         MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl")
-      ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-   ELSE(MSVC_IDE)
-      STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
-      IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-         SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG})
-      ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-         SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE})
-      ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-   ENDIF(MSVC_IDE)
-   MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
-ELSE(WIN32 AND MSVC)
-
-   FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD )
-
-ENDIF(WIN32 AND MSVC)
-
-IF(WIN32)
-   OPENSSL_ADD_LIB_EAY_LIBS()
-   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
-      SET(OPENSSL_FOUND TRUE)
-   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
-      SET(OPENSSL_FOUND FALSE)
-   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
-ELSE(WIN32)
-   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-      SET(OPENSSL_FOUND TRUE)
-   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-      SET(OPENSSL_FOUND FALSE)
-   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-ENDIF(WIN32)
-
-IF (OPENSSL_FOUND)
-   IF (NOT OpenSSL_FIND_QUIETLY)
-      MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}")
-   ENDIF (NOT OpenSSL_FIND_QUIETLY)
-ELSE (OPENSSL_FOUND)
-   IF (OpenSSL_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could NOT find OpenSSL")
-   ENDIF (OpenSSL_FIND_REQUIRED)
-ENDIF (OPENSSL_FOUND)
-
-MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
-
+# - Try to find the OpenSSL encryption library
+# Once done this will define
+#
+#  OPENSSL_FOUND - system has the OpenSSL library
+#  OPENSSL_INCLUDE_DIR - the OpenSSL include directory
+#  OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
+#  OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+# on win32 we additional need to link to libeay32.lib
+MACRO(OPENSSL_ADD_LIB_EAY_LIBS)
+   IF(MSVC)
+      # /MD and /MDd are the standard values - if somone wants to use
+      # others, the libnames have to change here too
+      # use also eay and libeay32 in debug as fallback for openssl < 0.9.8b
+
+      FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd eay libeay libeay32)
+      FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD eay libeay libeay32)
+
+      IF(MSVC_IDE)
+         IF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
+            SET(OPENSSL_EAY_LIBRARIES optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG})
+         ELSE(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
+            MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl (libeay)")
+         ENDIF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
+      ELSE(MSVC_IDE)
+         STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
+         IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+            SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_DEBUG})
+         ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+            SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_RELEASE})
+         ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+      ENDIF(MSVC_IDE)
+      MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE)
+   ELSE(MSVC)
+       FIND_LIBRARY(OPENSSL_EAY_LIBRARIES NAMES eay libeay libeay32 )
+   ENDIF(MSVC)
+ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS)
+
+IF(OPENSSL_LIBRARIES)
+   SET(OpenSSL_FIND_QUIETLY TRUE)
+ENDIF(OPENSSL_LIBRARIES)
+
+IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
+   SET(LIB_FOUND 1)
+ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
+
+FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h )
+
+IF(WIN32 AND MSVC)
+   # /MD and /MDd are the standard values - if somone wants to use
+   # others, the libnames have to change here too
+   # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
+
+   FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32)
+   FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32)
+
+   IF(MSVC_IDE)
+      IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
+         SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG})
+      ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
+         MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl")
+      ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
+   ELSE(MSVC_IDE)
+      STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
+      IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+         SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG})
+      ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+         SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE})
+      ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+   ENDIF(MSVC_IDE)
+   MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
+ELSE(WIN32 AND MSVC)
+
+   FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD )
+
+ENDIF(WIN32 AND MSVC)
+
+IF(WIN32)
+   OPENSSL_ADD_LIB_EAY_LIBS()
+   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
+      SET(OPENSSL_FOUND TRUE)
+   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
+      SET(OPENSSL_FOUND FALSE)
+   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
+ELSE(WIN32)
+   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
+      SET(OPENSSL_FOUND TRUE)
+   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
+      SET(OPENSSL_FOUND FALSE)
+   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
+ENDIF(WIN32)
+
+IF (OPENSSL_FOUND)
+   IF (NOT OpenSSL_FIND_QUIETLY)
+      MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}")
+   ENDIF (NOT OpenSSL_FIND_QUIETLY)
+ELSE (OPENSSL_FOUND)
+   IF (OpenSSL_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could NOT find OpenSSL")
+   ENDIF (OpenSSL_FIND_REQUIRED)
+ENDIF (OPENSSL_FOUND)
+
+MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
+


Second part for ROOT-6208

Second part for ROOT-6208

--- cmake/modules/FindPythia8.cmake
+++ cmake/modules/FindPythia8.cmake
@@ -44,9 +44,4 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Pythia8 DEFAULT_MSG PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
 mark_as_advanced(PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
-
-if(PYTHIA8_FOUND)
-  file(READ ${PYTHIA8_INCLUDE_DIR}/../xmldoc/Version.xml versionstr)
-  string(REGEX REPLACE ".*Pythia:versionNumber.*default.*[0-9][.]([0-9]+).*" "\\1" PYTHIA8_VERSION "${versionstr}")
-endif()
-
+


build: remove `FindSQLite3` cmake module (NFC)

This was introduced in CMake 3.13, and we require CMake 3.15.  Remove
the local copy of the module.

--- cmake/modules/FindSQLite3.cmake
+++ cmake/modules/FindSQLite3.cmake
@@ -1,66 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
-# file Copyright.txt or https://cmake.org/licensing for details.
-
-#[=======================================================================[.rst:
-FindSQLite3
------------
-
-Find the SQLite libraries, v3
-
-IMPORTED targets
-^^^^^^^^^^^^^^^^
-
-This module defines the following :prop_tgt:`IMPORTED` target:
-
-``SQLite::SQLite3``
-
-Result variables
-^^^^^^^^^^^^^^^^
-
-This module will set the following variables if found:
-
-``SQLite3_INCLUDE_DIRS``
-  where to find sqlite3.h, etc.
-``SQLite3_LIBRARIES``
-  the libraries to link against to use SQLite3.
-``SQLite3_VERSION``
-  version of the SQLite3 library found
-``SQLite3_FOUND``
-  TRUE if found
-
-#]=======================================================================]
-
-# Look for the necessary header
-find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h)
-mark_as_advanced(SQLite3_INCLUDE_DIR)
-
-# Look for the necessary library
-find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite)
-mark_as_advanced(SQLite3_LIBRARY)
-
-# Extract version information from the header file
-if(SQLite3_INCLUDE_DIR)
-    file(STRINGS ${SQLite3_INCLUDE_DIR}/sqlite3.h _ver_line
-         REGEX "^#define SQLITE_VERSION  *\"[0-9]+\\.[0-9]+\\.[0-9]+\""
-         LIMIT_COUNT 1)
-    string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+"
-           SQLite3_VERSION "${_ver_line}")
-    unset(_ver_line)
-endif()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(SQLite3
-    REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY
-    VERSION_VAR SQLite3_VERSION)
-
-# Create the imported target
-if(SQLite3_FOUND)
-    set(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR})
-    set(SQLite3_LIBRARIES ${SQLite3_LIBRARY})
-    if(NOT TARGET SQLite::SQLite3)
-        add_library(SQLite::SQLite3 UNKNOWN IMPORTED)
-        set_target_properties(SQLite::SQLite3 PROPERTIES
-            IMPORTED_LOCATION             "${SQLite3_LIBRARY}"
-            INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}")
-    endif()
-endif()


Plugins should be modules, not libraries as other targets don't link to them.

--- cmake/modules/GrantleeUse.cmake
+++ cmake/modules/GrantleeUse.cmake
@@ -63,7 +63,7 @@
   endforeach(_filename ${PLUGIN_FILTERS})

   qt4_wrap_cpp(_plugin_moc_srcs ${_headers})
-  add_library(${pluginname} SHARED ${_sources} ${_plugin_moc_srcs})
+  add_library(${pluginname} MODULE ${_sources} ${_plugin_moc_srcs})
   set_target_properties(${pluginname}
     PROPERTIES PREFIX ""
     LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/grantlee/${Grantlee_VERSION_MAJOR}.${Grantlee_VERSION_MINOR}"


Correct an oversight in our CMake logic; turn off everything that is Tcl/Tk
related if the user specifies -DENABLE_tcl=OFF.

svn path=/trunk/; revision=7094

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -136,4 +136,12 @@
     set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE)
     set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
   endif(TCL_FOUND AND TCL_TCLSH)
+else(ENABLE_tcl)
+  message(STATUS
+  "ENABLE_tcl is off so disabling everything else that "
+  "is Tcl/Tk related"
+  )
+  set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE)
+  set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE)
+  set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
 endif(ENABLE_tcl)


Update BdeMetadataUtils.cmake

Update BdeMetadataUtils.cmake

--- BdeBuildSystem/BdeMetadataUtils.cmake
+++ BdeBuildSystem/BdeMetadataUtils.cmake
@@ -70,6 +70,8 @@
     set(_meta_dir ${dir}/package)
     set(${pkg}_METADATA_DIRS ${_meta_dir})

+    unset(mems)
+
     _bbs_read_bde_metadata(${_meta_dir}/${pkg}.mem mems)
     _bbs_set_bde_component_lists(${dir} ${pkg} mems)

@@ -108,6 +110,8 @@

     set(_meta_dir ${dir}/group)
     list(APPEND ${group}_METADATA_DIRS ${_meta_dir})
+
+    unset(pkgs)

     _bbs_read_bde_metadata(${_meta_dir}/${group}.mem pkgs)


Add CTest configuration when building standalone languages

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -30,6 +30,9 @@
   if (BUILD_TESTING)
     enable_testing()
     include(sitkAddTest)
+
+    configure_file("${SimpleITK_SOURCE_DIR}/CMake/CTestCustom.cmake.in" CTestCustom.cmake)
+
   endif()

 else()


Added sanity checks for library names.

Added sanity checks for library names.

--- CMake/usFunctionGenerateModuleInit.cmake
+++ CMake/usFunctionGenerateModuleInit.cmake
@@ -30,8 +30,26 @@
   message(SEND_ERROR "NAME argument is mandatory")
 endif()

+if(US_MODULE_EXECUTABLE AND US_MODULE_LIBRARY_NAME)
+  message("[Executable: ${US_MODULE_NAME}] Ignoring LIBRARY_NAME argument.")
+  set(US_MODULE_LIBRARY_NAME )
+endif()
+
 if(NOT US_MODULE_LIBRARY_NAME AND NOT US_MODULE_EXECUTABLE)
   set(US_MODULE_LIBRARY_NAME ${US_MODULE_NAME})
+endif()
+
+set(_regex_validation "[a-zA-Z-_][a-zA-Z-_0-9]*")
+if(US_MODULE_EXECUTABLE)
+  string(REGEX MATCH ${_regex_validation} _valid_chars ${US_MODULE_NAME})
+  if(NOT _valid_chars STREQUAL US_MODULE_NAME)
+    message(FATAL_ERROR "[Executable: ${US_MODULE_NAME}] MODULE_NAME contains illegal characters.")
+  endif()
+else()
+  string(REGEX MATCH ${_regex_validation} _valid_chars ${US_MODULE_LIBRARY_NAME})
+  if(NOT _valid_chars STREQUAL US_MODULE_LIBRARY_NAME)
+    message(FATAL_ERROR "[Module: ${US_MODULE_NAME}] LIBRARY_NAME \"${US_MODULE_LIBRARY_NAME}\" contains illegal characters.")
+  endif()
 endif()

 # Create variables of the ModuleInfo object, created in CMake/usModuleInit.cpp
@@ -40,7 +58,11 @@
   set(US_MODULE_DEPENDS_STR "${US_MODULE_DEPENDS_STR} ${_dep}")
 endforeach()

-set(module_init_src_file "${CMAKE_CURRENT_BINARY_DIR}/${US_MODULE_NAME}_init.cpp")
+if(US_MODULE_LIBRARY_NAME)
+  set(module_init_src_file "${CMAKE_CURRENT_BINARY_DIR}/${US_MODULE_LIBRARY_NAME}_init.cpp")
+else()
+  set(module_init_src_file "${CMAKE_CURRENT_BINARY_DIR}/${US_MODULE_NAME}_init.cpp")
+endif()
 configure_file(${CppMicroServices_SOURCE_DIR}/CMake/usModuleInit.cpp ${module_init_src_file} @ONLY)

 set(_src ${${src_var}} ${module_init_src_file})


Avoid installing system forge when AF_INSTALL_STANDALONE not set

The install target was copying the forge library installed on the system. This
is not expected because the install command only copies the artifacts generated
by the project and not libraries installed on the system. We do want system
libraries to be installed when AF_INSTALL_STANDALONE is enabled. This commit
addresses both of these issues.

--- CMakeModules/AFconfigure_forge_dep.cmake
+++ CMakeModules/AFconfigure_forge_dep.cmake
@@ -75,7 +75,8 @@

     if(TARGET Forge::forge)
         get_target_property(fg_lib_type Forge::forge TYPE)
-        if(NOT ${fg_lib_type} STREQUAL "STATIC_LIBRARY")
+        if(NOT ${fg_lib_type} STREQUAL "STATIC_LIBRARY" AND
+           AF_INSTALL_STANDALONE)
             install(FILES
                     $<TARGET_FILE:Forge::forge>
                     $<$<PLATFORM_ID:Linux>:$<TARGET_SONAME_FILE:Forge::forge>>


CMake: Recognise Freetype version 239

CMake: Recognise Freetype version 239

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238)
+set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Patch 2651453: MACRO_DISPLAY_FEATURE_LOG should write dependency failure report as FATAL_ERROR, not STATUS to ensure it is displayed in ccmake

--- CMake/Utils/MacroLogFeature.cmake
+++ CMake/Utils/MacroLogFeature.cmake
@@ -88,7 +88,7 @@
    SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
    IF (EXISTS ${_file})
       FILE(READ ${_file} _requirements)
-      MESSAGE(STATUS "\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- Please install them before continuing this software installation.\n-- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to dependencies>\n-----------------------------------------------------------------------------\n${_requirements}-----------------------------------------------------------------------------")
+      MESSAGE(FATAL_ERROR "\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- Please install them before continuing this software installation.\n-- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to dependencies>\n-----------------------------------------------------------------------------\n${_requirements}-----------------------------------------------------------------------------")
       FILE(REMOVE ${_file})
       MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
    ENDIF (EXISTS ${_file})


ENH: store all functionality dirs in the cache (e.g. for doxygen generation)

--- CMake/FunctionalityHelpers.cmake
+++ CMake/FunctionalityHelpers.cmake
@@ -63,7 +63,6 @@
     MESSAGE(STATUS "Using FUNC_CPP for functionality ${FUNC_NAME}")
   ENDIF(NOT FUNC_CPP)

-
   SET(FUNC_CPP_LIST ${FUNC_CPP})
   IF(FUNC_FORMS)
     QT_WRAP_UI(${FUNC_NAME} FUNC_H_LIST FUNC_CPP_LIST ${FUNC_FORMS})
@@ -76,14 +75,17 @@
   CONFIGURE_FILE("${REGISTER_QFUNCTIONALITY_CPP_IN}" "${CMAKE_CURRENT_BINARY_DIR}/Register${FUNC_NAME}.cpp" @ONLY)
   REMOVE_FROM_CACHE_LIST(${KITNAME}_FUNCTIONALITY_NAMES ${FUNC_NAME})
   REMOVE_FROM_CACHE_LIST(${KITNAME}_FUNCTIONALITY_NAMES_KNOWN ${FUNC_NAME})
+  REMOVE_FROM_CACHE_LIST(ALL_FUNCTIONALITY_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
   OPTION("BUILD_${FUNC_NAME}" "Build ${FUNC_NAME} functionality")
   IF(BUILD_${FUNC_NAME} OR BUILD_ALL_FUNCTIONALITIES)
-    SET(${KITNAME}_FUNCTIONALITY_NAMES ${${KITNAME}_FUNCTIONALITY_NAMES};${FUNC_NAME} CACHE INTERNAL "Names of all enabled functionalities." FORCE)
+    SET(${KITNAME}_FUNCTIONALITY_NAMES ${${KITNAME}_FUNCTIONALITY_NAMES};${FUNC_NAME} CACHE INTERNAL "Names of all ${KITNAME} functionalities." FORCE)
+    SET(ALL_FUNCTIONALITY_DIRS ${ALL_FUNCTIONALITY_DIRS};${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "Directories of all enabled functionalities." FORCE)
     # SET(${KITNAME}_FUNCTIONALITY_NAMES-MODIFIED 1 CACHE INTERNAL "test")
   #   CLEANUP_FUNCTIONALITY_LIST()
     ADD_LIBRARY(${FUNC_NAME} ${FUNC_CPP_LIST} "${CMAKE_CURRENT_BINARY_DIR}/Register${FUNC_NAME}.cpp" )
     TARGET_LINK_LIBRARIES(${FUNC_NAME} ${LIBS_FOR_QFUNCTIONALITY})
     ADD_DEPENDENCIES(${FUNC_NAME} ${LIBS_FOR_QFUNCTIONALITY})
+
   ENDIF(BUILD_${FUNC_NAME} OR BUILD_ALL_FUNCTIONALITIES)
   SET(${KITNAME}_FUNCTIONALITY_NAMES_KNOWN ${${KITNAME}_FUNCTIONALITY_NAMES_KNOWN};${FUNC_NAME} CACHE INTERNAL "Names of all known functionalities." FORCE)
 # MESSAGE("after MACRO: ${${KITNAME}_FUNCTIONALITY_NAMES}")


[FIX,INTERNAL] Look for subdirectory seqan in FindSeqAn.cmake instead of seqan.h when not used in SeqAn build system as well.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13915 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -222,15 +222,15 @@
 endif (MSVC)

 # ----------------------------------------------------------------------------
-# Search for header seqan.h.
+# Search for directory seqan.
 # ----------------------------------------------------------------------------

 option (SEQAN_USE_SEQAN_BUILD_SYSTEM "Whether or not to expect the SeqAn build system with core/extras structure." OFF)

 if (SEQAN_USE_SEQAN_BUILD_SYSTEM)
   # When using the SeqAn build system, we scan all entries in
-  # CMAKE_INCLUDE_PATH for a seqan.h and add all paths to the variable
-  # SEQAN_INCLUDE_DIRS.
+  # CMAKE_INCLUDE_PATH for a subdirectory seqan and add all paths to the
+  # variable SEQAN_INCLUDE_DIRS.
   set (_SEQAN_INCLUDE_DIRS "")
   foreach (_SEQAN_BASEDIR ${CMAKE_INCLUDE_PATH})
     if (EXISTS ${_SEQAN_BASEDIR}/seqan)
@@ -246,9 +246,9 @@
     set(SEQAN_FOUND        FALSE)
   endif (_SEQAN_INCLUDE_DIRS)
 else (SEQAN_USE_SEQAN_BUILD_SYSTEM)
-  # When NOT using the SeqAn build system then we only look for one seqan.h
-  # and thus only one library.
-  find_path(_SEQAN_BASEDIR "seqan.h" PATHS ${SEQAN_INCLUDE_PATH})
+  # When NOT using the SeqAn build system then we only look for one directory
+  # with subdirectory seqan and thus only one library.
+  find_path(_SEQAN_BASEDIR "seqan" PATHS ${SEQAN_INCLUDE_PATH})
   mark_as_advanced(_SEQAN_BASEDIR)
   if (_SEQAN_BASEDIR)
     set(SEQAN_FOUND        TRUE)


Made OpenCV Calib3D library optional

Made OpenCV Calib3D library optional

--- cmake/CMakeModules/FindOpenCV.cmake
+++ cmake/CMakeModules/FindOpenCV.cmake
@@ -41,7 +41,6 @@
 endmacro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)

 # Required
-FIND_OPENCV_LIBRARY(OPENCV_CALIB3D_LIBRARY opencv_calib3d)
 FIND_OPENCV_LIBRARY(OPENCV_CORE_LIBRARY opencv_core)
 FIND_OPENCV_LIBRARY(OPENCV_FEATURES2D_LIBRARY opencv_features2d)
 FIND_OPENCV_LIBRARY(OPENCV_XFEATURES2D_LIBRARY opencv_xfeatures2d)
@@ -51,14 +50,15 @@
 FIND_OPENCV_LIBRARY(OPENCV_ML_LIBRARY opencv_ml)

 # Optional
+FIND_OPENCV_LIBRARY(OPENCV_CALIB3D_LIBRARY opencv_calib3d)
 FIND_OPENCV_LIBRARY(OPENCV_IMGCODECS_LIBRARY opencv_imgcodecs)
 FIND_OPENCV_LIBRARY(OPENCV_CONTRIB_LIBRARY opencv_contrib)
 FIND_OPENCV_LIBRARY(OPENCV_GPU_LIBRARY opencv_gpu)

 set(OPENCV_FOUND "NO")
-if(OPENCV_INCLUDE_DIR AND OPENCV_CALIB3D_LIBRARY AND OPENCV_CORE_LIBRARY AND OPENCV_FEATURES2D_LIBRARY AND OPENCV_XFEATURES2D_LIBRARY AND OPENCV_FLANN_LIBRARY AND OPENCV_HIGHGUI_LIBRARY AND OPENCV_IMGPROC_LIBRARY AND OPENCV_ML_LIBRARY)
+if(OPENCV_INCLUDE_DIR AND OPENCV_CORE_LIBRARY AND OPENCV_FEATURES2D_LIBRARY AND OPENCV_XFEATURES2D_LIBRARY AND OPENCV_FLANN_LIBRARY AND OPENCV_HIGHGUI_LIBRARY AND OPENCV_IMGPROC_LIBRARY AND OPENCV_ML_LIBRARY)
    set(OPENCV_FOUND "YES")
-   set(OPENCV_LIBRARIES ${OPENCV_CALIB3D_LIBRARY} ${OPENCV_CORE_LIBRARY} ${OPENCV_FEATURES2D_LIBRARY} ${OPENCV_XFEATURES2D_LIBRARY} ${OPENCV_FLANN_LIBRARY} ${OPENCV_HIGHGUI_LIBRARY} ${OPENCV_IMGPROC_LIBRARY} ${OPENCV_ML_LIBRARY})
+   set(OPENCV_LIBRARIES  ${OPENCV_CORE_LIBRARY} ${OPENCV_FEATURES2D_LIBRARY} ${OPENCV_XFEATURES2D_LIBRARY} ${OPENCV_FLANN_LIBRARY} ${OPENCV_HIGHGUI_LIBRARY} ${OPENCV_IMGPROC_LIBRARY} ${OPENCV_ML_LIBRARY})
 else()
    message( WARNING "Could not find OPENCV" )
 endif()
@@ -87,6 +87,14 @@
    message( "Could not find optional OPENCV Image Codecs Library" )
 endif()

+set(OPENCV_CALIB3D_FOUND "NO")
+if(OPENCV_FOUND AND OPENCV_CALIB3D_LIBRARY)
+   set(OPENCV_CALIB3D_FOUND "YES")
+   set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_CALIB3D_LIBRARY})
+else()
+   message( "Could not find optional OPENCV Calib 3D Library" )
+endif()
+
 if(OPENCV_FOUND)
    message( STATUS "OPENCV_INCLUDE_DIR = ${OPENCV_INCLUDE_DIR}" )
    message( STATUS "OPENCV_LIBRARIES   = ${OPENCV_LIBRARIES}" )


determine windows version from major.minor only, the patch number is irrelevant.

--- cmake/EigenDetermineOSVersion.cmake
+++ cmake/EigenDetermineOSVersion.cmake
@@ -9,18 +9,18 @@

 # - A little helper variable which should not be directly called
 function(DetermineShortWindowsName WIN_VERSION win_num_version)
-   if    (${win_num_version} VERSION_EQUAL "6.1.7600")
+   if    (${win_num_version} VERSION_EQUAL "6.1")
        set(_version "win7")
-   elseif(${win_num_version} VERSION_EQUAL "6.0.6000")
+   elseif(${win_num_version} VERSION_EQUAL "6.0")
        set(_version "winVista")
-   elseif(${win_num_version} VERSION_EQUAL "5.2.3790")
+   elseif(${win_num_version} VERSION_EQUAL "5.2")
        set(_version "winXpProf")
-   elseif(${win_num_version} VERSION_EQUAL "5.1.2600")
+   elseif(${win_num_version} VERSION_EQUAL "5.1")
        set(_version "winXp")
-   elseif(${win_num_version} VERSION_EQUAL "5.0.2195")
+   elseif(${win_num_version} VERSION_EQUAL "5.0")
        set(_version "win2000Prof")
    else()
-       set(_version "")
+       set(_version "unknownWin")
    endif()
    set(${WIN_VERSION} ${_version} PARENT_SCOPE)
 endfunction()
@@ -28,16 +28,14 @@
 function(DetermineOSVersion OS_VERSION)
   if (WIN32)
     file (TO_NATIVE_PATH "$ENV{COMSPEC}" SHELL)
-    exec_program( ${SHELL} ARGS "/c" "ver"
-      OUTPUT_VARIABLE ver_output)
+    exec_program( ${SHELL} ARGS "/c" "ver" OUTPUT_VARIABLE ver_output)

       string(REGEX MATCHALL "[0-9]+"
            ver_list "${ver_output}")
       list(GET ver_list 0 _major)
       list(GET ver_list 1 _minor)
-      list(GET ver_list 2 _patch)

-    set(win_num_version ${_major}.${_minor}.${_patch})
+    set(win_num_version ${_major}.${_minor})
     DetermineShortWindowsName(win_version "${win_num_version}")
     if(win_version)
       set(${OS_VERSION} ${win_version} PARENT_SCOPE)


remove new line at step end

remove new line at step end

--- cmake/InstallExternalProjects.cmake
+++ cmake/InstallExternalProjects.cmake
@@ -20,34 +20,34 @@
                 DEPENDERS   download
             )
             ExternalProject_Add_Step(${project_name} ${project_name}_configure
-                COMMAND     echo "\\ntravis_fold:end:${project_name}.download\r"
+                COMMAND     echo "\\ntravis_fold:end:${project_name}.download"
                 COMMAND     echo "\\ntravis_fold:start:${project_name}.configure\tConfigure ${project_name}"
                 DEPENDEES   download
                 DEPENDERS   configure
             )

             ExternalProject_Add_Step(${project_name} ${project_name}_build
-                COMMAND     echo "\\ntravis_fold:end:${project_name}.configure\r"
+                COMMAND     echo "\\ntravis_fold:end:${project_name}.configure"
                 COMMAND     echo "\\ntravis_fold:start:${project_name}.build\tBuild ${project_name}"
                 DEPENDEES   configure
                 DEPENDERS   build
             )

             ExternalProject_Add_Step(${project_name} ${project_name}_install
-                COMMAND     echo "\\ntravis_fold:end:${project_name}.build\r"
+                COMMAND     echo "\\ntravis_fold:end:${project_name}.build"
                 COMMAND     echo "\\ntravis_fold:start:${project_name}.install\tInstall ${project_name}"
                 DEPENDEES   build
                 DEPENDERS   install
             )

             ExternalProject_Add_Step(${project_name} ${project_name}_test
-                COMMAND     echo "\\ntravis_fold:end:${project_name}.install\r"
+                COMMAND     echo "\\ntravis_fold:end:${project_name}.install"
                 COMMAND     echo "\\ntravis_fold:start:${project_name}.test\tTest ${project_name}"
                 DEPENDEES   install
                 DEPENDERS   test
             )
             ExternalProject_Add_Step(${project_name} ${project_name}_end
-                COMMAND     echo "\\ntravis_fold:end:${project_name}.test\r"
+                COMMAND     echo "\\ntravis_fold:end:${project_name}.test"
                 DEPENDEES   test
             )
         endif ()


check for Intel compilers by ID instead of name

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -354,7 +354,7 @@
 	string(REPLACE "." "_" _flag "__${_flag}__")
 	add_definitions("-D${_flag}")
 endforeach(_flag)
-	elseif(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc|mpiicc|mpiicpc)$") # ICC (on Linux)
+	elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") # ICC (on Linux)
 	_my_find(_available_vector_units_list "avx2"    _found)
 if(_found)
 	set(ARCH_FLAGS "${ARCH_FLAGS} -xCORE-AVX2")


Using the new rules checker (Stefan)

Using the new rules checker (Stefan)

--- cmake/modules/FindRuleChecker.cmake
+++ cmake/modules/FindRuleChecker.cmake
@@ -4,82 +4,38 @@
 # Finds if the RuleChecker is installed and sets the following variables:
 #
 # RULE_CHECKER_FOUND = Boolean defining if Rule Checker is available
-# RULE_CHECKER_PATH  = Path to the java class containing the ALICE Rule Checker
-# RULE_CHECKER       = Rules (defaults to ALICE rules!)
-# RULE_CHECKER_PATCH = Perl script to be executed to patch preprocessor files
-#
+# RULE_CHECKER_SRCML = PATH TO src2srcml executable
+# RULE_CHECKER_JAVA  = PATH TO java executable
+# RULE_CHECKER_JAR   = PATH TO NewRuleChecker.jar
+# RULE_CHECKER_RULES = Rules (defaults to ALICE rules!)

 # We suppose that perl and java are present and working
+Find_Program(RULE_CHECKER_SRCML src2srcml $ENV{PATH})
+Find_Program(RULE_CHECKER_JAVA java $ENV{PATH})
+#Message(STATUS "${RULE_CHECKER_SRCML} ${RULE_CHECKER_JAVA}")
+Set(RULE_CHECKER_FOUND NO)
+If(RULE_CHECKER_SRCML AND RULE_CHECKER_JAVA)
+  Find_File(RULE_CHECKER_JAR NAMES NewRuleChecker.jar PATHS $ENV{ALICE}/local/ALICENewRuleChecker/NewRuleChecker)
+  Find_File(RULE_CHECKER_RULES AliceCodingConventions.xml $ENV{ALICE}/local/ALICENewRuleChecker/NewRuleChecker/config)
+  #Message(STATUS "${RULE_CHECKER_JAR} ${RULE_CHECKER_RULES}")
+  If(RULE_CHECKER_JAR AND RULE_CHECKER_RULES)
+    Set(RULE_CHECKER_FOUND YES)
+    Message(STATUS "RuleChecker installed on this system")
+  EndIf(RULE_CHECKER_JAR AND RULE_CHECKER_RULES)
+EndIf(RULE_CHECKER_SRCML AND RULE_CHECKER_JAVA)
+If(NOT RULE_CHECKER_FOUND)
+  Message(STATUS "RuleChecker not installed on this system")
+EndIf(NOT RULE_CHECKER_FOUND)

-Find_File(RULE_CHECKER_PATCH patch4alice.prl
-  /usr/local/IRST/patch ${ALICE}/local/IRST/patch /opt/IRST/patch)
-
-If(RULE_CHECKER_PATCH)
-  Set(RULE_CHECKER_FOUND YES)
-  Set(RULE_CHECKER rules.ALICE.ALICERuleChecker)
-  String(REPLACE "/patch/patch4alice.prl" ""
-    RULE_CHECKER_PATH "${RULE_CHECKER_PATCH}")
-
-Else(RULE_CHECKER_PATCH)
-  Set(RULE_CHECKER_FOUND NO)
-  Message(STATUS "RuleChecker not installed on this system")
-
-EndIf(RULE_CHECKER_PATCH)
-
-
-#_______________________________________________________________________________
+#______________________________________________________________________________________________________________
 Function(CheckViols LIB SRCS)

   If(RULE_CHECKER_FOUND)
-    String(REGEX MATCHALL "[^ ]*.cxx" CXXSRCS "${SRCS}")
-
-    Set(_checkDir "${CMAKE_CURRENT_BINARY_DIR}/check")
-
-    If(NOT EXISTS ${_checkDir})
-      File(MAKE_DIRECTORY ${_checkDir})
-    EndIf(NOT EXISTS ${_checkDir})
-
-    Set(_inc_dirs)
-    Foreach(_dir ${INCLUDE_DIRECTORIES})
-      Set(_inc_dirs ${_inc_dirs} -I${_dir})
-    EndForeach(_dir ${INCLUDE_DIRECTORIES})
-
-    Set(VIOLS)
-    Foreach(_checkFile ${CXXSRCS})
-      Get_Filename_Component(_checkFilePath ${_checkFile} PATH)
-      If(NOT EXISTS ${_checkDir}/${_checkFilePath})
-	File(MAKE_DIRECTORY ${_checkDir}/${_checkFilePath})
-      EndIf(NOT EXISTS ${_checkDir}/${_checkFilePath})
-      String(REGEX REPLACE "([^;]*).cxx" "${_checkDir}/\\1.viol" _violFile "${_checkFile}")
-      String(REGEX REPLACE "([^;]*).cxx" "\\1.i" _tempFile_in ${_checkFile})
-      Add_Custom_Command(
-	OUTPUT ${_violFile}
-	COMMAND ${CMAKE_CXX_COMPILER}
-        ARGS -E ${CMAKE_CXX_FLAGS} ${_inc_dirs} -I. ${CMAKE_CURRENT_SOURCE_DIR}/${_checkFile} > ${_tempFile_in}
-	COMMAND ${RULE_CHECKER_PATCH} ARGS ${_tempFile_in}
-	COMMAND CLASSPATH=${RULE_CHECKER_PATH} java ${RULE_CHECKER}
-        ARGS ${_tempFile_in} ${CMAKE_CURRENT_SOURCE_DIR} > ${_violFile}
-	DEPENDS ${_checkFile}
-	WORKING_DIRECTORY ${_checkDir})
-      Set(VIOLS ${VIOLS} ${_violFile})
-    EndForeach(_checkFile ${CXXSRCS})
-
-    Add_Custom_Target(check-${LIB} DEPENDS ${VIOLS})
-    Add_Dependencies(check-all check-${LIB})
-
-  EndIf(RULE_CHECKER_FOUND)
-
-EndFunction (CheckViols)
-
-#_______________________________________________________________________________
-Function(CheckViolsNew LIB SRCS)
-
-  If(RULE_CHECKER_FOUND)
     Set(_FactExt $ENV{ALICE}/local/ALICENewRuleChecker/FactExtractor/FactExtractor.jar)
-    Set(_RuleCheck $ENV{ALICE}/local/ALICENewRuleChecker/NewRuleChecker/NewRuleChecker.jar)
+    Set(_RuleCheck ${RULE_CHECKER_JAR})

     String(REGEX MATCHALL "[^ ]*.cxx" CXXSRCS "${SRCS}")
-
+
     Set(_checkDir "${CMAKE_CURRENT_BINARY_DIR}/check_new")

     If(NOT EXISTS ${_checkDir})
@@ -99,7 +55,7 @@
       EndIf(NOT EXISTS ${_checkDir}/${_checkFilePath})
       String(REGEX REPLACE "([^;]*).cxx" "${_checkDir}/\\1.cxx.xml" _srcxml "${_checkFile}")
       String(REGEX REPLACE "([^;]*).cxx" "${_checkDir}/\\1.h.xml"   _hdrxml "${_checkFile}")
-      String(REGEX REPLACE "([^;]*).cxx" "${_checkDir}/\\1.h.viol"   _violFile "${_checkFile}")
+      String(REGEX REPLACE "([^;]*).cxx" "${_checkDir}/\\1.viol"    _violFile "${_checkFile}")
       String(REGEX REPLACE "([^;]*).cxx" "\\1.h" _checkHead "${_checkFile}")
       Add_Custom_Command(
 	OUTPUT ${_violFile}
@@ -107,11 +63,10 @@
         ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${_checkFile} ${_srcxml}
 	COMMAND src2srcml
         ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${_checkHead} ${_hdrxml}
-	COMMAND java
-	ARGS -jar ${_FactExt}
-	COMMAND ${RULE_CHECKER_PATCH} ARGS ${_tempFile_in}
-	COMMAND CLASSPATH=${RULE_CHECKER_PATH} java ${RULE_CHECKER}
-        ARGS ${_tempFile_in} ${CMAKE_CURRENT_SOURCE_DIR} > ${_violFile}
+	COMMAND java -jar
+	ARGS ${_FactExt} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
+	COMMAND java -Xmx500m -jar ${RULE_CHECKER_JAR}
+        ARGS ${_srcxml} ${_hdrxml} ${CMAKE_CURRENT_SOURCE_DIR}/factFile.xml ${RULE_CHECKER_RULES} > ${_violFile}
 	DEPENDS ${_checkFile}
 	WORKING_DIRECTORY ${_checkDir})
       Set(VIOLS ${VIOLS} ${_violFile})
@@ -122,5 +77,5 @@

   EndIf(RULE_CHECKER_FOUND)

-EndFunction (CheckViolsNew)
+EndFunction (CheckViols)


ENH: Bump wiki examples version, new remote module process

The remote description file now respects an environment variable
RemoteGitTag. This can be set by a developer or a test script to
specify an alternative tag without having to commit a new remote
file.

For exaqmple, in a cron entry one could set the tag to HEAD by:
cd ITK/Modules/Remote/WikiExamples
git fetch
git checkout master
export RemoteGitTag=`git rev-parse HEAD`
git checkout ${RemoteGitTag}

--- Modules/Remote/WikiExamples.remote.cmake
+++ Modules/Remote/WikiExamples.remote.cmake
@@ -2,9 +2,17 @@
 # ITK WikiExamples
 #

+# If the environment var RemoteGitTag exists, use it
+if (NOT DEFINED ENV{RemoteGitTag})
+  # February 18, 2016
+  # Additional tests and baselines
+  set(GIT_TAG 5b474c63f04d17c7773abd1e33f9ea295d291e59)
+else()
+  set(GIT_TAG $ENV{RemoteGitTag})
+endif()
+
 itk_fetch_module(WikiExamples
   "A collection of examples that illustrate how to use ITK."
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
-  # January 20, 2016
-  GIT_TAG a34ad855f68996cf289b94af5e3a8fdb375cd170
+  GIT_TAG ${GIT_TAG}
   )


DOC: Update WikiExamples to 2016-10-20

DOC: Update WikiExamples to 2016-10-20

Change-Id: Ieb5ffd6b488a40e4d0fa65cc6adde6121d20a321

--- Modules/Remote/WikiExamples.remote.cmake
+++ Modules/Remote/WikiExamples.remote.cmake
@@ -5,6 +5,6 @@
 itk_fetch_module(WikiExamples
   "A collection of examples that illustrate how to use ITK."
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
-  # September 27, 2015
-  GIT_TAG 29f456945d7ff9a35ac8bfaf8985601f8ddf9cba
+  # January 20, 2016
+  GIT_TAG a34ad855f68996cf289b94af5e3a8fdb375cd170
   )


Replace slashes with underscores

Replace slashes with underscores

--- CMake/mitkSetupCPack.cmake
+++ CMake/mitkSetupCPack.cmake
@@ -92,7 +92,7 @@
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${MITK_SOURCE_DIR}/LICENSE")
 set(CPACK_RESOURCE_FILE_LICENSE "${MITK_SOURCE_DIR}/LICENSE")

-set(CPACK_PACKAGE_VERSION_MAJOR ${MITK_REVISION_DESC})
+string(REPLACE "/" "_" CPACK_PACKAGE_VERSION_MAJOR "${MITK_REVISION_DESC}")

 # tell cpack to strip all debug symbols from all files
 set(CPACK_STRIP_FILES ON)


fix osg search path

fix osg search path

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -11,7 +11,11 @@
 #
 # Created by Robert Osfield. Modified by Roger James 05/03/09

-SET(OSG_INSTALL_DIR "c:/Program Files/OpenSceneGraph" CACHE PATH "OpenSceneGraph install directory")
+IF (WIN32)
+    SET(OSG_INSTALL_DIR "c:/Program Files/OpenSceneGraph" CACHE PATH "OpenSceneGraph WIN32 install directory")
+ELSE (WIN32)
+    SET(OSG_INSTALL_DIR "/usr/local/openscenegraph" CACHE PATH "OpenSceneGraph UNIX install directory")
+ENDIF (WIN32)

 SET(OSG_LIBRARY_NAMES
     osg


[cmake] add option for RCP specfific mbedtls library (#7847)

--- src/core/radio.cmake
+++ src/core/radio.cmake
@@ -47,8 +47,12 @@
   target_sources(openthread-radio PRIVATE ${OT_VENDOR_EXTENSION})
 endif()

+if(NOT DEFINED OT_MBEDTLS_RCP)
+    set(OT_MBEDTLS_RCP ${OT_MBEDTLS})
+endif()
+
 target_link_libraries(openthread-radio
     PRIVATE
-        ${OT_MBEDTLS}
+        ${OT_MBEDTLS_RCP}
         ot-config
 )


Missed an instance of DISABLE -> ENABLE changes

--HG--
branch : v1-7

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -17,8 +17,8 @@
   set(OGRE_SET_BUILD_PLATFORM_IPHONE 1)
   set(OGRE_STATIC 1)
   set(OGRE_STATIC_LIB 1)
-  set(OGRE_CONFIG_DISABLE_VIEWPORT_ORIENTATIONMODE FALSE)
-  set(OGRE_CONFIG_DISABLE_PVRTC FALSE)
+  set(OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE TRUE)
+  set(OGRE_CONFIG_ENABLE_PVRTC TRUE)
 endif()

 # should we build static libs?


Ensure python header version matches lib version.

There was an error in the foreach() loop over _Python_VERSIONS.
Even if the python library for a specific version was not found,
it would try to find the include file for that python version.
As a result, it could very easily find the include file for one
version of python, and the library for another version.  This has
been seen to happen on OS X, but could happen on any OS.

Change-Id: I90157ba517dadd7d1ba0ce1f5dba523246064581

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -77,22 +77,33 @@
       "Path to where Python.h is found" FORCE)
   ENDIF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)

-  SET(PYTHON_FRAMEWORK_INCLUDES)
-  IF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
-    FOREACH(dir ${Python_FRAMEWORKS})
-      SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
-        ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION})
-    ENDFOREACH(dir)
-  ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
+  # Only look for include directory if library was found, this ensures
+  # that version will be matched between include dir and library
+  IF(PYTHON_LIBRARY)
+    SET(PYTHON_FRAMEWORK_INCLUDES)
+    IF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
+      FOREACH(dir ${Python_FRAMEWORKS})
+        SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
+          ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION})
+      ENDFOREACH(dir)
+    ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)

-  FIND_PATH(PYTHON_INCLUDE_DIR
-    NAMES Python.h
-    PATHS
-      ${PYTHON_FRAMEWORK_INCLUDES}
-      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
-    PATH_SUFFIXES
-      python${_CURRENT_VERSION}
-  )
+    # Search frameworks and registry locations first
+    FIND_PATH(PYTHON_INCLUDE_DIR
+      NAMES Python.h
+      PATHS
+        ${PYTHON_FRAMEWORK_INCLUDES}
+        [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+      NO_DEFAULT_PATH
+    )
+
+    # Broaden to default paths as a second step (mainly for UNIX)
+    FIND_PATH(PYTHON_INCLUDE_DIR
+      NAMES Python.h
+      PATH_SUFFIXES
+        python${_CURRENT_VERSION}
+    )
+  ENDIF(PYTHON_LIBRARY)

   # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
   SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL


FindODE finds ode-config even if it is not installed

--- CMakeModules/FindODE.cmake
+++ CMakeModules/FindODE.cmake
@@ -63,7 +63,7 @@
       set(ODE_DEFINITIONS_FOUND TRUE)
     else (PC_ODE_FOUND)
       # Try to use ode-config
-      find_program(ODECONFIG_EXECUTABLE ode-config)
+      find_program(ODECONFIG_EXECUTABLE ode-config PATHS ${ODE_ROOT})
       if (ODECONFIG_EXECUTABLE)
         execute_process(COMMAND ${ODECONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ODECONFIG_CFLAGS)
         set(ODE_DEFINITIONS ${ODECONFIG_CFLAGS} CACHE STRING "")
@@ -85,6 +85,8 @@
         endif (ODE_DEFINITIONS MATCHES -DdDOUBLE)
       else (ODE_DEFINITIONS_FOUND)
         message(STATUS "Warning: couldn't determine ODE's precision")
+        message(STATUS "    ... using double precision by default")
+	SET(ODE_DEFINITIONS -DdDOUBLE)
       endif (ODE_DEFINITIONS_FOUND)
     endif (NOT ODE_FIND_QUIETLY)
   else (ODE_FOUND)


PKG: XDK: fix is executable2 function for windows (check .exe and .dll)

--- SuperBuild/Packaging/PackageMacros.cmake
+++ SuperBuild/Packaging/PackageMacros.cmake
@@ -266,23 +266,20 @@
   get_filename_component(file_full "${file}" ABSOLUTE)
   string(TOLOWER "${file_full}" file_full_lower)

-  # If file name ends in .exe on Windows, *assume* executable:
-  #
+  # If file name ends in .exe on Windows, *assume* executable.
+  # And If file name ends in .dll on Windows, *assume* libary.
   if(WIN32 AND NOT UNIX)
-    if("${file_full_lower}" MATCHES "\\.lnk$")
-      set(${result_var1} 1 PARENT_SCOPE)
-      #Assuming the file is linked to a file with same name without .lnk extension
-      get_filename_component(name_we_lnk "${file_full_lower}" NAME_WE)
-      set(${result_var2} "${name_we_lnk}" PARENT_SCOPE)
+    if("${file_full_lower}" MATCHES "(\\.exe|\\.dll)$")
+      set(${result_var} 1 PARENT_SCOPE)
       return()
     endif()
-
+
     # A clause could be added here that uses output or return value of dumpbin
     # to determine ${result_var}. In 99%+? practical cases, the exe name
     # match will be sufficient...
     #
   endif()
-
+
   # Use the information returned from the Unix shell command "file" to
   # determine if ${file_full} should be considered an executable file...
   #