cmake: create options -> check dependencies -> process settings

--- cmake/bvs-options.cmake
+++ cmake/bvs-options.cmake
@@ -1,3 +1,6 @@
+###############
+### OPTIONS ###
+###############
 # BVS_ANDROID_APP
 set(BVS_ANDROID_APP FALSE CACHE BOOL "Generate Android targets!")
 mark_as_advanced(BVS_ANDROID_APP)
@@ -5,26 +8,57 @@
 # BVS_GCC_VISIBILITY
 set(BVS_GCC_VISIBILITY ON CACHE BOOL "Enable gcc's visibility feature (reduce dynamic library load times as well as decrease library size).")
 mark_as_advanced(BVS_GCC_VISIBILITY)
-if(BVS_GCC_VISIBILITY)
-	add_definitions(-DBVS_GCC_VISIBILITY -fvisibility=hidden)
-endif()

 # BVS_LOG_SYSTEM
 set(BVS_LOG_SYSTEM ON CACHE BOOL "Enable BVS builtin log system.")
-if(BVS_LOG_SYSTEM)
-	add_definitions(-DBVS_LOG_SYSTEM)
-endif()

 # BVS_MODULE_HOTSWAP
 set(BVS_MODULE_HOTSWAP OFF CACHE BOOL "Enable BVS's HotSwap(TM;-) facilities. WARNING: DEVELOPERS ONLY!")
 mark_as_advanced(BVS_MODULE_HOTSWAP)
-if(BVS_MODULE_HOTSWAP)
-	add_definitions(-DBVS_MODULE_HOTSWAP)
-endif()

 # BVS_STATIC_MODULES
 set(BVS_STATIC_MODULES OFF CACHE BOOL "Enable compilation of static modules and creation of single library object!")
 mark_as_advanced(BVS_STATIC_MODULES)
+
+# BVS_THREAD_NAMES
+set(BVS_THREAD_NAMES ${UNIX} CACHE BOOL "Enable thread naming (htop: enable 'Show custom thread names', or try 'ps -La'). UNIX ONLY!")
+mark_as_advanced(BVS_THREAD_NAMES)
+
+# BVS_OSX_ANOMALIES
+set(BVS_OSX_ANOMALIES ${APPLE} CACHE BOOL "Enable OSX anomalies, e.g. 'so->dylib'.")
+mark_as_advanced(BVS_OSX_ANOMALIES)
+
+
+####################
+### DEPENDENCIES ###
+####################
+add_dependency(BVS_STATIC_MODULES ON_IF BVS_ANDROID_APP)
+add_dependency(BVS_MODULE_HOTSWAP OFF_IF BVS_STATIC_MODULES)
+add_dependency(BVS_GCC_VISIBILITY OFF_IF BVS_ANDROID_APP)
+
+
+
+################
+### SETTINGS ###
+################
+if(BVS_GCC_VISIBILITY)
+	add_definitions(-DBVS_GCC_VISIBILITY -fvisibility=hidden)
+else()
+	remove_definitions(-DBVS_GCC_VISIBILITY -fvisibility=hidden)
+endif()
+
+if(BVS_LOG_SYSTEM)
+	add_definitions(-DBVS_LOG_SYSTEM)
+else()
+	remove_definitions(-DBVS_LOG_SYSTEM)
+endif()
+
+if(BVS_MODULE_HOTSWAP)
+	add_definitions(-DBVS_MODULE_HOTSWAP)
+else()
+	remove_definitions(-DBVS_MODULE_HOTSWAP)
+endif()
+
 if(BVS_STATIC_MODULES)
 	set(BVS_MODULE_TYPE STATIC)
 	set(BVS_LINK_LIBRARIES "")
@@ -33,22 +67,17 @@
 else()
 	set(BVS_MODULE_TYPE SHARED)
 	set(BVS_LINK_LIBRARIES bvs)
+	remove_definitions(-DBVS_STATIC_MODULES)
 endif()

-# BVS_THREAD_NAMES
-set(BVS_THREAD_NAMES ${UNIX} CACHE BOOL "Enable thread naming (htop: enable 'Show custom thread names', or try 'ps -La'). UNIX ONLY!")
-mark_as_advanced(BVS_THREAD_NAMES)
 if(BVS_THREAD_NAMES)
 	add_definitions(-DBVS_THREAD_NAMES)
+else()
+	remove_definitions(-DBVS_THREAD_NAMES)
 endif()

-# BVS_OSX_ANOMALIES
-set(BVS_OSX_ANOMALIES ${APPLE} CACHE BOOL "Enable OSX anomalies, e.g. 'so->dylib'.")
-mark_as_advanced(BVS_OSX_ANOMALIES)
 if(BVS_OSX_ANOMALIES)
 	add_definitions(-DBVS_OSX_ANOMALIES)
+else()
+	remove_definitions(-DBVS_OSX_ANOMALIES)
 endif()
-
-# DEPENDENCIES
-add_dependency(BVS_STATIC_MODULES ON_IF BVS_ANDROID_APP)
-add_dependency(BVS_MODULE_HOTSWAP OFF_IF BVS_STATIC_MODULES)


Removed cruft and changed version requirements to GCC 4.8 and Clang 3.3.

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -19,19 +19,14 @@
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_OPTS}")
 ENDIF()

-# Note: If -ObjC++ is not used then -std=c++11 will not work when
-# mixing C++/ObjC on GCC/CLang.
-
 IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
   EXECUTE_PROCESS(
     COMMAND
     ${CMAKE_CXX_COMPILER} -dumpversion
     OUTPUT_VARIABLE GCC_VERSION
     )
-  IF (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
-    MESSAGE(FATAL_ERROR "Requires GCC >= 4.7.")
-  ELSE()
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ObjC++")
+  IF (NOT (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8))
+    MESSAGE(FATAL_ERROR "Requires GCC >= 4.8.")
   ENDIF()
 ELSEIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
   EXECUTE_PROCESS(
@@ -39,10 +34,10 @@
     ${CMAKE_CXX_COMPILER} -dumpversion
     OUTPUT_VARIABLE CLANG_VERSION
     )
-  IF (NOT (CLANG_VERSION VERSION_GREATER 3.2 OR GCC_VERSION VERSION_EQUAL 3.2))
-    MESSAGE(FATAL_ERROR "Requires Clang >= 3.2.")
+  IF (NOT (CLANG_VERSION VERSION_GREATER 3.3 OR GCC_VERSION VERSION_EQUAL 3.3))
+    MESSAGE(FATAL_ERROR "Requires Clang >= 3.3.")
   ELSE()
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -ObjC++")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
   ENDIF()
 ELSEIF (MSVC AND (MSVC10 OR MSVC11 OR MSVC12))
   # C++11 support is implicitly enabled.


adding STM32F765VIT6

adding STM32F765VIT6

--- cmake/gcc_stm32f7.cmake
+++ cmake/gcc_stm32f7.cmake
@@ -5,8 +5,8 @@
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections -mthumb -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -mabi=aapcs" CACHE INTERNAL "executable linker flags")
 SET(CMAKE_MODULE_LINKER_FLAGS "-mthumb -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -mabi=aapcs" CACHE INTERNAL "module linker flags")
 SET(CMAKE_SHARED_LINKER_FLAGS "-mthumb -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -mabi=aapcs" CACHE INTERNAL "shared linker flags")
-SET(STM32_CHIP_TYPES 745xx 746xx 756xx 767xx 777xx 769xx 779xx CACHE INTERNAL "stm32f7 chip types")
-SET(STM32_CODES "745.." "746.." "756.." "767.." "777.." "769.." "779..")
+SET(STM32_CHIP_TYPES 745xx 746xx 756xx 765xx 767xx 777xx 769xx 779xx CACHE INTERNAL "stm32f7 chip types")
+SET(STM32_CODES "745.." "746.." "756.." "765.." "767.." "777.." "769.." "779..")

 MACRO(STM32_GET_CHIP_TYPE CHIP CHIP_TYPE)
     STRING(REGEX REPLACE "^[sS][tT][mM]32[fF](7[4567][5679].[EGI]).*$" "\\1" STM32_CODE ${CHIP})
@@ -41,6 +41,8 @@
         SET(RAM "320K")
     ELSEIF(${TYPE} STREQUAL "756xx")
         SET(RAM "320K")
+    ELSEIF(${TYPE} STREQUAL "765xx")
+        SET(RAM "512K")
     ELSEIF(${TYPE} STREQUAL "767xx")
         SET(RAM "512K")
     ELSEIF(${TYPE} STREQUAL "777xx")


"migration" to c++14

"migration" to c++14

--- source/cmake_modules/CompilationFlags.cmake
+++ source/cmake_modules/CompilationFlags.cmake
@@ -14,7 +14,7 @@
 # Gcc Release flags
 if(CMAKE_COMPILER_IS_GNUCXX)
     set(CMAKE_GNUCXX_WARN_FLAGS "-Wall -Wextra -Woverloaded-virtual -Wundef -pedantic")
-    set(CMAKE_GNUCXX_COMMON_FLAGS "-std=c++0x -rdynamic -g")
+    set(CMAKE_GNUCXX_COMMON_FLAGS "-std=c++14 -rdynamic -g")
     set(CMAKE_CXX_FLAGS "${CMAKE_GNUCXX_COMMON_FLAGS} ${CMAKE_GNUCXX_WARN_FLAGS}")
     set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAG} --coverage -fprofile-arcs -ftest-coverage  -g")
     set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS} --coverage")


MPL added to build sources dir

MPL added to build sources dir

--- src/cmake/sources.cmake
+++ src/cmake/sources.cmake
@@ -10,6 +10,7 @@
     But/Container
     But/Log
     But/Log/detail
+    But/Mpl
     But/System
     But/Pattern
     But/Pattern/detail


Cleanup

Cleanup

--- src/cmake_install.cmake
+++ src/cmake_install.cmake
@@ -1,60 +0,0 @@
-# Install script for directory: /Users/nicolas/git-repos/cut-pursuit/src
-
-# Set the install prefix
-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  set(CMAKE_INSTALL_PREFIX "/Users/nicolas/git-repos/cut-pursuit/install")
-endif()
-string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  if(BUILD_TYPE)
-    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  else()
-    set(CMAKE_INSTALL_CONFIG_NAME "")
-  endif()
-  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-endif()
-
-# Set the component getting installed.
-if(NOT CMAKE_INSTALL_COMPONENT)
-  if(COMPONENT)
-    message(STATUS "Install component: \"${COMPONENT}\"")
-    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  else()
-    set(CMAKE_INSTALL_COMPONENT)
-  endif()
-endif()
-
-# Is this installation the result of a crosscompile?
-if(NOT DEFINED CMAKE_CROSSCOMPILING)
-  set(CMAKE_CROSSCOMPILING "FALSE")
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
-  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/Users/nicolas/git-repos/cut-pursuit/src/libcp.dylib")
-  if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libcp.dylib" AND
-     NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libcp.dylib")
-    execute_process(COMMAND /usr/bin/install_name_tool
-      -delete_rpath "/usr/local/lib"
-      "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libcp.dylib")
-    if(CMAKE_INSTALL_DO_STRIP)
-      execute_process(COMMAND "/Library/Developer/CommandLineTools/usr/bin/strip" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libcp.dylib")
-    endif()
-  endif()
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
-endif()
-
-if(CMAKE_INSTALL_COMPONENT)
-  set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
-else()
-  set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-endif()
-
-string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
-       "${CMAKE_INSTALL_MANIFEST_FILES}")
-file(WRITE "/Users/nicolas/git-repos/cut-pursuit/src/${CMAKE_INSTALL_MANIFEST}"
-     "${CMAKE_INSTALL_MANIFEST_CONTENT}")


Commented out libxml2 test step because it fails on OSX???!!

--- libxml2.cmake
+++ libxml2.cmake
@@ -37,7 +37,7 @@
         CPPFLAGS=-I${BUILDEM_DIR}/include
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} $(MAKE) install
-    TEST_COMMAND        ${BUILDEM_ENV_STRING} $(MAKE) check
+    #TEST_COMMAND        ${BUILDEM_ENV_STRING} $(MAKE) check #FIXME: The make check step fails on Mac OS X!
     )


From Jean-Sebastien Guay, added new version of feetype into search list

git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@7739 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -52,7 +52,7 @@

 MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
         FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D")
-        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype219;freetype234;freetype234MT" ${OSG_3RDPARTY_BIN} "_D")
+        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype219;freetype234;freetype234MT;freetype235" ${OSG_3RDPARTY_BIN} "_D")
         IF(FREETYPE_FOUND)
             #forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
             SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "")


ENH: Bump latest version of the ITKSplitComponents remote module.

Update the commit hash to the latest version of the ITKSplitComponents
remote module.

The laterst version includes the C++11 changes for the ITKv5 transition.

Change-Id: I067b3198be4337435d200da1b740199f6b15dbaf

--- Modules/Remote/SplitComponents.remote.cmake
+++ Modules/Remote/SplitComponents.remote.cmake
@@ -5,5 +5,5 @@
 itk::Image of, for example, itk::Vector, itk::CovariantVector, or
 itk::SymmetricSecondRankTensor. https://hdl.handle.net/10380/3230"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSplitComponents.git
-  GIT_TAG cbdffce3996cb4a1de856bde99cfc4cf7f99cd5b
+  GIT_TAG 84e42828e0cc92e9d3fadd70872c6031ca646294
   )


BUG: bumped elastix git to latest version

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -20,7 +20,7 @@
 set( proj Elastix )

 set( ELASTIX_GIT_REPOSITORY http://github.com/kaspermarstal/elastix )
-set( ELASTIX_GIT_TAG 25c9dec600979a997faa373d7cd5259f65fac220 )
+set( ELASTIX_GIT_TAG 3c7deef6d4f44203207bc198cc27f011ac1222c7 )

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_GIT_REPOSITORY}


adding copyright header

adding copyright header

Summary: as in the title

Reviewed By: Croohand

Differential Revision: D30041822

fbshipit-source-id: 923158fcba241f5cd2ace8f87fa12083fd22356c

--- build/fbcode_builder/CMake/RustStaticLibrary.cmake
+++ build/fbcode_builder/CMake/RustStaticLibrary.cmake
@@ -1,3 +1,5 @@
+# Copyright (c) Facebook, Inc. and its affiliates.
+
 include(FBCMakeParseArgs)

 set(
@@ -286,4 +288,4 @@
     RENAME ${staticlib_output_name}
     DESTINATION ${ARG_INSTALL_DIR}
   )
-endfunction()+endfunction()


Added new constant

Added new constant

--- version.h.cmake
+++ version.h.cmake
@@ -3,7 +3,8 @@

 #define ICAVDESK_NAME 		"${PROJECT_NAME}"

-#define ICAVDESK_AUTHOR 	"Anton Dobkin <anton.dobkin@gmail.com>"
+#define ICAVDESK_AUTHOR 	"Anton Dobkin"
+#define ICAVDESK_AUTHOR_EMAIL 	"anton.dobkin@gmail.com"

 #define ICAVDESK_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"


Change version alignment on doc page

Change version alignment on doc page

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -22,65 +22,87 @@
 )

 file(GLOB ENTRIES RELATIVE ${CMAKE_SOURCE_DIR} *-*)
-set(VERSIONS)
-set(PROJECTS)
+list(SORT ENTRIES)
+list(REVERSE ENTRIES)
+set(MAX_VERSIONS 0)
+set(LAST_PROJECT)

 # Create project and version lists
 foreach(ENTRY ${ENTRIES})
   string(REGEX REPLACE "^(.+)-.+$" "\\1" PROJECT ${ENTRY})
-  string(REGEX REPLACE "^.+-(.+)$" "\\1" VERSION ${ENTRY})
-
-  list(FIND VERSIONS "${VERSION}" VERSION_FOUND)
-  if(VERSION_FOUND EQUAL -1)
-    list(APPEND VERSIONS "${VERSION}")
-  endif()
-
-  list(FIND PROJECTS "${PROJECT}" PROJECT_FOUND)
-  if(PROJECT_FOUND EQUAL -1)
-    list(APPEND PROJECTS "${PROJECT}")
+  if(PROJECT STREQUAL LAST_PROJECT)
+    math(EXPR VERSIONS "${VERSIONS} + 1")
+  else()
+    if(VERSIONS GREATER MAX_VERSIONS)
+      set(MAX_VERSIONS ${VERSIONS})
+    endif()
+    set(VERSIONS 1)
+    set(LAST_PROJECT ${PROJECT})
   endif()
 endforeach()
-list(SORT VERSIONS)
-list(REVERSE VERSIONS)
-list(SORT PROJECTS)

 # generate version table
-list(LENGTH VERSIONS NUM_VERSIONS)
 set(GIT_DOCUMENTATION_INSTALL)
+set(LAST_PROJECT)
+set(VERSIONS 0)

 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-  "
Project	Versions	")
+  "
Project	Versions	")
 if(DOXYGIT_PROJECT_EXTRA)
   file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html" "Status	")
 endif()

-foreach(PROJECT ${PROJECTS})
-  if(DOXYGIT_PROJECT_EXTRA)
-    string(REPLACE "[PROJECT]" "${PROJECT}" DOXYGIT_PROJECT_EXTRA_
-      ${DOXYGIT_PROJECT_EXTRA})
+foreach(ENTRY ${ENTRIES})
+  string(REGEX REPLACE "^(.+)-.+$" "\\1" PROJECT ${ENTRY})
+  string(REGEX REPLACE "^.+-(.+)$" "\\1" VERSION ${ENTRY})
+
+  if(NOT PROJECT STREQUAL LAST_PROJECT) # finish and start new table row
+    if(LAST_PROJECT)
+      # fill unused versions
+      math(EXPR FILL_VERSIONS "${MAX_VERSIONS} - ${VERSIONS}")
+      if(FILL_VERSIONS)
+        file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+          "	")
+      endif()
+
+      # CI status
+      if(DOXYGIT_PROJECT_EXTRA AND LAST_PROJECT)
+        string(REPLACE "[PROJECT]" "${LAST_PROJECT}" DOXYGIT_PROJECT_EXTRA_
+          ${DOXYGIT_PROJECT_EXTRA})
+        file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+          "${DOXYGIT_PROJECT_EXTRA_}	")
+      endif()
+    endif()
+
+    # next row
+    file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+      "
\n"
+      "
${PROJECT}	")
+
+    set(VERSIONS 0)
+    set(LAST_PROJECT ${PROJECT})
   endif()
+
+  math(EXPR VERSIONS "${VERSIONS} + 1")
   file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-    "
\n"
-    "
${PROJECT}	")
-  foreach(VERSION ${VERSIONS})
-    set(ENTRY "${PROJECT}-${VERSION}")
-    list(FIND ENTRIES "${ENTRY}" HAS_ENTRY)
-    if(HAS_ENTRY EQUAL -1)
-      file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html" "	")
-    else()
-      file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-        "${VERSION}	")
-      list(APPEND GIT_DOCUMENTATION_INSTALL ${ENTRY})
-    endif()
-  endforeach()
-  if(DOXYGIT_PROJECT_EXTRA_)
-    file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
-      "${DOXYGIT_PROJECT_EXTRA_}	")
-  endif()
+    "${VERSION}	")
+  list(APPEND GIT_DOCUMENTATION_INSTALL ${ENTRY})
 endforeach()

-execute_process(COMMAND "${GIT_EXECUTABLE}" add images ${ENTRIES}
-    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
+# fill unused versions
+math(EXPR FILL_VERSIONS "${MAX_VERSIONS} - ${VERSIONS}")
+if(FILL_VERSIONS)
+  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+    "	")
+endif()
+
+# CI status
+if(DOXYGIT_PROJECT_EXTRA AND LAST_PROJECT)
+  string(REPLACE "[PROJECT]" "${LAST_PROJECT}" DOXYGIT_PROJECT_EXTRA_
+    ${DOXYGIT_PROJECT_EXTRA})
+  file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
+    "${DOXYGIT_PROJECT_EXTRA_}	")
+endif()

 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/index.html"
 "
\n"
@@ -94,11 +116,12 @@
 update_file("${CMAKE_CURRENT_BINARY_DIR}/index.html"
   "${CMAKE_SOURCE_DIR}/index.html")

-if(VERSION_MAJOR) # hack to detect if invoked as script
-  foreach(FOLDER ${GIT_DOCUMENTATION_INSTALL})
-    install(DIRECTORY ${FOLDER} DESTINATION share/${CMAKE_PROJECT_NAME}
-      CONFIGURATIONS Release)
-  endforeach()
-  install(FILES index.html DESTINATION share/${CMAKE_PROJECT_NAME}
+execute_process(COMMAND "${GIT_EXECUTABLE}" add images ${ENTRIES}
+    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
+
+foreach(FOLDER ${GIT_DOCUMENTATION_INSTALL})
+  install(DIRECTORY ${FOLDER} DESTINATION share/${CMAKE_PROJECT_NAME}
     CONFIGURATIONS Release)
-endif()+endforeach()
+install(FILES index.html DESTINATION share/${CMAKE_PROJECT_NAME}
+  CONFIGURATIONS Release)


Disable L500 Depth Invalidation flag by default

--- CMake/lrs_options.cmake
+++ CMake/lrs_options.cmake
@@ -31,5 +31,5 @@
 option(FORCE_LIBUVC "Explicitly turn-on libuvc backend - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
 option(FORCE_WINUSB_UVC "Explicitly turn-on winusb_uvc (for win7) backend - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
 option(ANDROID_USB_HOST_UVC "Build UVC backend for Android - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
-option(ENABLE_L500_DEPTH_INVALIDATION "Turn on the depth frame validator to automatically catch corrupted frames and restart the sensor" ON)
+option(ENABLE_L500_DEPTH_INVALIDATION "Turn on the depth frame validator to automatically catch corrupted frames and restart the sensor" OFF)
 option(CHECK_FOR_UPDATES "Checks for versions updates" OFF)


Fix all instances of 'build' folder being used to prevent errors on make

--- cmake/External/Protobuf.cmake
+++ cmake/External/Protobuf.cmake
@@ -30,10 +30,10 @@
       )

     set(PROTOBUF_FOUND TRUE)
-    set(PROTOBUF_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/protobuf/build/include)
-    set(PROTOBUF_LIBRARIES ${CMAKE_SOURCE_DIR}/third_party/protobuf/build/lib/libprotobuf.so)
-    set(PROTOBUF_LIBRARY_DIRS ${CMAKE_SOURCE_DIR}/third_party/protobuf/build/lib)
-    set(PROTOBUF_PROTOC_EXECUTABLE ${CMAKE_SOURCE_DIR}/third_party/protobuf/build/bin/protoc)
+    set(PROTOBUF_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/protobuf/_build/include)
+    set(PROTOBUF_LIBRARIES ${CMAKE_SOURCE_DIR}/third_party/protobuf/_build/lib/libprotobuf.so)
+    set(PROTOBUF_LIBRARY_DIRS ${CMAKE_SOURCE_DIR}/third_party/protobuf/_build/lib)
+    set(PROTOBUF_PROTOC_EXECUTABLE ${CMAKE_SOURCE_DIR}/third_party/protobuf/_build/bin/protoc)
     set(PROTOBUF_EXTERNAL TRUE)

     list(APPEND external_project_dependencies protobuf_external)


CMake: FindPETSC.cmake: Drop /.../include/scotch from include dirs

scotch has the very unfortunate bad habit of containing a header file

  /usr/include/scotch/metis.h

If above directory is in our list of include directories, we will
accidentally pick up this header instead of /usr/include/metis.h

I assume it is safe to drop /usr/include/scotch/, this should be only
internally used in PETSc...

--- cmake/modules/FindPETSC.cmake
+++ cmake/modules/FindPETSC.cmake
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2014 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -156,7 +156,11 @@

   SET(_petsc_includes)
   FOREACH(_token ${_external_includes})
-    IF(_token MATCHES "^-I")
+    #
+    # workaround: Do not pull in scotch include directory. It clashes with
+    # our use of the metis headers...
+    #
+    IF(_token MATCHES "^-I" AND NOT _token MATCHES "scotch$")
       STRING(REGEX REPLACE "^-I" "" _token "${_token}")
       LIST(APPEND _petsc_includes ${_token})
     ENDIF()


set required version for some dependencies when using system versions

When using the SYSTEM version of a dependency, require HDF5 1.8 (1.8.17 on
Windows), Boost 1.36.0 and SWIG 2. scope for more.

Most/all of these should be caught by later on by the SIRF CMake file
etc, but putting them here means that the user will see failure at
initial configure time, as opposed to somewhere half-way the build.

It also fixes a problem on Windows that ISMRMRD doesn't currently check
for 1.8.17.

--- version_config.cmake
+++ version_config.cmake
@@ -23,6 +23,7 @@

 ## BOOST
 set(Boost_VERSION 1.63.0)
+set(Boost_REQUIRED_VERSION 1.36.0)
 set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.zip)
 set(Boost_MD5 3c706b3fc749884ea5510c39474fd732)

@@ -47,15 +48,18 @@
 set(FFTW3double_MD5 ${FFTW3_MD5})

 ## HDF5
-#if (WIN32)
-  set(HDF5_URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/hdf5-1.10.1.tar.gz)
-  set(HDF5_MD5 43a2f9466702fb1db31df98ae6677f15 )
-#else()
-#  set(HDF5_URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/CMake-hdf5-1.10.0-patch1.tar.gz )
-#  set(HDF5_MD5 6fb456d03a60f358f3c077288a6d1cd8 )
-#endif()
+if (WIN32)
+  # 1.8.15 hdf5-targets.cmake refers to non-existent zlib files
+  # (or at least this was the case for older Anaconda installations)
+  set(HDF5_REQUIRED_VERSION 1.8.17)
+else()
+  set(HDF5_REQUIRED_VERSION 1.8)
+endif()
+set(HDF5_URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/hdf5-1.10.1.tar.gz)
+set(HDF5_MD5 43a2f9466702fb1db31df98ae6677f15 )

 ## SWIG
+set (SWIG_REQUIRED_VERSION 2)
 if (WIN32)
   set(SWIG_URL http://downloads.sourceforge.net/swig/swigwin-3.0.12.zip  )
   set(SWIG_MD5 a49524dad2c91ae1920974e7062bfc93 )


updated STIR version

updated STIR version

--- version_config.cmake
+++ version_config.cmake
@@ -120,7 +120,7 @@

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG bbc4acd55ad88c2040d22e2a192633841821f588 )
+  set(DEFAULT_STIR_TAG 36200d37f83a9487a6eb3929b007967907910948 )

   ## Gadgetron
   set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )


restoring minimally required ISPC version to v1.8.2

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -25,7 +25,7 @@

 IF (ENABLE_ISPC_SUPPORT)

-SET(ISPC_VERSION_REQUIRED "1.8.3")
+SET(ISPC_VERSION_REQUIRED "1.8.2")

 IF (NOT ISPC_EXECUTABLE)
   # try sibling folder as hint for path of ISPC


when using as subproject, prevent CMake from finding other installations

--- OverkitSubproject.cmake
+++ OverkitSubproject.cmake
@@ -42,7 +42,7 @@
     ALWAYS 1
   )

-  find_package(Overkit QUIET CONFIG REQUIRED PATHS "${CONFIGURE_OVERKIT_ARG_BINARY_DIR}")
+  find_package(Overkit QUIET CONFIG REQUIRED PATHS "${CONFIGURE_OVERKIT_ARG_BINARY_DIR}" NO_DEFAULT_PATH)

   foreach(LIBRARY ${Overkit_LIBRARIES})
     add_dependencies(${LIBRARY} OverkitSubproject)


build: detect GNU Assembler AVX-512 bug and disable AVX-512 variants if needed

Type: fix
Change-Id: I098f6c79be3c2e4db001edc0cf0a229bf6e0b13d
Signed-off-by: Damjan Marion <9141bba8b2efed526e55cf796d48631af330ad98@cisco.com>

--- src/cmake/cpu.cmake
+++ src/cmake/cpu.cmake
@@ -56,6 +56,22 @@
     CACHE STRING "Target CPU cache line size (power of 2)")

 ##############################################################################
+# Gnu Assembler AVX-512 bug detection
+# - see: https://sourceware.org/bugzilla/show_bug.cgi?id=23465
+##############################################################################
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
+  if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+    set(pfx ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/gas_avx512_bug_test)
+    file(WRITE ${pfx}.s "vmovaps 0x40(,%rax), %zmm0\n")
+    execute_process(COMMAND ${CMAKE_C_COMPILER} -c ${pfx}.s -o ${pfx}.o)
+    execute_process(COMMAND objdump -s ${pfx}.o OUTPUT_VARIABLE _output)
+    if (NOT _output MATCHES "62f17c48 28040540 000000")
+      set(GNU_ASSEMBLER_AVX512_BUG 1)
+    endif()
+  endif()
+endif()
+
+##############################################################################
 # CPU optimizations and multiarch support
 ##############################################################################
 if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
@@ -64,10 +80,14 @@
   if(compiler_flag_march_core_avx2)
     list(APPEND MARCH_VARIANTS "avx2\;-march=core-avx2 -mtune=core-avx2")
   endif()
-  check_c_compiler_flag("-march=skylake-avx512" compiler_flag_march_skylake_avx512)
-  check_c_compiler_flag("-march=icelake-client" compiler_flag_march_icelake_client)
-  if(compiler_flag_march_skylake_avx512)
-    list(APPEND MARCH_VARIANTS "avx512\;-march=skylake-avx512 -mtune=skylake-avx512")
+  if (GNU_ASSEMBLER_AVX512_BUG)
+     message(WARNING "AVX-512 multiarch variant(s) disabled due to GNU Assembler bug")
+  else()
+    check_c_compiler_flag("-march=skylake-avx512" compiler_flag_march_skylake_avx512)
+    check_c_compiler_flag("-march=icelake-client" compiler_flag_march_icelake_client)
+    if(compiler_flag_march_skylake_avx512)
+      list(APPEND MARCH_VARIANTS "avx512\;-march=skylake-avx512 -mtune=skylake-avx512")
+    endif()
   endif()
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
   set(CMAKE_C_FLAGS "-march=armv8-a+crc ${CMAKE_C_FLAGS}")


Fix CLucene finding by using the right macro.

svn path=/trunk/playground/base/strigi/; revision=627487

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -14,11 +14,11 @@
 ENDIF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)

   SET(TRIAL_LIBRARY_PATHS
-    $ENV{CLUCENE_HOME}/${LIB_DESTINATION}
-    $ENV{HOME}/testinstall/${LIB_DESTINATION}
-    /usr/${LIB_DESTINATION}
-    /usr/local/${LIB_DESTINATION}
-    /sw/${LIB_DESTINATION}
+    $ENV{CLUCENE_HOME}/lib${LIB_SUFFIX}
+    $ENV{HOME}/testinstall/lib${LIB_SUFFIX}
+    /usr/lib${LIB_SUFFIX}
+    /usr/local/lib${LIB_SUFFIX}
+    /sw/lib${LIB_SUFFIX}
   )
   SET(TRIAL_INCLUDE_PATHS
     $ENV{CLUCENE_HOME}/include


remove rt lib if mac os

remove rt lib if mac os

--- cmake/FindRdKafka.cmake
+++ cmake/FindRdKafka.cmake
@@ -55,7 +55,11 @@

 if (RdKafka_FOUND)
     add_library(RdKafka::rdkafka ${RDKAFKA_LIBRARY_TYPE} IMPORTED GLOBAL)
-    set(RDKAFKA_DEPENDENCIES pthread rt ssl crypto dl z)
+    if (UNIX AND NOT APPLE)
+        set(RDKAFKA_DEPENDENCIES pthread rt ssl crypto dl z)
+    else()
+        set(RDKAFKA_DEPENDENCIES pthread ssl crypto dl z)
+    endif()
     set_target_properties(RdKafka::rdkafka PROPERTIES
             IMPORTED_NAME RdKafka
             IMPORTED_LOCATION "${RdKafka_LIBRARY_PATH}"


Removed CMP0051 fix.

Removed CMP0051 fix.

This CMake module ignores any generator expressions in the source targets,
independent on the CMP0051 setting. If the user decides to use use generator
expressions in the targets source property, he should set the policy itself.
There should be no additional overload, as the current behaviour forces ALL
users to set CMP0011 to NEW.

--- cmake/Findcodecov.cmake
+++ cmake/Findcodecov.cmake
@@ -21,14 +21,6 @@
 	# gcc and clang fallback
 	"-O0 -g --coverage"
 )
-
-
-# To avoid error messages about CMP0051, this policy will be set to new. There
-# will be no problem, as TARGET_OBJECTS generator expressions will be filtered
-# with a regular expression from the sources.
-if (POLICY CMP0051)
-	cmake_policy(SET CMP0051 NEW)
-endif()

 # Add coverage support for target ${TNAME} and register target for coverage


cmake: don't use -isystem for opencv_contrib paths

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -86,7 +86,9 @@
   set(__add_before "")
   foreach(dir ${ARGN})
     get_filename_component(__abs_dir "${dir}" ABSOLUTE)
-    if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
+    if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}"
+        OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}"
+        OR (OPENCV_EXTRA_MODULES_PATH AND "${__abs_dir}" MATCHES "^${OPENCV_EXTRA_MODULES_PATH}"))
       list(APPEND __add_before "${dir}")
     else()
       include_directories(AFTER SYSTEM "${dir}")
@@ -101,7 +103,9 @@
   set(__params "")
   foreach(dir ${ARGN})
     get_filename_component(__abs_dir "${dir}" ABSOLUTE)
-    if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
+    if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}"
+        OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}"
+        OR (OPENCV_EXTRA_MODULES_PATH AND "${__abs_dir}" MATCHES "^${OPENCV_EXTRA_MODULES_PATH}"))
       list(APPEND __params "${__abs_dir}")
     else()
       list(APPEND __params "${dir}")


cmake: adds Python 3.8 to the list of supported versions

--- cmake/SetupPython.cmake
+++ cmake/SetupPython.cmake
@@ -17,7 +17,7 @@
     # ==========================================================================

     if( NOT  Python_ADDITIONAL_VERSIONS )
-        set( Python_ADDITIONAL_VERSIONS 3.7 3.6 3 )
+        set( Python_ADDITIONAL_VERSIONS 3.8 3.7 3.6 3 )
     endif()

     if( SIXTRACKL_ENABLE_PYTHON AND NOT PYTHONINTERP_FOUND )


drop https

drop https

--- cmake/get-tinyxml.cmake
+++ cmake/get-tinyxml.cmake
@@ -13,7 +13,7 @@
   PREFIX                ${DEPENDENCY_EXTRACT_DIR}
   DOWNLOAD_DIR          ${DEPENDENCY_DOWNLOAD_DIR}
   DOWNLOAD_NAME         tinyxml-v${TINYXML_VERSION}.zip
-  URL                   https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.zip/download
+  URL                   http://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.zip/download
   URL_MD5               2a0aaf609c9e670ec9748cd01ed52dae
   PATCH_COMMAND         ${CMAKE_COMMAND} -E copy ${CMAKE_MODULE_PATH}/patches/tinyxml/CMakeLists.txt  ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml
   INSTALL_COMMAND       ${CMAKE_COMMAND} -E make_directory ${DEPENDENCY_INSTALL_DIR}/include/tinyxml


Change logic so it works for CMake 2.6.x prior to 2.6.2.

svn path=/trunk/; revision=9427

--- cmake/modules/lua.cmake
+++ cmake/modules/lua.cmake
@@ -47,7 +47,12 @@
   option(HAVE_lua51 "Lua version is 5.1" OFF)
   if(HAVE_lua51)
     find_package(Lua51)
-    set(LUA_FOUND ${LUA51_FOUND})
+    # Variety of return values possible depending on whether 2.6.0 or later.
+    if(DEFINED LUA50_FOUND)
+      set(LUA_FOUND ${LUA50_FOUND})
+    elseif(DEFINED LUA51_FOUND)
+      set(LUA_FOUND ${LUA51_FOUND})
+    endif(DEFINED LUA50_FOUND)
   else(HAVE_lua51)
     find_package(Lua50)
     set(LUA_FOUND LUA50_FOUND)
@@ -79,14 +84,16 @@
     )
   #message("(preliminary) LUA_VERSION = ${LUA_VERSION}")
   string(REGEX MATCH "[0-9]\\.[0-9]\\.[0-9]" LUA_VERSION "${LUA_VERSION}")
+  #message("(dotted triplet) LUA_VERSION = ${LUA_VERSION}")
+  # Reduce to just major.minor for purposes of comparison.
+  string(SUBSTRING "${LUA_VERSION}" 0 3 LUA_VERSION)
   message(STATUS "LUA_VERSION = ${LUA_VERSION}")
   set(LUA_VERSION_VALID)
-  if(${LUA_VERSION} VERSION_LESS "5.1.0" AND NOT HAVE_lua51)
+  if(${LUA_VERSION} STREQUAL "5.0" AND NOT HAVE_lua51)
     set(LUA_VERSION_VALID ON)
-  endif(${LUA_VERSION} VERSION_LESS "5.1.0" AND NOT HAVE_lua51)
-  if(${LUA_VERSION} VERSION_GREATER "5.0.9999999" AND HAVE_lua51)
+  elseif(${LUA_VERSION} STREQUAL "5.1" AND HAVE_lua51)
     set(LUA_VERSION_VALID ON)
-  endif(${LUA_VERSION} VERSION_GREATER "5.0.9999999" AND HAVE_lua51)
+  endif(${LUA_VERSION} STREQUAL "5.0" AND NOT HAVE_lua51)

   if(NOT LUA_VERSION_VALID)
     message(STATUS "WARNING: "


setting timeout for klocwork run to 2 hours

--- common/cmake/test.cmake
+++ common/cmake/test.cmake
@@ -106,7 +106,8 @@
   ENDMACRO()

   IF (EMBREE_TESTING_KLOCWORK)
-    ADD_TEST(NAME "Klocwork" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork.sh)
+    ADD_TEST(NAME Klocwork WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork.sh)
+    SET_TESTS_PROPERTIES(Klocwork PROPERTIES TIMEOUT 1200)
   ENDIF()

 ELSE()


Only copy the appropriate debug/release

Only copy the appropriate debug/release

--- tools/cmake/Win32PostBuild.cmake
+++ tools/cmake/Win32PostBuild.cmake
@@ -11,7 +11,8 @@
 add_custom_command(
     TARGET DEPS
     POST_BUILD
-    COMMAND xcopy "${BOOST_PYTHON_DLL_PATH}\\*.dll" "${WIN_PROJECT_BINARY_DIR}\\bin\\$\(Configuration\)" /D /I /Y /s
+    COMMAND xcopy "${BOOST_PYTHON_DLL_PATH}\\*-gd-*.dll" "${WIN_PROJECT_BINARY_DIR}\\bin\\Debug" /D /I /Y /s
+    COMMAND xcopy "${BOOST_PYTHON_DLL_PATH}\\*-mt-1*.dll" "${WIN_PROJECT_BINARY_DIR}\\bin\\Release" /D /I /Y /s
     VERBATIM
 )


COMP: fix typo in the last patch

COMP: fix typo in the last patch

--- Wrapping/WrapITK/Python/CreateLanguageSupport.cmake
+++ Wrapping/WrapITK/Python/CreateLanguageSupport.cmake
@@ -1,6 +1,6 @@

-MACRO(ADD_PYTHON_TYPEMAP simple_name cpp_name swig_name template_params_without_u)+
+MACRO(ADD_PYTHON_TYPEMAP simple_name cpp_name swig_name template_params_without_u)
   # TODO: remove this hack once bug #6177 is fixed
   STRING(REGEX REPLACE "(^| |<|,)([0-9]+)($| |>|,)" "\\1\\2u\\3" template_params "${template_params_without_u}")


BUG: Add dependancy for bulding castxml before using it.

--- Wrapping/macro_files/itk_auto_load_submodules.cmake
+++ Wrapping/macro_files/itk_auto_load_submodules.cmake
@@ -152,7 +152,7 @@
             @${castxml_inc_file}
             ${cxx_file}
             VERBATIM
-            DEPENDS ${_castxml_depends} ${cxx_file} ${castxml_inc_file} ${_hdrs}
+            DEPENDS ${_castxml_depends} ${cxx_file} ${castxml_inc_file} ${_hdrs} castxml
     )
     unset(cxx_file)
     unset(castxml_inc_file)


ENH: minor print cleanup

ENH: minor print cleanup

--- cmake/DependenciesConfig.cmake
+++ cmake/DependenciesConfig.cmake
@@ -117,7 +117,7 @@
       FIND_PACKAGE(Boost COMPONENTS ${SMURFF_BOOST_COMPONENTS} REQUIRED)

-      message("-- Found Boost_VERSION: ${Boost_VERSION} (short version: ${BOOST_SHORT_VERSION})")
+      message("-- Found Boost_VERSION: ${Boost_VERSION}")
       message("-- Found Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
       message("-- Found Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
       add_definitions(-DHAVE_BOOST)


fixes to find libs

fixes to find libs

--- cmake/Modules/FindCsound.cmake
+++ cmake/Modules/FindCsound.cmake
@@ -12,7 +12,8 @@
 endif()

 if(APPLE)
-find_library(CSOUND_LIBRARY NAMES Csound64Lib CsoundLib)
+find_library(CSOUND_LIBRARY NAMES CsoundLib64 HINTS /Library/Frameworks/CsoundLib64.framework/
+"$ENV{HOME}/Library/Frameworks/CsoundLib64.framework")
 else()
 find_library(CSOUND_LIBRARY NAMES csound64 csound)
 endif()
@@ -20,7 +21,7 @@
 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set CSOUND_FOUND to TRUE
 # if all listed variables are TRUE
-find_package_handle_standard_args(DEFAULT_MSG
+find_package_handle_standard_args(CSOUND
                                   CSOUND_LIBRARY CSOUND_INCLUDE_DIR)
 mark_as_advanced(CSOUND_INCLUDE_DIR CSOUND_LIBRARY)


add AMD OCL SDK light path in ENV section

--- cmake/Modules/FindOpenCL.cmake
+++ cmake/Modules/FindOpenCL.cmake
@@ -25,6 +25,7 @@
 set(OPENCL_HINTS
   ${OPENCL_ROOT}
   $ENV{OPENCL_ROOT}
+  $ENV{OCL_ROOT}
   $ENV{AMDAPPSDKROOT}
   $ENV{CUDA_PATH}
   $ENV{INTELOCLSDKROOT}


This library is needed for WIN32. Adding it here makes the kleopatra/ConfigurureChecks.cmake correctly detect a usable assuan.

svn path=/branches/kdepim/enterprise4/kdepim/; revision=917688

--- cmake/modules/FindAssuan.cmake
+++ cmake/modules/FindAssuan.cmake
@@ -118,7 +118,7 @@
     set( ASSUAN_INCLUDES ${ASSUAN_INCLUDES} )

     if ( _assuan_vanilla_library AND _gpg_error_library )
-      set( ASSUAN_VANILLA_LIBRARIES ${_assuan_vanilla_library} ${_gpg_error_library} )
+      set( ASSUAN_VANILLA_LIBRARIES ${_assuan_vanilla_library} ${_gpg_error_library} ws2_32 )
       set( ASSUAN_VANILLA_FOUND     true )
       set( ASSUAN_FOUND             true )
     endif()


Fixed QTGLIB_INCLUDE_DIR

Fixed QTGLIB_INCLUDE_DIR

--- cmake/modules/FindQtGLib.cmake
+++ cmake/modules/FindQtGLib.cmake
@@ -30,8 +30,8 @@
 endif (NOT WIN32)

 find_path(QTGLIB_INCLUDE_DIR
-   NAMES QGLib/Object
-   PATHS ${PC_QTGLIB_INCLUDEDIR} ${PC_QTGLIB_INCLUDE_DIRS}
+   NAMES QGlib/Object
+   PATHS ${PC_QTGLIB_INCLUDEDIR} ${PC_QTGLIB_INCLUDE_DIRS}
    PATH_SUFFIXES QtGStreamer
    )


Add Qt's experimental (second version)

Add Qt's experimental (second version)

--- cmake/projects/Qt/hunter.cmake
+++ cmake/projects/Qt/hunter.cmake
@@ -91,6 +91,17 @@
     PACKAGE_NAME
     Qt
     VERSION
+    "5.5.1-cvpixelbuffer-2-p0"
+    URL
+    "https://github.com/hunter-packages/Qt/releases/download/v5.5.1-cvpixelbuffer-2-p0/hunter-5.5.1-cvpixelbuffer-2.7z"
+    SHA1
+    4efb6c9c37db1846ec70f5fdcf2c719087451075
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    Qt
+    VERSION
     "5.6.0-alpha"
     URL
     "http://download.qt.io/development_releases/qt/5.6/5.6.0-alpha/single/qt-everywhere-opensource-src-5.6.0-alpha.7z"


xi: Add PACKAGE_INTERNAL_DEPS_ID of 1

xi: Add PACKAGE_INTERNAL_DEPS_ID of 1

--- cmake/projects/xi/hunter.cmake
+++ cmake/projects/xi/hunter.cmake
@@ -45,6 +45,7 @@
 hunter_cacheable(xi)
 hunter_download(
     PACKAGE_NAME xi
+    PACKAGE_INTERNAL_DEPS_ID "1"
     PACKAGE_UNRELOCATABLE_TEXT_FILES
     "lib/libXi.la"
     "lib/pkgconfig/xi.pc"


[Windows] Adding .lib into the symlink install file list (#219)

* Adding .lib into the symlink install file list

Signed-off-by: seanyen <2551af0fdf018539e6b166626ebb542b281c6d90@microsoft.com>

* rework.

Signed-off-by: seanyen <2551af0fdf018539e6b166626ebb542b281c6d90@microsoft.com>

* conditionally guard by WIN32.

Signed-off-by: seanyen <2551af0fdf018539e6b166626ebb542b281c6d90@microsoft.com>

--- ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_targets.cmake
+++ ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_targets.cmake
@@ -73,6 +73,10 @@
           "'${target}' is an imported target")
       endif()
       list(APPEND target_files "$<TARGET_FILE:${target}>")
+      get_target_property(target_type "${target}" TYPE)
+      if(WIN32 AND "${target_type}" STREQUAL "SHARED_LIBRARY")
+        list(APPEND target_files "$<TARGET_LINKER_FILE:${target}>")
+      endif()
     endforeach()

     string(REPLACE ";" "\" \"" target_files_quoted


BUG: Remove extra dependency from Libs/DICOM/Widgets/target_libraries.cmake.

Since CTKDICOMCore already depends on CTKCore. This later one doesn't need to be listed.

--- Libs/DICOM/Widgets/target_libraries.cmake
+++ Libs/DICOM/Widgets/target_libraries.cmake
@@ -5,6 +5,5 @@
 #

 SET(target_libraries
-  CTKCore
   CTKDICOMCore
   )


#1285 - Further bugfixes in OpenIGTLink, version upgraded to 96cea91028

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8367 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 936772e09d)
+    SET(revision_tag 96cea91028)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Fix PythonQtGenerator external project

Fix PythonQtGenerator external project

* Remove extra SOURCE_DIR argument and set PYTHONQTGENERATOR_EXECUTABLE
to the correct path

--- CMakeExternals/PythonQtGenerator.cmake
+++ CMakeExternals/PythonQtGenerator.cmake
@@ -41,13 +41,12 @@
     IF(EXISTS ${CMAKE_BINARY_DIR}/PythonQt)
       #MESSAGE(STATUS "ExternalProject/PythonQtGenerator: PythonQt already added as ExternalProject")
       ExternalProject_Add(${proj}
-        SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+        SOURCE_DIR ${CMAKE_BINARY_DIR}/PythonQt/generator
         BINARY_DIR ${proj}-build
         PREFIX ${proj}${ep_suffix}
         DOWNLOAD_COMMAND ""
         CMAKE_GENERATOR ${gen}
         INSTALL_COMMAND ""
-        SOURCE_DIR ${CMAKE_BINARY_DIR}/PythonQt/generator
         CMAKE_ARGS
           -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
           -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
@@ -56,7 +55,7 @@
           ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
           -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
         DEPENDS
-          "PythonQt" # To make sure the generator code is checked out, let's depent on PythonQt
+          "PythonQt" # To make sure the generator code is checked out, let's depend on PythonQt
         )
     ELSE()

@@ -75,7 +74,6 @@
         CMAKE_GENERATOR ${gen}
         UPDATE_COMMAND ""
         INSTALL_COMMAND ""
-        SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}/generator
         CMAKE_ARGS
           -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
           -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
@@ -86,7 +84,7 @@
         )
     ENDIF()

-    SET(PYTHONQTGENERATOR_EXECUTABLE ${CMAKE_BINARY_DIR}/PythonQtGenerator/PythonQtGenerator)
+    SET(PYTHONQTGENERATOR_EXECUTABLE ${CMAKE_BINARY_DIR}/PythonQtGenerator-build/PythonQtGenerator)

     # Since PythonQtGenerator is an executable, there is no need to add its corresponding
     # library output directory to CTK_EXTERNAL_LIBRARY_DIRS


adds library variable for boost cmake

adds library variable for boost cmake

--- boost.cmake
+++ boost.cmake
@@ -21,6 +21,8 @@
     boost_1_51_0.tar.gz
     6a1f32d902203ac70fbec78af95b3cf8
     http://downloads.sourceforge.net/project/boost/boost/1.51.0)
+
+set (boost_LIBS     ${BUILDEM_LIB_DIR}/libboost_thread.so  ${BUILDEM_LIB_DIR}/libboost_system.so ${BUILDEM_LIB_DIR}/libboost_program_options.so ${BUILDEM_LIB_DIR}/libboost_python.so)

 # Add layout=tagged param to first boost install to explicitly create -mt libraries
 # some libraries require.  TODO: Possibly shore up all library find paths to only


[Test] Fix CMake AddTest function to use correct mosquitto target.

The mosquitto:mosquitto is always generated (even if the dependency is installed)
and should hence be used.

Change-Id: I9d96246f3fcdf003834d81093446e0991c4b6882

--- cpp/tests/AddTest.cmake
+++ cpp/tests/AddTest.cmake
@@ -15,7 +15,7 @@
     endif(NOT USE_PLATFORM_GTEST_GMOCK)

     if(NOT USE_PLATFORM_MOSQUITTO)
-        add_dependencies(${TARGET} mosquitto)
+        add_dependencies(${TARGET} mosquitto::mosquitto)
     endif(NOT USE_PLATFORM_MOSQUITTO)

     target_include_directories(


Add build and host profiles (#250)

Add build and host profiles (#250)

* Add build and host profiles

Make conan detection silent since it's triggered
three times otherwise when build and host profiles
are specified.

* Apply suggestions from code review

Co-authored-by: Carlos Zoido <2accafae6a9d696f958aa2dba27077cd7a20a336@gmail.com>

Co-authored-by: Christoph Schlosser <8c35246c08aaa4420a516ebdbc6c9a8d70009b01@users.noreply.github.com>
Co-authored-by: Carlos Zoido <2accafae6a9d696f958aa2dba27077cd7a20a336@gmail.com>

--- conan.cmake
+++ conan.cmake
@@ -226,6 +226,10 @@
     foreach(ARG ${_APPLIED_PROFILES})
         set(_SETTINGS ${_SETTINGS} -pr=${ARG})
     endforeach()
+    foreach(ARG ${ARGUMENTS_PROFILE_BUILD})
+        conan_check(VERSION 1.24.0 REQUIRED DETECT_QUIET)
+        set(_SETTINGS ${_SETTINGS} -pr:b=${ARG})
+    endforeach()

     if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL")
         set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version
@@ -369,7 +373,7 @@
   set(oneValueArgs CONANFILE  ARCH BUILD_TYPE INSTALL_FOLDER CONAN_COMMAND)
   set(multiValueArgs DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE
                      PROFILE REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO
-                     INSTALL_ARGS CONFIGURATION_TYPES)
+                     INSTALL_ARGS CONFIGURATION_TYPES PROFILE_BUILD)
   cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 endmacro()

@@ -568,23 +572,29 @@

 macro(conan_check)
     # Checks conan availability in PATH
-    # Arguments REQUIRED and VERSION are optional
+    # Arguments REQUIRED, DETECT_QUIET and VERSION are optional
     # Example usage:
     #    conan_check(VERSION 1.0.0 REQUIRED)
-    message(STATUS "Conan: checking conan executable")
-    set(options REQUIRED)
+    set(options REQUIRED DETECT_QUIET)
     set(oneValueArgs VERSION)
     cmake_parse_arguments(CONAN "${options}" "${oneValueArgs}" "" ${ARGN})
+    if(NOT CONAN_DETECT_QUIET)
+        message(STATUS "Conan: checking conan executable")
+    endif()

     find_program(CONAN_CMD conan)
     if(NOT CONAN_CMD AND CONAN_REQUIRED)
         message(FATAL_ERROR "Conan executable not found! Please install conan.")
     endif()
-    message(STATUS "Conan: Found program ${CONAN_CMD}")
+    if(NOT CONAN_DETECT_QUIET)
+        message(STATUS "Conan: Found program ${CONAN_CMD}")
+    endif()
     execute_process(COMMAND ${CONAN_CMD} --version
                     OUTPUT_VARIABLE CONAN_VERSION_OUTPUT
                     ERROR_VARIABLE CONAN_VERSION_OUTPUT)
-    message(STATUS "Conan: Version found ${CONAN_VERSION_OUTPUT}")
+    if(NOT CONAN_DETECT_QUIET)
+        message(STATUS "Conan: Version found ${CONAN_VERSION_OUTPUT}")
+    endif()

     if(DEFINED CONAN_VERSION)
         string(REGEX MATCH ".*Conan version ([0-9]+\\.[0-9]+\\.[0-9]+)" FOO


Force both -mt and default non-mt library builds from boost

--- boost.cmake
+++ boost.cmake
@@ -21,6 +21,9 @@
     6a1f32d902203ac70fbec78af95b3cf8
     http://downloads.sourceforge.net/project/boost/boost/1.51.0)

+# Add layout=tagged param to first boost install to explicitly create -mt libraries
+# some libraries require.  TODO: Possibly shore up all library find paths to only
+# allow use of built libs.
 message ("Installing ${boost_NAME} into FlyEM build area: ${FLYEM_BUILD_DIR} ...")
 ExternalProject_Add(${boost_NAME}
     DEPENDS             ${python_NAME} ${zlib_NAME}
@@ -40,7 +43,10 @@
         -sZLIB_INCLUDE=${FLYEM_BUILD_DIR}/include
         -sZLIB_SOURCE=${zlib_SRC_DIR} install
     BUILD_IN_SOURCE     1
-    INSTALL_COMMAND     ""
+    INSTALL_COMMAND     ${FLYEM_ENV_STRING} ./b2
+        -sNO_BZIP2=1
+        -sZLIB_INCLUDE=${FLYEM_BUILD_DIR}/include
+        -sZLIB_SOURCE=${zlib_SRC_DIR} install
 )

 endif (NOT boost_NAME)


Clean up GetUrho3DRevision cmake module.

--- Source/CMake/Modules/GetUrho3DRevision.cmake
+++ Source/CMake/Modules/GetUrho3DRevision.cmake
@@ -24,7 +24,11 @@

 execute_process (COMMAND git describe --always --dirty RESULT_VARIABLE GIT_EXIT_CODE OUTPUT_VARIABLE LIB_REVISION ERROR_QUIET)
 if (GIT_EXIT_CODE EQUAL 0)
+    # Remove trailing end of line character
     string (STRIP ${LIB_REVISION} LIB_REVISION)
-    set (LIB_REVISION "const char* revision=\"${LIB_REVISION}\"\;\n")
-    file (WRITE ${FILENAME} ${LIB_REVISION})
+else ()
+    # This should not happen, but just in case
+    set (LIB_REVISION Unversioned)
 endif ()
+set (LIB_REVISION "const char* revision=\"${LIB_REVISION}\"\;\n")
+file (WRITE ${FILENAME} ${LIB_REVISION})


set shader factory version to git tag

set shader factory version to git tag

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -559,7 +559,7 @@

       add_external_project(megamol-shader-factory STATIC
         GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/megamol-shader-factory.git
-        GIT_TAG c4538de5b08e3a6460812482e4e1dda07ddeb62e
+        GIT_TAG "v0.3"
         BUILD_BYPRODUCTS
         "<INSTALL_DIR>/${MEGAMOL_SHADER_FACTORY_LIB}"
         "<INSTALL_DIR>/${GLSLANG_LIB}"


Added comments and enhancements

Added comments and enhancements

- added comments in gcov function
- added original target as dependencie of coverage target


FindGlog: Add support for 'glogd' Debug library (#1479)

Summary:
Glog v0.4.0 when configured with Debug build type adds a 'd' suffix to
the library file. This results in FindGlog.cmake failing to locate it.

Update FindGlog.cmake to use check for 'glogd', and use
select_library_configurations() to set GLOG_LIBRARY to the correct
found filename.

(Note: this has no effect if a non-Debug type is used.)

Pull Request resolved: https://github.com/facebook/folly/pull/1479

Reviewed By: yfeldblum

Differential Revision: D24503510

Pulled By: Orvid

fbshipit-source-id: 705df05a4a3d7df2df8af3bb66c319fb044adbce

--- build/fbcode_builder/CMake/FindGlog.cmake
+++ build/fbcode_builder/CMake/FindGlog.cmake
@@ -7,12 +7,17 @@
 # GLOG_LIBRARIES - link these to use Glog

 include(FindPackageHandleStandardArgs)
+include(SelectLibraryConfigurations)

-find_library(GLOG_LIBRARY glog
+find_library(GLOG_LIBRARY_RELEASE glog
+  PATHS ${GLOG_LIBRARYDIR})
+find_library(GLOG_LIBRARY_DEBUG glogd
   PATHS ${GLOG_LIBRARYDIR})

 find_path(GLOG_INCLUDE_DIR glog/logging.h
   PATHS ${GLOG_INCLUDEDIR})
+
+select_library_configurations(GLOG)

 find_package_handle_standard_args(glog DEFAULT_MSG
   GLOG_LIBRARY


fix syntax

fix syntax

--- project.cmake
+++ project.cmake
@@ -1,7 +1,7 @@
 #CMake projects genearte by cmaketools

 project({{project}} CXX)
-set({{project_name}}_VERSION {{version}})
+set({{project}}_VERSION {{version}})

 #min version
 cmake_minimum_required(VERSION 2.6)


Fix ilastik-gui test steps to only run after ilastik build & test

--- ilastik-gui.cmake
+++ ilastik-gui.cmake
@@ -32,7 +32,7 @@

 # Add environment setting script
 ExternalProject_add_step(${ilastik_NAME}  install_gui_env_script
-    DEPENDEES   download
+    DEPENDEES   test
     COMMAND     ${TEMPLATE_EXE}
         --exe
         ${TEMPLATE_DIR}/setenv_ilastik_gui.template


[CMake] Workaround for the lipo output directory not being created.

This should resolve an issue reported by mclow.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -187,6 +187,7 @@
     "LIPO_FLAGS;DEPENDS"
     ${ARGN})
   add_custom_command(OUTPUT ${LIB_OUTPUT_DIR}/lib${name}.a
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_OUTPUT_DIR}
     COMMAND lipo -output
             ${LIB_OUTPUT_DIR}/lib${name}.a
             -create ${LIB_LIPO_FLAGS}


refs #4871 fix gtags generation

refs #4871 fix gtags generation

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@48318 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuBuildTagDatabases.cmake
+++ cmake_modules/TokuBuildTagDatabases.cmake
@@ -94,7 +94,7 @@
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GRTAGS"
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GPATH"
       OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GSYMS"
-      COMMAND ${GTAGS} -i ${idutils_option} -f "${CMAKE_CURRENT_BINARY_DIR}/gtags.files"
+      COMMAND ${GTAGS} -f "${CMAKE_CURRENT_BINARY_DIR}/gtags.files"
       DEPENDS ${all_srcs} ${all_hdrs} install_tdb_h generate_config_h generate_log_code
       WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
     add_custom_target(build_GTAGS ALL DEPENDS


ENH: Use http submit by default

ENH: Use http submit by default

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -3,6 +3,9 @@
 SET (NIGHTLY_START_TIME "23:00:00 EDT")

 # Dart server to submit results (used by client)
+IF(NOT DROP_METHOD)
+  SET(DROP_METHOD http)
+ENDIF(NOT DROP_METHOD)
 IF(DROP_METHOD MATCHES http)
   SET (DROP_SITE "public.kitware.com")
   SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
@@ -21,7 +24,7 @@

 # Dart server configuration
 SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/vtk-rollup-dashboard.sh")
-SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/VTK/")
+SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/viewcvs.cgi/")
 SET (CVS_WEB_CVSROOT "VTK")
 SET (USE_DOXYGEN "On")
 SET (DOXYGEN_URL "http://www.vtk.org/doc/nightly/html/" )


add missing `=` in profile command line argument

Adding this `=` after `-pr` enables the PROFILE passed to conan_cmake_run to be used. Previously (at least on my Windows test machine), the PROFILE was not taken into account and conan was running with the default profile. Now the profile used is the correct one.

--- conan.cmake
+++ conan.cmake
@@ -220,7 +220,7 @@
     endif()

     foreach(ARG ${_APPLIED_PROFILES})
-        set(_SETTINGS ${_SETTINGS} -pr ${ARG})
+        set(_SETTINGS ${_SETTINGS} -pr=${ARG})
     endforeach()

     if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL")


iox-#670 set default IOX_VERSION_TWEAK

iox-#670 set default IOX_VERSION_TWEAK

Signed-off-by: Dietrich Krönke <ea45bc0219d3b6c3a6b9cf3abdfa172e6bfa16ff@apex.ai>

--- iceoryx_posh/cmake/iceoryxversions.cmake
+++ iceoryx_posh/cmake/iceoryxversions.cmake
@@ -23,9 +23,11 @@

 string(TIMESTAMP ICEORYX_BUILDDATE UTC)

+set(IOX_VERSION_TWEAK "0")

-if(NOT DEFINED ${PROJECT_VERSION_TWEAK})
-  set(IOX_VERSION_TWEAK "0")
+
+if(DEFINED ${PROJECT_VERSION_TWEAK})
+  set(IOX_VERSION_TWEAK ${PROJECT_VERSION_TWEAK})
 endif()

 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_versions.hpp.in"


Add caching to coherent python module

Add caching to coherent python module

--- modules/FindCoherentPython.cmake
+++ modules/FindCoherentPython.cmake
@@ -1,5 +1,8 @@
 # Finds python interpreter and library.
 # Tries to make sure one fits the other
+if(PYTHON_INCLUDE_DIR AND PYTHON_LIBRARIES)
+    return()
+endif()
 unset(required)
 if(CoherentPython_FIND_REQUIRED)
     set(required REQUIRED)
@@ -52,7 +55,7 @@
             "print(get_python_inc())"
         )
         if(DEFINED python_include AND EXISTS "${python_include}")
-            set(PYTHON_INCLUDE_DIR "${python_include}" PATH)
+            set(PYTHON_INCLUDE_DIR "${python_include}")
         endif()
         # And tries adding sysconfig.get_python_lib output
         # Good for canopy, but not virtualenv.
@@ -85,3 +88,6 @@
 endif()

 find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT ${required} ${quiet})
+if(NOT PYTHON_INCLUDE_DIRS)
+    message(FATAL_ERROR "Could not find python include directory")
+endif()


detect qcc

detect qcc

--- conan.cmake
+++ conan.cmake
@@ -132,18 +132,22 @@
         set(_CONAN_SETTING_COMPILER_CPPSTD ${CMAKE_CXX_STANDARD})
     endif()

-    if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU)
-        # using GCC
+    if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU OR ${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL QCC)
+        # using GCC or QCC
         # TODO: Handle other params
         string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
         list(GET VERSION_LIST 0 MAJOR)
         list(GET VERSION_LIST 1 MINOR)
         set(COMPILER_VERSION ${MAJOR}.${MINOR})
-        if(${MAJOR} GREATER 4)
-            set(COMPILER_VERSION ${MAJOR})
-        endif()
-        set(_CONAN_SETTING_COMPILER gcc)
+
+        if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU)
+            set(_CONAN_SETTING_COMPILER gcc)
+        elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL QCC)
+            set(_CONAN_SETTING_COMPILER qcc)
+        endif ()
+
         set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION})
+
         if (USING_CXX)
             conan_cmake_detect_unix_libcxx(_LIBCXX)
             set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})


Recognize MacOS

Recognize MacOS

I slightly changed the script to recognize Darwin (as CMake calls the MacOS) as Macos (as Conan calls the MacOS).

--- conan.cmake
+++ conan.cmake
@@ -28,13 +28,17 @@
   #handle -s os setting
   if(CMAKE_SYSTEM_NAME)
   #use default conan os setting if CMAKE_SYSTEM_NAME is not defined
+    set(CONAN_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
+    if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+        set(CONAN_SYSTEM_NAME Macos)
+    endif()
     set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD)
-    list (FIND CONAN_SUPPORTED_PLATFORMS "${CMAKE_SYSTEM_NAME}" _index)
+    list (FIND CONAN_SUPPORTED_PLATFORMS "${CONAN_SYSTEM_NAME}" _index)
     if (${_index} GREATER -1)
     #check if the cmake system is a conan supported one
-      set(_SETTINGS ${_SETTINGS} -s os=${CMAKE_SYSTEM_NAME})
-    else()
-      message(FATAL_ERROR "cmake system ${CMAKE_SYSTEM_NAME} is not supported by conan. Use one of ${CONAN_SUPPORTED_PLATFORMS}")
+      set(_SETTINGS ${_SETTINGS} -s os=${CONAN_SYSTEM_NAME})
+    else()
+      message(FATAL_ERROR "cmake system ${CONAN_SYSTEM_NAME} is not supported by conan. Use one of ${CONAN_SUPPORTED_PLATFORMS}")
     endif()
   endif()


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -29,7 +29,6 @@
 	MESSAGE("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
 	MESSAGE("ARTIFACTS_PATH = ${ARTIFACTS_PATH}")
 	MESSAGE("DEPENDS_PATHFILE = ${DEPENDS_PATHFILE}")
-	MESSAGE(FATAL_ERROR)
 endif()

 IF(WIN32)


MSVC: enable external expat for ITK

MSVC: enable external expat for ITK

ITK imposes a limit on the source and build directory length
 for good reasons. This forces us to have ITK in a shorter path eg:
C:\Temp\ITK for MSVC compilers. The limit mentioned in ITK for
directory length is 50.
http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;h=9730213aee02b16891cee231a1cd4f990ab9bb9f;hb=HEAD#l26

--- CMake/External_ITK.cmake
+++ CMake/External_ITK.cmake
@@ -14,6 +14,11 @@
   set(${proj}_DEPENDENCIES)
   set(ITK_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
   set(ITK_SB_SRC_DIR ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
+
+  if(MSVC)
+    set(ITK_SB_SRC_DIR "C:/Temp/ITK")
+    set(ITK_SB_BUILD_DIR ${ITK_SB_SRC_DIR}/build)
+  endif()

   set(ITK_ENABLED_MODULES
     Common
@@ -133,6 +138,7 @@
     PREFIX ${proj}
     URL "http://sourceforge.net/projects/itk/files/itk/4.6/InsightToolkit-4.6.1.tar.gz/download"
     URL_MD5 2c84eae50ab2452cdad32aaadced3c37
+    SOURCE_DIR ${ITK_SB_SRC_DIR}
     BINARY_DIR ${ITK_SB_BUILD_DIR}
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
     CMAKE_CACHE_ARGS
@@ -144,6 +150,7 @@
       -DBUILD_SHARED_LIBS:BOOL=ON
       -DBUILD_TESTING:BOOL=OFF
       -DBUILD_EXAMPLES:BOOL=OFF
+      -DITK_USE_SYSTEM_EXPAT:BOOL=ON
       ${ITK_SB_FFTW_CONFIG}
     PATCH_COMMAND ${CMAKE_COMMAND} -E copy
       ${CMAKE_SOURCE_DIR}/patches/ITK/hashtable.hxx.in


Use only VTK 5.8 in superbuild until all issues regarding VTK 5.10 are solved.

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -46,30 +46,9 @@
      )
   endif()

-  option(MITK_USE_VTK_5_8_IN_SUPERBUILD "Use VTK 5.8 in MITK superbuild" OFF)
-
-  include(mitkFunctionGetGccVersion)
-  mitkFunctionGetGccVersion(${CMAKE_CXX_COMPILER} GCC_VERSION)
-  if(GCC_VERSION AND NOT ${GCC_VERSION} VERSION_LESS "4.6")
-    if(NOT MITK_USE_VTK_5_8_IN_SUPERBUILD)
-      message("Forcing VTK 5.8 since we're using gcc ${GCC_VERSION}")
-    endif()
-    set(MITK_USE_VTK_5_8_IN_SUPERBUILD ON CACHE BOOL "Use VTK 5.8 in MITK superbuild" FORCE)
-  endif()
-
-  if(CMAKE_CXX_COMPILER MATCHES clang)
-    if(NOT MITK_USE_VTK_5_8_IN_SUPERBUILD)
-      message("Forcing VTK 5.8 since we're using clang")
-    endif()
-    set(MITK_USE_VTK_5_8_IN_SUPERBUILD ON CACHE BOOL "Use VTK 5.8 in MITK superbuild" FORCE)
-  endif()
-  if(MITK_USE_VTK_5_8_IN_SUPERBUILD)
-    set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtk-5.8.0.tar.gz)
-    set(VTK_URL_MD5 37b7297d02d647cc6ca95b38174cb41f)
-  else()
-    set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtk-5.6.1.tar.gz)
-    set(VTK_URL_MD5 b80a76435207c5d0f74dfcab15b75181)
-  endif()
+  #use only VTK 5.8 in superbuild until all issues regarding VTK 5.10 are solved
+  set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtk-5.8.0.tar.gz)
+  set(VTK_URL_MD5 37b7297d02d647cc6ca95b38174cb41f)

   ExternalProject_Add(${proj}
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src


[iOS] Search OGRE_DEPENDENCIES_DIR variable for libraries on iOS too.

--HG--
branch : v1-9

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -18,6 +18,8 @@
 getenv_path(OGRE_DEPENDENCIES_DIR)
 if(OGRE_BUILD_PLATFORM_APPLE_IOS)
   set(OGRE_DEP_SEARCH_PATH
+    ${OGRE_DEPENDENCIES_DIR}
+    ${ENV_OGRE_DEPENDENCIES_DIR}
     "${OGRE_BINARY_DIR}/iOSDependencies"
     "${OGRE_SOURCE_DIR}/iOSDependencies"
     "${OGRE_BINARY_DIR}/../iOSDependencies"


Dependencies: always use static build, if we build our own deps

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -82,11 +82,8 @@
     endif()
 endif()

-set(OGREDEPS_SHARED TRUE)
-if(OGRE_STATIC OR MSVC)
-    # freetype does not like shared build on MSVC and it generally eases distribution there
-    set(OGREDEPS_SHARED FALSE)
-endif()
+# if we build our own deps, do it static as it generally eases distribution
+set(OGREDEPS_SHARED FALSE)

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


Update archive name and md5sum for 4.7.1

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -53,8 +53,8 @@

   ExternalProject_Add(${proj}
      LIST_SEPARATOR ${sep}
-     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.7.0-1d4dcc92.tar.gz
-     URL_MD5 d689ccb115d0a8278e9f2b93392c1df7
+     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.7.1-20c0592.tar.gz
+     URL_MD5 f778a5f0e297c06dc629c33ec45733dc
      # work with external GDCM
      PATCH_COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.5.1.patch
                    ${vcl_constexpr_patch}


STYLE: Remove debug message

STYLE: Remove debug message


Exclude a subproject by setting SUBPROJECT_${name} to OFF

--- SubProject.cmake
+++ SubProject.cmake
@@ -38,6 +38,7 @@
 # SubProject.cmake respects the following variables:
 # - DISABLE_SUBPROJECTS: when set, does not load sub projects. Useful for
 #   example for continuous integration builds
+# - SUBPROJECT_${name}: If set to OFF, the subproject is not added.
 # - INSTALL_PACKAGES: command line cache variable which will "apt-get" or
 #   "port install" the known system packages. Will be unset after installation.
 # - COMMON_SOURCE_DIR: When set, the source code of subprojects will be
@@ -122,7 +123,12 @@
       "Sub project ${path} not found in ${__common_source_dir}")
   endif()

-  option(SUBPROJECT_${name} "Build ${name} " ON)
+  # allow exclusion of subproject via set(SUBPROJECT_${name} OFF)
+  if(DEFINED SUBPROJECT_${name} AND NOT SUBPROJECT_${name})
+    option(SUBPROJECT_${name} "Build ${name} " OFF)
+  else()
+    option(SUBPROJECT_${name} "Build ${name} " ON)
+  endif()
   if(SUBPROJECT_${name})
     # Hint for the sub project, in case it needs to do anything special when
     # configured as a sub project


cmake: Fix building with gcrypt support.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -81,13 +81,16 @@
   set(HAVE_PTHREAD_H 1)
 endif (CMAKE_HAVE_PTHREAD_H)

-if (HAVE_OPENSSL_EC_H AND HAVE_OPENSSL_ECDSA_H)
-    set(HAVE_OPENSSL_ECC 1)
-endif (HAVE_OPENSSL_EC_H AND HAVE_OPENSSL_ECDSA_H)
+if (NOT WITH_GCRYPT)
+    if (HAVE_OPENSSL_EC_H AND HAVE_OPENSSL_ECDSA_H)
+        set(HAVE_OPENSSL_ECC 1)
+    endif (HAVE_OPENSSL_EC_H AND HAVE_OPENSSL_ECDSA_H)

-if (HAVE_OPENSSL_ECC)
-    set(HAVE_ECC 1)
-endif (HAVE_OPENSSL_ECC)
+    if (HAVE_OPENSSL_ECC)
+        set(HAVE_ECC 1)
+    endif (HAVE_OPENSSL_ECC)
+endif (NOT WITH_GCRYPT)
+
 # FUNCTIONS

 check_function_exists(strncpy HAVE_STRNCPY)


toolchains: remove unnecessary definition

--- cmake/toolchains/Toolchain-arm-xilinx-linux-gnueabi.cmake
+++ cmake/toolchains/Toolchain-arm-xilinx-linux-gnueabi.cmake
@@ -70,10 +70,6 @@
 	endif()
 endforeach()

-add_definitions(
-	-D __OCPOC
-	)
-
 set(LINKER_FLAGS "-Wl,-gc-sections")
 set(CMAKE_EXE_LINKER_FLAGS ${LINKER_FLAGS})
 set(CMAKE_C_FLAGS ${C_FLAGS})


CMake: Added option for enabling optimization.

This mirrors the automake build, which sets -O2 by default.

Review: https://reviews.apache.org/r/53766/

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -25,6 +25,16 @@
 endif (ENABLE_DEBUG)

 option(BUILD_SHARED_LIBS "Build shared libraries." OFF)
+
+option(ENABLE_OPTIMIZE "Enable optimization" TRUE)
+if (ENABLE_OPTIMIZE)
+  if (WIN32)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2")
+  else (WIN32)
+    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -O2")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
+  endif (WIN32)
+endif (ENABLE_OPTIMIZE)

 # 3RDPARTY OPTIONS.


Fix bug PYSIDE-6

Fix bug PYSIDE-6

This should resolve the issue in PYSIDE-6 "Fix phonon VideoCaptureDevice detection to properly use phonon_ namespace".
Changed if check in PySideModules.cmake.

Change-Id: Ie30d6858a0fc6073560ec4cd09508504cbeb667d
Reviewed-by: Hugo Parente Lima <e250cbdf6b5a11059e9d944a6e5e9282be80d14c@openbossa.org>

--- cmake/Macros/PySideModules.cmake
+++ cmake/Macros/PySideModules.cmake
@@ -71,7 +71,7 @@
     endif ()
     string(TOLOWER ${class} _class)
     string(TOUPPER ${module} _module)
-    if (${namespace})
+    if (_namespace)
         set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp)
     else ()
         set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)


Suppress "unknown compiler" warning for MSVC.

Visual Studio doesn't need any special compiler flags
to turn on C++11 support, so we don't need to do
anything special here, but we shouldn't output a
scary "this compiler isn't supported" warning.
Closes salilab/imp#940.

--- cmake_modules/IMPFindC++11.cmake
+++ cmake_modules/IMPFindC++11.cmake
@@ -34,6 +34,8 @@
       message(STATUS "Enabling clang C++11 support")
       set(IMP_CXX11_FLAGS "--std=c++11" CACHE INTERNAL "" FORCE)
     endif()
+  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+    message(STATUS "Using MSVC C++11 support")
   else()
     message(STATUS "Unknown compiler, not sure what to do about C++11")
   endif()


if building the static library (i.e. by setting ZORBA_BUILD_STATIC_LIBRARY to ON) all tests are executed using the according "static" executables (e.g. testdriver_static)

--- cmake_modules/ZorbaAddTest.cmake
+++ cmake_modules/ZorbaAddTest.cmake
@@ -24,14 +24,25 @@
 #
 MACRO(ZORBA_ADD_TEST_SIMPLE NAME TARGET ...)
   SET(ARGS ${ARGV2} ${ARGN})
+
 	IF(ZORBA_WIN_PUT_ALL_BINARIES_IN_SAME_DIR)
 		GET_TARGET_PROPERTY(TARGET_LOCATION "${TARGET}" LOCATION)
+
+    # if building the static library, always use the static executables for testing
+    IF (ZORBA_BUILD_STATIC_LIBRARY)
+      SET(TARGET_LOCATION "${TARGET_LOCATION}_static")
+    ENDIF (ZORBA_BUILD_STATIC_LIBRARY)
+
 		ADD_TEST("${NAME}" "${TARGET_LOCATION}" ${ARGS})
 	ELSE(ZORBA_WIN_PUT_ALL_BINARIES_IN_SAME_DIR)
 		GET_TARGET_PROPERTY(TARGET_LOCATION "${TARGET}" LOCATION)
 		IF(WIN32)
 			ADD_TEST("${NAME}" "${WIN_CMAKE_BINARY_DIR}/scripts/win_exec_cmake.bat" "${TARGET_LOCATION}" ${ARGS})
 		ELSE(WIN32)
+      # if building the static library, always use the static executables for testing
+      IF (ZORBA_BUILD_STATIC_LIBRARY)
+        SET(TARGET_LOCATION "${TARGET_LOCATION}_static")
+      ENDIF (ZORBA_BUILD_STATIC_LIBRARY)
 			ADD_TEST("${NAME}" "${TARGET_LOCATION}" ${ARGS})
 		ENDIF(WIN32)
 	ENDIF(ZORBA_WIN_PUT_ALL_BINARIES_IN_SAME_DIR)
@@ -63,6 +74,7 @@
     IF (NOT ${ZORBA_STORE_NAME} STREQUAL "simplestore")
       SET(SUFFIX "_${ZORBA_STORE_NAME}")
     ENDIF (NOT ${ZORBA_STORE_NAME} STREQUAL "simplestore")
+
     ZORBA_ADD_TEST_SIMPLE("${NAME}${SUFFIX}" "${TARGET}${SUFFIX}" ${ARGS})
   ENDFOREACH(ZORBA_STORE_NAME ${ZORBA_STORE_NAMES})
 ENDMACRO(ZORBA_ADD_TEST_ALLSTORES)


Make FindCCI.cmake use pkgconfig

Make FindCCI.cmake use pkgconfig

--- src/na/CMake/FindCCI.cmake
+++ src/na/CMake/FindCCI.cmake
@@ -4,11 +4,14 @@
 #  CCI_INCLUDE_DIRS - The CCI include directories
 #  CCI_LIBRARIES - The libraries needed to use CCI

+find_package(PkgConfig)
+pkg_check_modules(PC_CCI QUIET cci)
+
 find_path(CCI_INCLUDE_DIR cci.h
-  HINTS /usr/local/include /usr/include)
+  HINTS ${PC_CCI_INCLUDEDIR} ${PC_CCI_INCLUDE_DIRS})

 find_library(CCI_LIBRARY NAMES cci
-  PATHS /usr/local/lib /usr/lib)
+  HINTS ${PC_CCI_LIBDIR} ${PC_CCI_LIBRARY_DIRS})

 set(CCI_INCLUDE_DIRS ${CCI_INCLUDE_DIR})
 set(CCI_LIBRARIES ${CCI_LIBRARY})


Bugfix. No comment...

Bugfix. No comment...

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26402 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/contrib/cmake/configure/configure_tbb.cmake
+++ deal.II/contrib/cmake/configure/configure_tbb.cmake
@@ -94,7 +94,7 @@
   ENDIF()

   IF(TBB_FOUND)
-    #SET(${var} TRUE)
+    SET(${var} TRUE)
   ENDIF()

 ENDMACRO()


nomsg

nomsg

--- SoftwareGuide/cmake_install.cmake
+++ SoftwareGuide/cmake_install.cmake
@@ -1,10 +1,10 @@
-# Install script for directory: /home/ORFEO/thomas/ORFEO-TOOLBOX/OTB-Documents/SoftwareGuide
+# Install script for directory: /ORFEO/thomas/ORFEO-TOOLBOX/otb/OTB-Documents/SoftwareGuide

-INCLUDE("/home/ORFEO/thomas/ORFEO-TOOLBOX/OTB-Documents/SoftwareGuide/Examples/cmake_install.cmake")
-INCLUDE("/home/ORFEO/thomas/ORFEO-TOOLBOX/OTB-Documents/SoftwareGuide/Art/cmake_install.cmake")
-INCLUDE("/home/ORFEO/thomas/ORFEO-TOOLBOX/OTB-Documents/SoftwareGuide/Latex/cmake_install.cmake")
+INCLUDE("/ORFEO/thomas/ORFEO-TOOLBOX/otb/OTB-Documents/SoftwareGuide/Examples/cmake_install.cmake")
+INCLUDE("/ORFEO/thomas/ORFEO-TOOLBOX/otb/OTB-Documents/SoftwareGuide/Art/cmake_install.cmake")
+INCLUDE("/ORFEO/thomas/ORFEO-TOOLBOX/otb/OTB-Documents/SoftwareGuide/Latex/cmake_install.cmake")

-FILE(WRITE "/home/ORFEO/thomas/ORFEO-TOOLBOX/OTB-Documents/SoftwareGuide/install_manifest.txt" "")
+FILE(WRITE "/ORFEO/thomas/ORFEO-TOOLBOX/otb/OTB-Documents/SoftwareGuide/install_manifest.txt" "")
 FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
-  FILE(APPEND "/home/ORFEO/thomas/ORFEO-TOOLBOX/OTB-Documents/SoftwareGuide/install_manifest.txt" "${file}\n")
+  FILE(APPEND "/ORFEO/thomas/ORFEO-TOOLBOX/otb/OTB-Documents/SoftwareGuide/install_manifest.txt" "${file}\n")
 ENDFOREACH(file)


fix warns

fix warns

--- cmaki.cmake
+++ cmaki.cmake
@@ -346,6 +346,7 @@
 			add_definitions(-Wno-error=maybe-uninitialized)
 			add_definitions(-Wno-error=unused-but-set-variable)
 			add_definitions(-Wno-error=unused-local-typedefs)
+			add_definitions(-Wno-error=float-conversion)
 		else()
 			add_definitions(-Wstrict-aliasing=2)
 			add_definitions(-Wno-error=format-nonliteral)
@@ -355,7 +356,6 @@
 			add_definitions(-Wno-error=overloaded-virtual)
 			add_definitions(-Wno-error=unused-private-field)
 			add_definitions(-Wno-error=unreachable-code)
-			add_definitions(-Wno-error=float-conversion)
 			add_definitions(-Wno-error=discarded-qualifiers)
 		endif()


clazy script on macOS uses .dylib, not .so

BUG: 352896

--- clazy.cmake
+++ clazy.cmake
@@ -64,4 +64,4 @@
   exit
 fi

-${CLANGXX:-clang++} -Qunused-arguments -Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy $@
+${CLANGXX:-clang++} -Qunused-arguments -Xclang -load -Xclang ClangLazy@CMAKE_SHARED_LIBRARY_SUFFIX@ -Xclang -add-plugin -Xclang clang-lazy $@


added hack to CMake script to allow compatibility with Ubuntu natty arduino deb

--- rosserial_arduino/cmake_scripts/modules/FindArduino.cmake
+++ rosserial_arduino/cmake_scripts/modules/FindArduino.cmake
@@ -284,7 +284,20 @@
     if(BOARD_CORE AND NOT TARGET ${CORE_LIB_NAME})
         set(BOARD_CORE_PATH ${ARDUINO_CORES_PATH}/${BOARD_CORE})
         find_sources(CORE_SRCS ${BOARD_CORE_PATH})
-        add_library(${CORE_LIB_NAME} ${CORE_SRCS})
+
+        #the following block is a hack to allow the
+        #natty arduino deb to work with this cmake file
+        #natty includes a main.cxx as well as a main.cpp file
+        #this extra file causes main to be included 2 times
+        #this removes the main.cxx
+        set(TEMP "")
+	   foreach(SRC ${CORE_SRCS})
+		string(REGEX REPLACE ".*/main.cxx" ""  SRCOUT ${SRC})
+		set(TEMP ${TEMP} ${SRCOUT} )
+       endforeach(SRC)
+	   set(CORE_SRCS ${TEMP} )
+
+      add_library(${CORE_LIB_NAME} ${CORE_SRCS})
         set(${VAR_NAME} ${CORE_LIB_NAME} PARENT_SCOPE)
     endif()
 endfunction()


* check: add checking zsh program;

* check: add checking zsh program;

--- check.cmake
+++ check.cmake
@@ -9,6 +9,12 @@
 	message(FATAL_ERROR "*** ln not found! ***")
 else()
 	message("-- Found ln")
+endif()
+
+# check zsh
+find_program(ZSH zsh)
+if (ZSH)
+	message("-- Found zsh")
 endif()

 # check xsltproc


Improve sugar_test_variable_not_empty

Improve sugar_test_variable_not_empty

--- cmake/utility/sugar_test_variable_not_empty.cmake
+++ cmake/utility/sugar_test_variable_not_empty.cmake
@@ -7,9 +7,10 @@
 include(sugar_expected_number_of_arguments)
 include(sugar_fatal_error)

-function(sugar_test_variable_not_empty variable)
+function(sugar_test_variable_not_empty variable_name)
   sugar_expected_number_of_arguments(${ARGC} 1)
-  if (NOT "${variable}")
-    sugar_fatal_error("Please, set '${variable}' variable")
+  string(COMPARE EQUAL "${${variable_name}}" "" is_empty)
+  if(is_empty)
+    sugar_fatal_error("Please, set '${variable_name}' variable")
   endif()
 endfunction()


Fix comments

Fix comments

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@31288 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -79,8 +79,9 @@
 #
 #   COVERAGE
 #     - If set to TRUE deal.II will be configured with
-#       DEAL_II_SETUP_COVERAGE=TRUE and the CTEST_COVERAGE() stage will
-#       be run. Test results must go into the "Experimental" section
+#     DEAL_II_SETUP_COVERAGE=TRUE, CMAKE_BUILD_TYPE=Debug and the
+#     CTEST_COVERAGE() stage will be run. Test results must go into the
+#     "Experimental" section.
 #
 # Furthermore, the following variables controlling the testsuite can be set
 # and will be automatically handed down to cmake:
@@ -387,12 +388,20 @@
 # Setup coverage:
 #
 IF(COVERAGE)
+  IF(NOT TRACK MATCHES "Experimental")
+    MESSAGE(FATAL_ERROR "
+TRACK must be set to  \"Experimental\" if Coverage is enabled via
+COVERAGE=TRUE.
+"
+      )
+  ENDIF()
+
   FIND_PROGRAM(GCOV_COMMAND NAMES gcov)

   IF(GCOV_COMMAND MATCHES "-NOTFOUND")
     MESSAGE(FATAL_ERROR "
-TRACK was set to \"Build Tests\" which requires the source directory to be
-under Subversion version control.
+Coverage enabled but could not find the gcov executable. Please install
+gcov, which is part of the GNU Compiler Collection.
 "
       )
   ENDIF()
@@ -500,4 +509,4 @@
   MESSAGE("-- Submission successful. Goodbye!")
 ENDIF()

-# .oO( This script is freaky 503 lines long... )
+# .oO( This script is freaky 511 lines long... )


added ast matchers and rewriter

added ast matchers and rewriter

--- modules/FindClang.cmake
+++ modules/FindClang.cmake
@@ -28,6 +28,8 @@
 FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerCore)
 FIND_AND_ADD_CLANG_LIB(clangAnalysis)
 FIND_AND_ADD_CLANG_LIB(clangARCMigrate)
+FIND_AND_ADD_CLANG_LIB(clangASTMatchers)
+FIND_AND_ADD_CLANG_LIB(clangRewrite)
 FIND_AND_ADD_CLANG_LIB(clangRewriteFrontend)
 FIND_AND_ADD_CLANG_LIB(clangEdit)
 FIND_AND_ADD_CLANG_LIB(clangAST)


pull deps

pull deps

--- src/stx/cmake/CompileProtobuf.cmake
+++ src/stx/cmake/CompileProtobuf.cmake
@@ -42,7 +42,7 @@
       OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WEPREFIX}.pb.cc"
              "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WEPREFIX}.pb.h"
       COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
-      ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} --proto_path ${PROTOBUF_INCLUDE_DIR} --proto_path ${STX_SOURCE_DIR}/stx ${PROTOC_ARGS} ${ABS_FIL}
+      ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} --proto_path ${PROTOBUF_INCLUDE_DIR} ${PROTOC_ARGS} ${ABS_FIL}
       DEPENDS ${ABS_FIL}
       COMMENT "Running C++ protocol buffer compiler on ${FIL}"
       VERBATIM )


Commentary plus emacs tweak.

Commentary plus emacs tweak.

svn path=/trunk/; revision=10122

--- plplot_test/plplot-test.sh.cmake
+++ plplot_test/plplot-test.sh.cmake
@@ -1,7 +1,8 @@
 #!@SH_EXECUTABLE@
+# -*- mode: shell-script -*-
 # $Id$
 #
-# Copyright (C) 2004, 2007  Alan W. Irwin
+# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009  Alan W. Irwin
 # Copyright (C) 2004  Rafael Laboissiere
 #
 # This file is part of PLplot.
@@ -75,6 +76,8 @@
 '
    exit $1
 }
+
+# Figure out what script options were specified by the user.

 while test $# -gt 0; do
    if [ "@HAVE_BASH@" = "ON" ] ; then


Compares SHA1 strings in case insensitive. (#159)

This commit fixes the issue that SHA1 may not match due to different case sensitivity.

--- cmake/modules/hunter_make_directory.cmake
+++ cmake/modules/hunter_make_directory.cmake
@@ -27,7 +27,9 @@
       hunter_internal_error("Not found: ${sha1_path}")
     endif()
     file(READ "${sha1_path}" sha1_value)
-    string(COMPARE EQUAL "${sha1_value}" "${sha1}" is_equal)
+    string(TOLOWER "${sha1_value}" sha1_value_lower)
+    string(TOLOWER "${sha1}" sha1_lower)
+    string(COMPARE EQUAL "${sha1_value_lower}" "${sha1_lower}" is_equal)
     if(NOT is_equal)
       hunter_internal_error(
           "Short SHA1 collision:"


ENH: Update hashtag for TubeTK

ENH: Update hashtag for TubeTK

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "54b26bf58b04bc5c66c2e82ce7614dca2dd21926"
+    GIT_TAG "0c017455fad4f7e007edc38ee1c16db63b34a347"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Fix CTest Site name

Fix CTest Site name

Utilize Travis environment variable to have a useful CDash Site and
Build Name.

--- test/ci/dashboard.cmake
+++ test/ci/dashboard.cmake
@@ -8,8 +8,15 @@
 #  ITK_TAG - name of ITK tag or branch
 set(itk_module "$ENV{ITK_MODULE_NAME}")

-set(CTEST_SITE "$ENV{HOSTNAME}.ci")
-set(CTEST_BUILD_NAME "$ENV{HOSTNAME}-$ENV{ITK_MODULE_NAME}")
+set(CTEST_BUILD_NAME "${itk_module}")
+if("$ENV{TRAVIS}" STREQUAL "true" )
+  set(CTEST_SITE "travisci-$ENV{TRAVIS_BUILD_ID}")
+  string(SUBSTRING "$ENV{TRAVIS_COMMIT}" 0 6 short_sha1)
+  set(git_moniker "-")
+  set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-$ENV{TRAVIS_OS_NAME}-$ENV{TRAVIS_JOB_NUMBER}-${short_sha1}")
+endif()
+
+
 set(CTEST_BUILD_CONFIGURATION "Debug")
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")


more consistent use of cmake small case functions

--- cmake/MCKL.cmake
+++ cmake/MCKL.cmake
@@ -99,14 +99,14 @@

 function(mckl_add_file exname filename)
     if(UNIX)
-        ADD_CUSTOM_COMMAND(
+        add_custom_command(
             OUTPUT  ${PROJECT_BINARY_DIR}/${exname}_${filename}
             DEPENDS ${PROJECT_SOURCE_DIR}/${exname}_${filename}
             COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
             ${PROJECT_SOURCE_DIR}/${exname}_${filename}
             ${PROJECT_BINARY_DIR}/${exname}_${filename})
     else(UNIX)
-        ADD_CUSTOM_COMMAND(
+        add_custom_command(
             OUTPUT  ${PROJECT_BINARY_DIR}/${exname}_${filename}
             DEPENDS ${PROJECT_SOURCE_DIR}/${exname}_${filename}
             COMMAND ${CMAKE_COMMAND} ARGS -E copy


ISPC 1.9 on Windows comes in two versions

--- cmake/ispc.cmake
+++ cmake/ispc.cmake
@@ -29,11 +29,18 @@
     SET(ISPC_DIR_SUFFIX "osx")
   ELSEIF(WIN32)
     SET(ISPC_DIR_SUFFIX "windows")
+    IF (MSVC14)
+      LIST(APPEND ISPC_DIR_SUFFIX "windows-vs2015")
+    ELSE()
+      LIST(APPEND ISPC_DIR_SUFFIX "windows-vs2013")
+    ENDIF()
   ELSE()
     SET(ISPC_DIR_SUFFIX "linux")
   ENDIF()
   FOREACH(ver ${ISPC_VERSION_WORKING})
-    LIST(APPEND ISPC_DIR_HINT ${PROJECT_SOURCE_DIR}/../ispc-v${ver}-${ISPC_DIR_SUFFIX})
+    FOREACH(suffix ${ISPC_DIR_SUFFIX})
+      LIST(APPEND ISPC_DIR_HINT ${PROJECT_SOURCE_DIR}/../ispc-v${ver}-${suffix})
+    ENDFOREACH()
   ENDFOREACH()

   FIND_PROGRAM(ISPC_EXECUTABLE ispc PATHS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.")


cmake: add comment that IDF build target must be global

--- tools/cmake/build.cmake
+++ tools/cmake/build.cmake
@@ -1,4 +1,3 @@
-
 # idf_build_get_property
 #
 # @brief Retrieve the value of the specified property related to ESP-IDF build.
@@ -126,7 +125,8 @@
 # properties used for the processing phase of the build.
 #
 function(__build_init idf_path)
-    # Create the build target, to which the ESP-IDF build properties, dependencies are attached to
+    # Create the build target, to which the ESP-IDF build properties, dependencies are attached to.
+    # Must be global so as to be accessible from any subdirectory in custom projects.
     add_library(__idf_build_target STATIC IMPORTED GLOBAL)

     set_default(python "python")


Update macOS toolchain

Update macOS toolchain

--- toolchains/osx.cmake
+++ toolchains/osx.cmake
@@ -16,6 +16,7 @@
 set(CMAKE_SYSTEM_FRAMEWORK_PATH "${rootold}/System/Library/Frameworks" "${rootold}/Library/Frameworks")

 set(CMAKE_SYSTEM_NAME Darwin CACHE INTERNAL "system name")
+set(CMAKE_SYSTEM_VERSION 10.8.0 CACHE INTERNAL "system version")
 set(CMAKE_AR ${cross_prefix}ar CACHE FILEPATH "archiver")
 set(CMAKE_C_COMPILER ${cross_prefix}clang)
 set(CMAKE_CXX_COMPILER ${cross_prefix}clang++)
@@ -26,6 +27,7 @@

 set(link_flags "-framework CoreFoundation")

+set(CMAKE_C_FLAGS "-mmacosx-version-min=10.6")
 set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags")
 set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags")
 set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared link flags")


Remove unused file.

Remove unused file.

--- VigraAddExecutable.cmake
+++ VigraAddExecutable.cmake
@@ -1,26 +0,0 @@
-
-if(VigraAddExecutableIncluded)
-    return()
-endif()
-
-set(VigraAddExecutableDir "${CMAKE_CURRENT_LIST_DIR}")
-
-function(vigra_add_executable NAME)
-    add_executable(${NAME} ${ARGN})
-    get_property(VAD_LIBRARY_DIR_LIST GLOBAL PROPERTY _VAD_LIBRARY_DIR_LIST)
-    set(VAD_EXECUTABLE_PATH "$<TARGET_FILE:${NAME}>")
-    if(WIN32)
-        if(NOT VAD_LIBRARY_DIR_LIST STREQUAL "")
-            set(VAD_LIBRARY_DIR_LIST "${VAD_LIBRARY_DIR_LIST};")
-        endif()
-        configure_file("${VigraAddExecutableDir}/run_exec.bat.in" "${CMAKE_CURRENT_BINARY_DIR}/run_${NAME}.bat.generate" @ONLY)
-        file(GENERATE OUTPUT "$<TARGET_FILE_DIR:${NAME}>/run_${NAME}.bat" INPUT "${CMAKE_CURRENT_BINARY_DIR}/run_${NAME}.bat.generate")
-    else()
-        if(NOT VAD_LIBRARY_DIR_LIST STREQUAL "")
-            string(REPLACE ";" ":" VAD_LIBRARY_DIR_LIST "${VAD_LIBRARY_DIR_LIST}")
-            set(VAD_LIBRARY_DIR_LIST "${VAD_LIBRARY_DIR_LIST}:")
-        endif()
-        configure_file("${VigraAddExecutableDir}/run_exec.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/run_${NAME}.sh.generate" @ONLY)
-        file(GENERATE OUTPUT "$<TARGET_FILE_DIR:${NAME}>/run_${NAME}.sh" INPUT "${CMAKE_CURRENT_BINARY_DIR}/run_${NAME}.sh.generate")
-    endif()
-endfunction()


Use CMAKE_STATIC_LIBRARY_* macros for FindRdKafka

In the current implementation, library suffixes are hard coded from a hand-maintained list.  Instead of writing this list, we can use the CMake macros for platform specific library prefix/suffixes.

E.g. https://cmake.org/cmake/help/v3.0/variable/CMAKE_STATIC_LIBRARY_SUFFIX.html

This also resolves library resolution on Mac OSX, which does not currently work on the native `.dylib`  suffix for shared libraries.

--- cmake/FindRdKafka.cmake
+++ cmake/FindRdKafka.cmake
@@ -1,16 +1,11 @@
 # Override default CMAKE_FIND_LIBRARY_SUFFIXES
+# (Allows optional prioritization of static libraries during resolution)
 if (CPPKAFKA_RDKAFKA_STATIC_LIB)
-    if (MSVC)
-        set(RDKAFKA_SUFFIX lib)
-    else()
-        set(RDKAFKA_SUFFIX a)
-    endif()
+    set(RDKAFKA_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
+    set(RDKAFKA_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
 else()
-    if (MSVC)
-        set(RDKAFKA_SUFFIX dll)
-    else()
-        set(RDKAFKA_SUFFIX so)
-    endif()
+    set(RDKAFKA_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
+    set(RDKAFKA_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif()

 find_path(RDKAFKA_ROOT_DIR
@@ -31,7 +26,7 @@
 endif()

 find_library(RDKAFKA_LIBRARY
-    NAMES rdkafka.${RDKAFKA_SUFFIX} librdkafka.${RDKAFKA_SUFFIX} rdkafka
+    NAMES ${RDKAFKA_PREFIX}rdkafka${RDKAFKA_SUFFIX} rdkafka
     HINTS ${RDKAFKA_ROOT_DIR}/lib
 )


r9433/sofa : cmake: Add variable for the SofaCUDA directory

Former-commit-id: bbd64d4ed927bc1d4eb8344bf229e0a45f6171b5

--- cmake/environment.cmake
+++ cmake/environment.cmake
@@ -29,6 +29,7 @@
 set(SOFA_APPLICATIONS_PLUGINS_DIR "${SOFA_APPLICATIONS_DIR}/plugins" CACHE INTERNAL "Path to the Sofa applications plugins directory")
 set(SOFA_APPLICATIONS_DEV_PLUGINS_DIR "${SOFA_APPLICATIONS_DEV_DIR}/plugins" CACHE INTERNAL "Path to the Sofa applications-dev plugin directory")
 set(SOFA_TOOLS_DIR "${SOFA_SRC_DIR}/tools" CACHE INTERNAL "Path to the Sofa tools directory")
+set(SOFA_CUDA_DIR "${SOFA_APPLICATIONS_DIR}/plugins/SofaCUDA" CACHE INTERNAL "Path to the SofaCuda directory")

 # useful settings
 set(SOFA_VERSION_NUM "1_0" CACHE STRING "Version number for this build.")


Fix the RAM size for STM32F3 MCUs

Fix the RAM size for STM32F3 MCUs

- STM32F3 family MCUs have RAM + CCRAM = total RAM. Previously the CCRAM
  was counted as part of the normal RAM, causing incorrect linker files
  with a too large RAM section.
- Without this fix, STM32F3 MCUS will probably fail at the initialization of
  RAM or static variables.
- Fixed by subtracting the CCRAM size from the total RAM size in CMake.

--- cmake/gcc_stm32f3.cmake
+++ cmake/gcc_stm32f3.cmake
@@ -27,32 +27,38 @@

     IF(STM32_SIZE_CODE STREQUAL "6")
         SET(FLASH "32K")
-        SET(CCRAM "4K")
+        SET(CCRAM_SIZE_IN_K "4")
     ELSEIF(STM32_SIZE_CODE STREQUAL "8")
         SET(FLASH "64K")
-        SET(CCRAM "4K")
+        SET(CCRAM_SIZE_IN_K "4")
     ELSEIF(STM32_SIZE_CODE STREQUAL "B")
         SET(FLASH "128K")
-        SET(CCRAM "8K")
+        SET(CCRAM_SIZE_IN_K "8")
     ELSEIF(STM32_SIZE_CODE STREQUAL "C")
         SET(FLASH "256K")
-        SET(CCRAM "8K")
+        SET(CCRAM_SIZE_IN_K "8")
     ENDIF()

     STM32_GET_CHIP_TYPE(${CHIP} TYPE)

     IF(${TYPE} STREQUAL "301xx")
-        SET(RAM "16K")
+        SET(RAM_SIZE_IN_K "16")
     ELSEIF(${TYPE} STREQUAL "302xx")
-        SET(RAM "256K")
+        SET(RAM_SIZE_IN_K "256")
     ELSEIF(${TYPE} STREQUAL "303xx")
-        SET(RAM "48K")
+        SET(RAM_SIZE_IN_K "48")
     ELSEIF(${TYPE} STREQUAL "334xx")
-        SET(RAM "16K")
+        SET(RAM_SIZE_IN_K "16")
     ELSEIF(${TYPE} STREQUAL "373xx")
-        SET(RAM "128K")
+        SET(RAM_SIZE_IN_K "128")
     ENDIF()

+    # RAM size = total RAM - CCRAM
+    MATH(EXPR RAM_SIZE_IN_K "${RAM_SIZE_IN_K}-${CCRAM_SIZE_IN_K}")
+    # Append the 'K' literal to the numbers
+    SET(RAM "${RAM_SIZE_IN_K}K")
+    SET(CCRAM "${CCRAM_SIZE_IN_K}K")
+
     SET(${FLASH_SIZE} ${FLASH})
     SET(${RAM_SIZE} ${RAM})
     SET(${CCRAM_SIZE} ${CCRAM})


handle CMP0025 policy warning correctly

handle CMP0025 policy warning correctly

--- conan.cmake
+++ conan.cmake
@@ -157,8 +157,8 @@
         set(_CONAN_SETTING_COMPILER clang)
         set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
         if(APPLE)
-            cmake_policy(GET CMP0025 APPLE_CLANG_POLICY_ENABLED)
-            if(NOT APPLE_CLANG_POLICY_ENABLED)
+            cmake_policy(GET CMP0025 APPLE_CLANG_POLICY)
+            if(APPLE_CLANG_POLICY STREQUAL "OLD")
                 message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it")
                 set(_CONAN_SETTING_COMPILER apple-clang)
             endif()


COMP: Use find_package(COMPONENTS)

COMP: Use find_package(COMPONENTS)

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -49,7 +49,54 @@
 include(${SlicerExecutionModel_USE_FILE})

 if(NOT ITK_FOUND)
-    find_package(ITK REQUIRED)
+    find_package(ITK COMPONENTS
+      ITKDiffusionTensorImage
+      ITKRegistrationCommon
+      ITKOptimizersv4
+      ITKConnectedComponents
+      ITKV3Compatibility
+      ITKMathematicalMorphology
+      ITKBinaryMathematicalMorphology
+      ITKRegionGrowing
+      ITKMetricsv4
+      ITKRegistrationMethodsv4
+      ITKDistanceMap
+      ITKVTK
+      ITKTransform
+      ITKIOImageBase
+      ITKIONRRD
+      ITKImageCompare
+      ITKIOBMP
+      ITKIOBioRad
+      ITKIOCSV
+      ITKIODCMTK
+      ITKIOGDCM
+      ITKIOGE
+      ITKIOGIPL
+      ITKIOHDF5
+      ITKIOIPL
+      ITKIOImageBase
+      ITKIOJPEG
+      ITKIOLSM
+      MGHIO
+      ITKIOMRC
+      ITKIOMesh
+      ITKIOMeta
+      ITKIONIFTI
+      ITKIONRRD
+      ITKIOPNG
+      ITKIORAW
+      ITKIOSiemens
+      ITKIOSpatialObjects
+      ITKIOStimulate
+      ITKIOTIFF
+      ITKIOTransformBase
+      ITKIOTransformHDF5
+      ITKIOTransformInsightLegacy
+      ITKIOTransformMatlab
+      ITKIOVTK
+      ITKIOXML
+      REQUIRED)
     include(${ITK_USE_FILE})
 endif(NOT ITK_FOUND)
 if( NOT DEFINED ITKV3_COMPATIBILITY OR NOT ${ITKV3_COMPATIBILITY}  )
@@ -59,7 +106,10 @@

 if(NOT VTK_FOUND)
-    find_package(VTK REQUIRED)
+    find_package(VTK COMPONENTS
+      vtkIOLegacy
+      vtkIOXML
+      REQUIRED)
     include(${VTK_USE_FILE})
 endif(NOT VTK_FOUND)


[t:4814] don't error on __libc_freeres with valgrind

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43248 c7de825b-a66e-492c-adef-691d508d4ae1

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,4 +1,4 @@
 if(BUILD_TESTING)
-  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown" CACHE INTERNAL "options for valgrind")
+  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --num-callers=20 --leak-check=full --show-reachable=yes --run-libc-freeres=no --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown" CACHE INTERNAL "options for valgrind")
   set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind")
 endif()


[axl_cmake] fall back to find_package if llvm paths are not specified;

added a pair of dedicated macros for easily calculating and linking llvm
libs to a target.

--- cmake/import_llvm.cmake
+++ cmake/import_llvm.cmake
@@ -8,6 +8,13 @@
 #  http://tibbo.com/downloads/archive/axl/license.txt
 #
 #...............................................................................
+
+unset (LLVM_DIR CACHE)
+set (LLVM_FOUND FALSE)
+
+if (NOT LLVM_CMAKE_DIR)
+	find_package (LLVM QUIET)
+endif ()

 if (EXISTS ${LLVM_CMAKE_DIR}/LLVMConfig.cmake)
 	include (${LLVM_CMAKE_DIR}/LLVMConfig.cmake)
@@ -20,14 +27,60 @@
 		set (LLVM_LIB_DIR ${LLVM_LIBRARY_DIRS})
 	endif ()

-	axl_message ("LLVM paths:")
+	set (LLVM_VERSION ${LLVM_PACKAGE_VERSION})
+
+	axl_message ("LLVM ${LLVM_VERSION} paths:")
 	axl_message ("    CMake files:" "${LLVM_CMAKE_DIR}")
 	axl_message ("    Includes:"    "${LLVM_INC_DIR}")
 	axl_message ("    Libraries:"   "${LLVM_LIB_DIR}")

 	set (LLVM_FOUND TRUE)
-else ()
-	set (LLVM_FOUND FALSE)
 endif ()

 #...............................................................................
+
+macro (
+target_link_llvm_libraries
+	_TARGET
+	# ...
+	)
+
+	set (_COMPONENT_LIST ${ARGN})
+
+	if (${LLVM_VERSION} VERSION_LESS 3.5)
+		llvm_map_components_to_libraries (_LIB_LIST ${_COMPONENT_LIST})
+	else ()
+		llvm_map_components_to_libnames (_LIB_LIST ${_COMPONENT_LIST})
+	endif ()
+
+	target_link_libraries (${_TARGET} ${_LIB_LIST})
+endmacro ()
+
+#. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+
+macro (
+target_link_llvm_jit_libraries
+	_TARGET
+	# ...
+	)
+
+	set (_EXTRA_COMPONENT_LIST ${ARGN})
+
+	set (
+		_COMPONENT_LIST
+		native
+		MCJIT
+		)
+
+	if (${LLVM_VERSION} VERSION_LESS 3.6)
+		set (_COMPONENT_LIST ${_COMPONENT_LIST} jit)
+	endif ()
+
+	target_link_llvm_libraries (
+		${_TARGET}
+		${_COMPONENT_LIST}
+		${_EXTRA_COMPONENT_LIST}
+		)
+endmacro ()
+
+#...............................................................................


set XP_USE_LATEST_NODE ON, no cmake option

--- projects/use/usexp-node-config.cmake
+++ projects/use/usexp-node-config.cmake
@@ -8,7 +8,7 @@
 get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
 get_filename_component(XP_ROOTDIR ${XP_ROOTDIR} ABSOLUTE) # remove relative parts
 string(TOUPPER ${prj} PRJ)
-#set(XP_USE_LATEST_NODE ON)
+set(XP_USE_LATEST_NODE ON)
 if(NOT DEFINED XP_USE_LATEST_NODE)
   option(XP_USE_LATEST_NODE "build with node @NODE_NEWVER@ instead of @NODE_OLDVER@" OFF)
 endif()


cmake: hide more cache variables

cmake: hide more cache variables

--- scripts/cmake/ElektraCache.cmake
+++ scripts/cmake/ElektraCache.cmake
@@ -393,6 +393,31 @@
 	XercesC_DIR
 	OPENSSL_INCLUDE_DIR
 	LUA_EXECUTABLE # The following settings are internal (not to be changed by users):
+	CARGO_EXECUTABLE
+	DIFF_COMMAND
+	GLib_CONFIG_INCLUDE_DIR
+	GLib_INCLUDE_DIRS
+	pkgcfg_lib_GIO_gio-2.0
+	pkgcfg_lib_GIO_glib-2.0
+	pkgcfg_lib_GIO_gobject-2.0
+	pkgcfg_lib_GLIB_glib-2.0
+	pkgcfg_lib_GLib_PKG_glib-2.0
+	pkgcfg_lib_GMODULE_glib-2.0
+	pkgcfg_lib_GMODULE_gmodule-2.0
+	pkgcfg_lib_GOBJECT_glib-2.0
+	pkgcfg_lib_GOBJECT_gobject-2.0
+	pkgcfg_lib_PC_LIBXML_xml2
+	pkgcfg_lib_PC_ZeroMQ_zmq
+	pkgcfg_lib_PC_libuv_dl
+	pkgcfg_lib_PC_libuv_nsl
+	pkgcfg_lib_PC_libuv_pthread
+	pkgcfg_lib_PC_libuv_rt
+	pkgcfg_lib_PC_libuv_uv
+	pkgcfg_lib_PC_yaml-cpp_yaml-cp
+	pkgcfg_lib__DBUS_PC_dbus-1
+	pkgcfg_lib__LIBSYSTEMD_PC_syst
+	pkgcfg_lib__OPENSSL_crypto
+	pkgcfg_lib__OPENSSL_ssl
 	SWIG_DIR
 	SWIG_VERSION
 	gtest_build_samples


corrected STIR tag to rel_4.1.0

corrected STIR tag to rel_4.1.0

--- version_config.cmake
+++ version_config.cmake
@@ -209,7 +209,7 @@

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG 4.1.0)
+  set(DEFAULT_STIR_TAG rel_4.1.0)

   ## siemens_to_ismrmrd
   set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd)


update ISMRMRD version

update ISMRMRD version

This version incorporates our HDF5-related patches

--- version_config.cmake
+++ version_config.cmake
@@ -100,8 +100,8 @@
   #set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d )

   ## ISMRMRD
-  set(DEFAULT_ISMRMRD_URL https://github.com/CCPPETMR/ismrmrd )
-  set(DEFAULT_ISMRMRD_TAG 35012c6c8000616546c2d6b1757eba0c5b21b2d4)
+  set(DEFAULT_ISMRMRD_URL https://github.com/ismrmrd/ismrmrd )
+  set(DEFAULT_ISMRMRD_TAG 42d93137cc16c270c8ba065edd2496483161bd21)

 endif()


display test description

display test description

--- testing/run_tests.sh.cmake
+++ testing/run_tests.sh.cmake
@@ -256,6 +256,8 @@
 	for TARGET in $TARGETS; do
 		for TEST in $TESTS; do
 			SHORTNAME=$(basename $TEST)
+			DESC=$(grep -o '\WTEST: .*$' $TEST | sed 's/\WTEST: \(.*\)$/\1/')
+			echo "Testing with $SHORTNAME ($DESC)"
 			echo "[TRANSLATE] Processing $SHORTNAME for $TARGET target"
 			if $PHYSISC --$TARGET -I${CMAKE_SOURCE_DIR}/include $TEST \
 				> $(basename $TEST).$TARGET.log 2>&1; then


Fix armel toolchain setting (#8961)

Fix armel toolchain setting (#8961)

This PR fixes build fail for armel(debian)

Signed-off-by: chunseoklee <3a7dd74f2b5c1e9a6740104abc2c3af221c78946@samsung.com>

--- cross/armel/toolchain.cmake
+++ cross/armel/toolchain.cmake
@@ -31,8 +31,10 @@
     set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
     set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
 else()
-    set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
-    set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
+    # TODO: this setting assumes debian armel rootfs
+    include_directories(SYSTEM ${CROSS_ROOTFS}/usr/include/c++/4.9 ${CROSS_ROOTFS}/usr/include/${TOOLCHAIN}/c++/4.9 )
+    set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}/4.9")
+    set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}/4.9")
 endif()

 set(CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS}    ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)


Revert FindWlc.cmake

Revert FindWlc.cmake

--- src/FindWlc.cmake
+++ src/FindWlc.cmake
@@ -30,21 +30,10 @@

 find_package(PkgConfig)
 pkg_check_modules(PC_WLC QUIET wlc)
-
-if (NOT PC_WLC_FOUND)
-   find_package(XKBCommon REQUIRED)
-   find_package(LibInput REQUIRED)
-   set(WLC_DEP_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIRS} ${LIBINPUT_INCLUDE_DIRS})
-   set(WLC_DEP_LIBRARIES ${XKBCOMMON_LIBRARIES} ${LIBINPUT_LIBRARIES})
-   set(WLC_DEP_DEFINITIONS ${XKBCOMMON_DEFINITIONS} ${LIBINPUT_DEFINITIONS})
-endif ()
-
 find_path(WLC_INCLUDE_DIRS NAMES wlc/wlc.h HINTS ${PC_WLC_INCLUDE_DIRS})
 find_library(WLC_LIBRARIES NAMES wlc HINTS ${PC_WLC_LIBRARY_DIRS})

-list(APPEND WLC_INCLUDE_DIRS ${WLC_DEP_INCLUDE_DIRS})
-list(APPEND WLC_LIBRARIES ${WLC_DEP_LIBRARIES})
-set(WLC_DEFINITIONS ${PC_WLC_CFLAGS_OTHER} ${WLC_DEP_DEFINITIONS})
+set(WLC_DEFINITIONS ${PC_WLC_CFLAGS_OTHER})

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(wlc DEFAULT_MSG WLC_LIBRARIES WLC_INCLUDE_DIRS)


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 3)
-set(CastXML_VERSION_PATCH 20200218)
+set(CastXML_VERSION_PATCH 20200403)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


TEST: MIDAS3.cmake - Use set_property to append test dependencies

- set_tests_properties overwrites all test dependencies, including those
setup by the midas testing framework
- use set_propery with APPEND PROPERTY DEPENDS to add dependencies without
removing any that have already beens set.

--- CMake/MIDAS3.cmake
+++ CMake/MIDAS3.cmake
@@ -142,7 +142,7 @@
   set_tests_properties(${testName}_fetchData PROPERTIES FAIL_REGULAR_EXPRESSION "(Error downloading)|(Error: Computed checksum)")
   # Finally, create the test
   add_test(${testArgs})
-  set_tests_properties(${testName} PROPERTIES DEPENDS ${testName}_fetchData)
+  set_property(TEST ${testName} APPEND PROPERTY DEPENDS ${testName}_fetchData)
 endfunction(midas_add_test)

 # Helper macro to write the download scripts for MIDAS.*{} arguments


Cosmetics

Cosmetics


build STIR with OPENMP by default on Linux

fixes #116

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -113,7 +113,7 @@
 #option(USE_SYSTEM_Gadgetron "Build using an external version of Gadgetron" OFF)
 option(USE_SYSTEM_SIRF "Build using an external version of SIRF" OFF)
 option(USE_SYSTEM_GTest "Build using an external version of GTest" OFF)
-option(BUILD_STIR_WITH_OPENMP "Build STIR with OpenMP acceleration" OFF)
+option(BUILD_STIR_WITH_OPENMP "Build STIR with OpenMP acceleration" ${UNIX})

 if (WIN32)
   set(build_Gadgetron_default OFF)


fix models repo address in test.cmake

fix models repo address in test.cmake

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -43,7 +43,7 @@
   IF(NOT EXISTS "${TEST_MODELS_DIRECTORY}")
     MESSAGE("cloning test models ...")
     EXECUTE_PROCESS(
-      COMMAND ${CTEST_GIT_COMMAND} "clone" "git@vis-gitolite:2222/embree-models" embree-models
+      COMMAND ${CTEST_GIT_COMMAND} "clone" "git@vis-gitolite:embree-models" embree-models
       WORKING_DIRECTORY ${TEST_MODELS_PARENT_DIRECTORY}
       RESULT_VARIABLE retcode)
     check_return_code()