Update ITK 4.11 along release branch

Update ITK 4.11 along release branch

This patch includes an update to ITK's HDF5 to use CMAKE_DL_LIBS over
directly linking to "dl".

Change-Id: I5116f12fb0add37137304e554eba1372466cce0b

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -45,7 +45,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG b3b8d6210b4134c7b49a41184694e7c7ff30c9e1 ) # v4.11.0+ on release branch
+set(ITK_TAG_COMMAND GIT_TAG ea1ee6165aad89e401c5f0f63220a87b4e26fa8e ) # v4.11.0+ on release branch

 if( ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Update ITK superbuild version to 4.7.0+

Update ITK superbuild version to 4.7.0+

Including patch for displacement file cloning.

Change-Id: I8340494e28d7dff90a84a5175e035fae2dfc29ca

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG  v4.7.0)
+set(ITK_TAG_COMMAND GIT_TAG  a768415bbacd68563b0c450f86ef2700feeef299 ) # v4.7.0 with patches on release

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


ENH: Bump VTK's superbuild version to 7.0.0.

Change-Id: I670ce9d15d408974b3e8feefebf1631af5c5f6ca

--- Superbuild/External-VTK.cmake
+++ Superbuild/External-VTK.cmake
@@ -2,7 +2,7 @@
 # Get and build vtk

 if(NOT VTK_TAG)
-  set(VTK_TAG "v6.2.0")
+  set(VTK_TAG "v7.0.0")
 endif()

 ExternalProject_Add(VTK


Fix QT4_GENERATE_MOCS by referencing the moc'ed file with its absolute path

--- Libs/Testing/CMake/ctkMacroGenerateMocs.cmake
+++ Libs/Testing/CMake/ctkMacroGenerateMocs.cmake
@@ -1,11 +1,11 @@

-# QT4_GENERATE_MOCS(inputfiles ... )
+# QT4_GENERATE_MOCS(inputfile1 [inputfile2 ...])

-macro (QT4_GENERATE_MOCS)
+macro(QT4_GENERATE_MOCS)
+  foreach(file ${ARGN})
+    set(moc_file moc_${file})
+    QT4_GENERATE_MOC(${file} ${moc_file})
+    macro_add_file_dependencies(${file} ${CMAKE_CURRENT_BINARY_DIR}/${moc_file})
+  endforeach()
+endmacro()

-  foreach (fileIt ${ARGN})
-    QT4_GENERATE_MOC( ${fileIt} moc_${fileIt})
-    macro_add_file_dependencies(${fileIt} moc_${fileIt})
-  endforeach()
-
-endmacro()


BUG: glew-config.cmake import GLEW::GLEW taget but does not necessarily set GLEW_LIBRARY

--- Modules/ThirdParty/Glew/otb-module-init.cmake
+++ Modules/ThirdParty/Glew/otb-module-init.cmake
@@ -20,6 +20,11 @@

 find_package(GLEW REQUIRED)

+# FIX: glew-config.cmake import GLEW::GLEW taget but does not necessarily set GLEW_LIBRARY
+if(NOT GLEW_LIBRARY)
+  get_target_property(GLEW_LIBRARY GLEW::GLEW IMPORTED_LOCATION_RELEASE)
+endif()
+
 mark_as_advanced(GLEW_INCLUDE_DIR)
 mark_as_advanced(GLEW_LIBRARY)


fix var_is_cached: uninitialized cache variables behave like regular ones, detect as _not_ cached

Change-Id: I7d1ca5bdeaf87c0ccd885099e2f27552a2f0b90e

--- external/vigra_cmake/VigraAddDep.cmake
+++ external/vigra_cmake/VigraAddDep.cmake
@@ -184,7 +184,8 @@

 function(var_is_cached _VAR _CACHED_RESVAR)
   get_property(_vad_cv_isdefined CACHE ${_VAR} PROPERTY TYPE)
-  if ("${_vad_cv_isdefined}" STREQUAL "")
+  # cmake cache vars do not need a type -> UNINITIALIZED -> but then they are also NOT STORED in the cache!
+  if ("${_vad_cv_isdefined}" STREQUAL "" OR "${_vad_cv_isdefined}" STREQUAL "UNINITIALIZED")
    set(${_CACHED_RESVAR} FALSE PARENT_SCOPE)
   else()
    set(${_CACHED_RESVAR} TRUE PARENT_SCOPE)


STYLE: removed obsolete file

STYLE: removed obsolete file

--- Plugins/org.commontk.dicom.examplehost/target_libraries.cmake
+++ Plugins/org.commontk.dicom.examplehost/target_libraries.cmake
@@ -1,9 +0,0 @@
-# See CMake/ctkMacroGetTargetLibraries.cmake
-#
-# This file should list the libraries required to build the current CTK plugin.
-# For specifying required plugins, see the manifest_headers.cmake file.
-#
-
-SET(target_libraries
-  CTKPluginFramework
-)


Reverted the -mfpmath=sse option because of crashes inside Bullet on MinGW.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -219,13 +219,13 @@
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
             if (ENABLE_SSE)
                 if (NOT WIN32)
-                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -mfpmath=sse")
-                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -mfpmath=sse")
+                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse")
+                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse")
                 else ()
                     message (STATUS "Using SSE2 instead of SSE because SSE fails on some Windows ports of GCC")
                     message (STATUS "Disable SSE with the CMake option -DENABLE_SSE=0 if this is not desired")
-                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
-                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
+                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
+                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
                 endif ()
             endif ()
         endif ()


FIX: switch to 'if test' syntax from 'if [' for shell commands (cmake issues)

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -316,33 +316,33 @@
     endif()

     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
         COMMENT "Removing old Frameworks in ${_TARGET_NAME}.app")
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; rm -rf \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
         COMMENT "Removing old Resources in ${_TARGET_NAME}.app")

     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks\"
         COMMENT "Creating Frameworks directory ${_TARGET_NAME}.app")
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; mkdir -p \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources\"
         COMMENT "Creating Resources directory ${_TARGET_NAME}.app")

     if (NOT ${_STATIC})
         if (NOT CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
             add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-                COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_PREFIX_PATH}/lib/dynamic/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
+                COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_PREFIX_PATH}/lib/dynamic/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
                 COMMENT "Creating ${_ACTIONMSG} dependency libraries in ${_TARGET_NAME}.app")
         endif()

         add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-            COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
+            COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; ce_libglob=\"*${CEGUI_BUILD_SUFFIX}.dylib\"\; else ce_ext=\"\"\; shopt -s extglob\; ce_libglob=\"!\(*${CEGUI_BUILD_SUFFIX}\).dylib\"\; fi\; ${_ACTIONCMD} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$$ce_libglob \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Frameworks/\"
             COMMENT "Creating ${_ACTIONMSG} built cegui libraries in ${_TARGET_NAME}.app")
     endif()

     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/\"
         COMMENT "Creating ${_ACTIONMSG} sample datafiles ${_TARGET_NAME}.app")

     # When CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS is TRUE, this
@@ -352,7 +352,7 @@
     # CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS to false and the thing
     # will be copied to the output app bundle instead.
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
-        COMMAND if \[ x${_CEGUI_BUILD_CONFIG} == xDebug \]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_BINARY_DIR}/datafiles/samples \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/datafiles\"
+        COMMAND if test x${_CEGUI_BUILD_CONFIG} == xDebug \; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_BINARY_DIR}/datafiles/samples \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/datafiles\"
         COMMENT "Creating ${_ACTIONMSG} samples.xml ${_TARGET_NAME}.app")
 endmacro()


Fixed license typo on cmake install

Fixed license typo on cmake install

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -250,7 +250,7 @@
 # Install license files for depedencies
 # Eigen
 install(DIRECTORY ${FAST_EXTERNAL_BUILD_DIR}/eigen/src/eigen/
-		DESTINATION fast/licences/eigen/
+		DESTINATION fast/licenses/eigen/
 		COMPONENT fast
 		FILES_MATCHING PATTERN "COPYING.*")

@@ -269,9 +269,9 @@
 		DESTINATION fast/licenses/semaphore/
 		COMPONENT fast
 )
-# Install licences
-install(DIRECTORY ${PROJECT_BINARY_DIR}/licences
-		DESTINATION fast/licences
+# Install licenses
+install(DIRECTORY ${PROJECT_BINARY_DIR}/licenses
+		DESTINATION fast/licenses
         COMPONENT fast
 )
 if(FAST_MODULE_OpenVINO)
@@ -294,4 +294,4 @@
 		DESTINATION fast/licenses/clarius/
 		COMPONENT fast
 	)
-endif()+endif()


[cmake] added IPO as LLVM JIT component (now that we use function-inlining-pass)

--- cmake/import_llvm.cmake
+++ cmake/import_llvm.cmake
@@ -70,6 +70,7 @@
 		_COMPONENT_LIST
 		native
 		MCJIT
+		IPO
 		)

 	if(${LLVM_VERSION} VERSION_LESS 3.6)


bugfix of ispc.cmake, ispc path is searched for each platform

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -19,11 +19,9 @@
   SET (ISPC_INCLUDE_DIR ${ISPC_INCLUDE_DIR} ${ARGN})
 ENDMACRO ()

-IF (NOT __XEON__)
-  execute_process(COMMAND which ispc OUTPUT_VARIABLE ISPC_EXECUTABLE)
-  execute_process(COMMAND dirname ${ISPC_EXECUTABLE} OUTPUT_VARIABLE ISPC_DIR_TEMP)
-  STRING(REGEX REPLACE "\n" "" ISPC_DIR "${ISPC_DIR_TEMP}")
-ENDIF ()
+execute_process(COMMAND which ispc OUTPUT_VARIABLE ISPC_EXECUTABLE)
+execute_process(COMMAND dirname ${ISPC_EXECUTABLE} OUTPUT_VARIABLE ISPC_DIR_TEMP)
+STRING(REGEX REPLACE "\n" "" ISPC_DIR "${ISPC_DIR_TEMP}")

 MACRO (ispc_compile targets)
   IF (__XEON__)


Disable some warnings under Windows

Disable some warnings under Windows

C4305 (truncation double -> float)
C4068 (unknown pragma)

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -25,5 +25,7 @@
 SET(FLAGS_AVX2  "/arch:AVX2 /DCONFIG_AVX2 /QxCORE-AVX2")
 SET(FLAGS_AVX512 "")

-SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} /Ox /fp:fast /Qpar /Oi /Gy /GR-")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox /fp:fast /Qpar /Oi /Gy /GR-")+SET(ADDITIONAL_CXX_FLAGS "/Ox /fp:fast /Qpar /Oi /Gy /GR- /wd4305 /wd4068")
+
+SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} ${ADDITIONAL_CXX_FLAGS}")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${ADDITIONAL_CXX_FLAGS}")


increased timeout for klocwork test

increased timeout for klocwork test

--- common/cmake/test.cmake
+++ common/cmake/test.cmake
@@ -112,7 +112,7 @@

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

 ELSE()


add a compilation test in FindGoogleHash.cmake to catch configuration issues when multiple compilers are used on the same system.

--- cmake/FindGoogleHash.cmake
+++ cmake/FindGoogleHash.cmake
@@ -10,7 +10,14 @@
   ${INCLUDE_INSTALL_DIR}
 )

+if(GOOGLEHASH_INCLUDES)
+  # let's make sure it compiles with the current compiler
+  file(WRITE ${CMAKE_BINARY_DIR}/googlehash_test.cpp
+  "#include <google/sparse_hash_map>\n#include <google/dense_hash_map>\nint main(int argc, char** argv) { google::dense_hash_map<int,float> a; google::sparse_hash_map<int,float> b; return 0;}\n")
+  try_compile(GOOGLEHASH_COMPILE ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/googlehash_test.cpp OUTPUT_VARIABLE GOOGLEHASH_COMPILE_RESULT)
+endif(GOOGLEHASH_INCLUDES)
+
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GOOGLEHASH DEFAULT_MSG GOOGLEHASH_INCLUDES)
+find_package_handle_standard_args(GOOGLEHASH DEFAULT_MSG GOOGLEHASH_INCLUDES GOOGLEHASH_COMPILE)

 mark_as_advanced(GOOGLEHASH_INCLUDES)


[CMake] Build static runtimes for host in Fuchsia first stage

First stage build is only a minimal build where we don't need
a complete multiarch support, but we need enough to build the
second stage.

Differential Revision: https://reviews.llvm.org/D48707

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@335917 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia.cmake
+++ cmake/caches/Fuchsia.cmake
@@ -29,6 +29,18 @@
   set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "")
   set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "")
   set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "")
+else()
+  set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
+  set(LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
+  set(LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
+  set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
+  set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
+  set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
+  set(LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
+  set(LIBCXXABI_INSTALL_LIBRARY OFF CACHE BOOL "")
+  set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
+  set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
+  set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
 endif()

 set(CLANG_BOOTSTRAP_TARGETS


remove workaround using -l:<libpath> necessary for older pkg-config versions

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -269,12 +269,7 @@
   set(PKG_CONFIG_LIBRARIES_WITH_PREFIX "")
   catkin_filter_libraries_for_build_configuration(libraries ${PKG_CONFIG_LIBRARIES})
   foreach(library ${libraries})
-    if(IS_ABSOLUTE ${library})
-      get_filename_component(suffix ${library} EXT)
-      if(NOT "${suffix}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
-        set(library "-l:${library}")
-      endif()
-    else()
+    if(NOT IS_ABSOLUTE ${library})
       set(library "-l${library}")
     endif()
     list_append_deduplicate(PKG_CONFIG_LIBRARIES_WITH_PREFIX ${library})


allow less strict DEPENDS to declare run dependencies without a build dependency, but does not prevent from wrong usage

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -89,8 +89,10 @@
     set(${PROJECT_NAME}_DIR "" CACHE PATH "" FORCE)
   endif()

-  # split DEPENDS with multiple packages into separate items
+  # decide between DEPENDS with components and with multiple packages
   set(PROJECT_DEPENDENCIES "")
+  set(PROJECT_DEPENDENCIES_INCLUDE_DIRS "")
+  set(PROJECT_DEPENDENCIES_LIBRARIES "")
   foreach(depend ${PROJECT_DEPENDS})
     string(REPLACE " " ";" depend_list ${depend})
     # check if the second argument is the COMPONENTS keyword
@@ -100,48 +102,49 @@
       list(GET depend_list 1 second_item)
     endif()
     if("${second_item}" STREQUAL "COMPONENTS")
-      # pass dependencies with components as is
-      list(APPEND PROJECT_DEPENDENCIES ${depend})
-    else()
-      # split multiple names (without components) into separate dependencies
+      # dependencies with components can not be handled by pkg-config files
+      # so the include directories and libraries must be stored explicitly
+      # which requires the package to be find_package()-ed before
+      list(GET depend_list 0 depend_name)
+      if(NOT ${${depend_name}_FOUND})
+        message(FATAL_ERROR "catkin_package() DEPENDS on '${depend}' which must be find_package()-ed before")
+      endif()
+      list(APPEND PROJECT_DEPENDENCIES_INCLUDE_DIRS ${${depend_name}_INCLUDE_DIRS})
+      list(APPEND PROJECT_DEPENDENCIES_LIBRARIES ${${depend_name}_LIBRARIES})
+    else()
+      # split multiple names (without COMPONENTS) into separate dependencies
       foreach(dep ${depend_list})
         list(APPEND PROJECT_DEPENDENCIES ${dep})
       endforeach()
     endif()
   endforeach()

-  # filter out dependencies which have not been find_package()-ed before
-  foreach(depend ${PROJECT_DEPENDENCIES})
-    string(REPLACE " " ";" depend_list ${depend})
-    list(GET depend_list 0 depend_name)
-    if(NOT ${depend_name}_FOUND)
-      message(WARNING "catkin_package() depends on '${depend_name}' which has not been find_package()-ed before")
-      list(REMOVE_ITEM PROJECT_DEPENDENCIES ${depend})
-    endif()
-  endforeach()
-
-  # extract all catkin packages from dependencies
+  # decide if dependencies have been find_package()-ed before
+  # and either pass the name or explicitly the include directories and libraries
   set(PROJECT_CATKIN_DEPENDS "")
-  set(PROJECT_NON_CATKIN_DEPENDS_INCLUDE_DIRS "")
-  set(PROJECT_NON_CATKIN_DEPENDS_LIBRARIES "")
-  foreach(depend ${PROJECT_DEPENDENCIES})
-    string(REPLACE " " ";" depend_list ${depend})
+  foreach(depend_name ${PROJECT_DEPENDENCIES})
     # check if dependency is a catkin package
-    list(GET depend_list 0 depend_name)
-    if(${${depend_name}_FOUND_CATKIN_PROJECT})
+    if(${depend_name}_FOUND AND NOT ${depend_name}_FOUND_CATKIN_PROJECT)
+      # for non-catkin packages which have been find_package()-ed it can not be guaranteed that they have pkg-config file
+      # so the include directories and libraries must be stored explicitly
+      list(APPEND PROJECT_DEPENDENCIES_INCLUDE_DIRS ${${depend_name}_INCLUDE_DIRS})
+      list(APPEND PROJECT_DEPENDENCIES_LIBRARIES ${${depend_name}_LIBRARIES})
+    else()
+      # for catkin packages it can be guaranteed that they are find_package()-able and have pkg-config files
+      # for unknown packages it is assumed that they provide both (else they must be find_package()-ed before)
       list(APPEND PROJECT_CATKIN_DEPENDS ${depend_name})
-      # verify that all catkin dependencies are listed as build- and runtime dependencies
-      list(FIND ${PROJECT_NAME}_BUILD_DEPENDS ${depend_name} _index)
-      if(_index EQUAL -1)
-        message(FATAL_ERROR "catkin_package() depends on catkin package '${depend_name}' which must therefore be listed as a build dependency in the package.xml")
-      endif()
+      # verify that all catkin packages which have been find_package()-ed are listed as build dependencies
+      if(${${depend_name}_FOUND_CATKIN_PROJECT})
+        list(FIND ${PROJECT_NAME}_BUILD_DEPENDS ${depend_name} _index)
+        if(_index EQUAL -1)
+          message(FATAL_ERROR "catkin_package() the package '${depend_name}' has been find_package()-ed but is not listed as a build dependency in the package.xml")
+        endif()
+      endif()
+      # verify that all (assumed) catkin packages are listed as run dependencies
       list(FIND ${PROJECT_NAME}_RUN_DEPENDS ${depend_name} _index)
       if(_index EQUAL -1)
-        message(FATAL_ERROR "catkin_package() depends on catkin package '${depend_name}' which must therefore be listed as a run dependency in the package.xml")
-      endif()
-    elseif(${${depend_name}_FOUND})
-      list(APPEND PROJECT_NON_CATKIN_DEPENDS_INCLUDE_DIRS ${${depend_name}_INCLUDE_DIRS})
-      list(APPEND PROJECT_NON_CATKIN_DEPENDS_LIBRARIES ${${depend_name}_LIBRARIES})
+        message(FATAL_ERROR "catkin_package() DEPENDS on the package '${depend_name}' which must therefore be listed as a run dependency in the package.xml")
+      endif()
     endif()
   endforeach()

@@ -159,8 +162,8 @@
   if(PROJECT_LIBRARIES)
     list(APPEND PKG_CONFIG_LIBRARIES ${PROJECT_LIBRARIES})
   endif()
-  if(PROJECT_NON_CATKIN_DEPENDS_LIBRARIES)
-    list(APPEND PKG_CONFIG_LIBRARIES ${PROJECT_NON_CATKIN_DEPENDS_LIBRARIES})
+  if(PROJECT_DEPENDENCIES_LIBRARIES)
+    list(APPEND PKG_CONFIG_LIBRARIES ${PROJECT_DEPENDENCIES_LIBRARIES})
   endif()

   #
@@ -187,8 +190,8 @@
     endif()
     list(APPEND PROJECT_ABSOLUTE_INCLUDE_DIRS ${include})
   endforeach()
-  if(PROJECT_NON_CATKIN_DEPENDS_INCLUDE_DIRS)
-    list(APPEND PROJECT_ABSOLUTE_INCLUDE_DIRS ${PROJECT_NON_CATKIN_DEPENDS_INCLUDE_DIRS})
+  if(PROJECT_DEPENDENCIES_INCLUDE_DIRS)
+    list(APPEND PROJECT_ABSOLUTE_INCLUDE_DIRS ${PROJECT_DEPENDENCIES_INCLUDE_DIRS})
   endif()

   # prepend library path of this workspace
@@ -268,8 +271,8 @@
   if(NOT "${PROJECT_INCLUDE_DIRS}" STREQUAL "")
     set(PROJECT_ABSOLUTE_INCLUDE_DIRS ${PKG_INCLUDE_PREFIX}/include)
   endif()
-  if(PROJECT_NON_CATKIN_DEPENDS_INCLUDE_DIRS)
-    list(APPEND PROJECT_ABSOLUTE_INCLUDE_DIRS ${PROJECT_NON_CATKIN_DEPENDS_INCLUDE_DIRS})
+  if(PROJECT_DEPENDENCIES_INCLUDE_DIRS)
+    list(APPEND PROJECT_ABSOLUTE_INCLUDE_DIRS ${PROJECT_DEPENDENCIES_INCLUDE_DIRS})
   endif()

   # prepend library path of this workspace


Add a missing quoty quote #144

Add a missing quoty quote #144

--- cmake/clang/download.cmake
+++ cmake/clang/download.cmake
@@ -12,7 +12,7 @@
       # Using OpenSuSE binary to avoid terminfo dependency
       # See https://github.com/Valloric/YouCompleteMe/issues/778 and
       # https://github.com/jeaye/color_coded/issues/144
-      set(CLANG_DIRNAME "clang+llvm-${CLANG_VERSION}-x86_64-opensuse13.2)
+      set(CLANG_DIRNAME "clang+llvm-${CLANG_VERSION}-x86_64-opensuse13.2")
       set(CLANG_MD5 "31ef61aad2b5ca6bfccb40ce48752292")
       set(CLANG_FILENAME "${CLANG_DIRNAME}.tar.xz")
     else()


CMAKE: fixed compilation with -Wundef compiler flag (#3828)

--- cmake/external_gtest.cmake
+++ cmake/external_gtest.cmake
@@ -35,10 +35,10 @@
     )
 endif()

-if(LINUX)
+if(UNIX)
     # workaround for compile error
     # related: https://github.com/intel/mkl-dnn/issues/55
-    set(GTEST_CXX_FLAGS "-Wno-unused-result ${CMAKE_CXX_FLAGS}")
+    set(GTEST_CXX_FLAGS "-Wno-unused-result ${CMAKE_CXX_FLAGS} -Wno-undef")
 else()
     set(GTEST_CXX_FLAGS ${CMAKE_CXX_FLAGS})
 endif()


* FindEO.cmake: added a few variable for more flexibility

--- cmake/modules/FindEO.cmake
+++ cmake/modules/FindEO.cmake
@@ -22,6 +22,37 @@
 # Default enabled components
 SET(EO_LIBRARIES_TO_FIND eo_shared eoutils_shared)

+# Default include search dirs
+SET(_EO_INCLUDE_SEARCH_DIRS
+  /usr/include/eo
+  /usr/local/include/eo
+  )
+
+# Default library search dirs
+SET(_EO_LIBRARY_SEARCH_DIRS
+  /usr/lib
+  /usr/local/lib
+  )
+
+# Default library suffix
+SET(_EO_FIND_LIBRARY_SUFFIX "_shared")
+
+IF(EO_USE_STATIC_LIBS)
+  SET(_EO_FIND_LIBRARY_SUFFIX "")
+ENDIF()
+
+# prepend EO_INCLUDEDIR to search path if specified
+IF( EO_INCLUDEDIR )
+  FILE(TO_CMAKE_PATH ${EO_INCLUDEDIR} EO_INCLUDEDIR)
+  SET(_EO_INCLUDE_SEARCH_DIRS ${EO_INCLUDEDIR} ${_EO_INCLUDE_SEARCH_DIRS})
+ENDIF()
+
+# prepend EO_LIBRARYDIR to search path if specified
+IF( EO_LIBRARYDIR )
+  FILE(TO_CMAKE_PATH ${EO_LIBRARYDIR} EO_LIBRARYDIR)
+  SET(_EO_LIBRARY_SEARCH_DIRS ${EO_LIBRARYDIR} ${_EO_LIBRARY_SEARCH_DIRS})
+ENDIF()
+
 # Use FIND_PACKAGE( EO COMPONENTS ... ) to enable modules
 IF(EO_FIND_COMPONENTS)
   FOREACH(component ${EO_FIND_COMPONENTS})
@@ -33,37 +64,37 @@
   IF(NOT EO_USE_PYEO)
     SET(EO_DONT_USE_PYEO 1)
   ELSE(NOT EO_USE_PYEO)
-    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO_shared)
+    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO${_EO_FIND_LIBRARY_SUFFIX})
   ENDIF(NOT EO_USE_PYEO)

   IF(NOT EO_USE_ES)
     SET(EO_DONT_USE_ES 1)
   ELSE(NOT EO_USE_ES)
-    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es_shared)
+    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es${_EO_FIND_LIBRARY_SUFFIX})
   ENDIF(NOT EO_USE_ES)

   IF(NOT EO_USE_GA)
     SET(EO_DONT_USE_GA 1)
   ELSE(NOT EO_USE_GA)
-    SET(EO_LIBRARIES_TO_FIND ga_shared ${EO_LIBRARIES_TO_FIND})
+    SET(EO_LIBRARIES_TO_FIND ga${_EO_FIND_LIBRARY_SUFFIX} ${EO_LIBRARIES_TO_FIND})
   ENDIF(NOT EO_USE_GA)

   IF(NOT EO_USE_CMA)
     SET(EO_DONT_USE_CMA 1)
   ELSE(NOT EO_USE_CMA)
-    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma_shared)
+    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma${_EO_FIND_LIBRARY_SUFFIX})
   ENDIF(NOT EO_USE_CMA)

   IF(NOT EO_USE_MPI)
     SET(EO_DONT_USE_MPI 1)
   ELSE(NOT EO_USE_MPI)
-    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eompi_shared)
+    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eompi${_EO_FIND_LIBRARY_SUFFIX})
   ENDIF(NOT EO_USE_MPI)

   IF(NOT EO_USE_SERIAL)
     SET(EO_DONT_USE_SERIAL 1)
   ELSE(NOT EO_USE_SERIAL)
-    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eoserial_shared)
+    SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eoserial${_EO_FIND_LIBRARY_SUFFIX})
   ENDIF(NOT EO_USE_SERIAL)
 ENDIF(EO_FIND_COMPONENTS)

@@ -72,8 +103,7 @@
     EO_INCLUDE_DIRS
     EO.h
     PATHS
-    /usr/include/eo
-    /usr/local/include/eo
+    ${_EO_INCLUDE_SEARCH_DIRS}
     )
 ENDIF(NOT EO_INCLUDE_DIRS)

@@ -82,8 +112,7 @@
     EO_LIBRARY_DIRS
     libeo.a
     PATHS
-    /usr/lib
-    /usr/local/lib
+    ${_EO_LIBRARY_SEARCH_DIRS}
     )
 ENDIF(NOT EO_LIBRARY_DIRS)

@@ -94,8 +123,7 @@
       EO_${component}_LIBRARY
       NAMES ${component}
       PATHS
-      /usr/lib
-      /usr/local/lib
+      ${_EO_LIBRARY_SEARCH_DIRS}
       )
     IF(EO_${component}_LIBRARY)
       SET(EO_LIBRARIES ${EO_LIBRARIES} ${EO_${component}_LIBRARY})


update: bump sinsp and scap to fntlnz-aarch64

Signed-off-by: Lorenzo Fontana <0189fb5ac8a393aa741cf57f29cfe3228fcad081@gmail.com>

--- cmake/modules/sysdig.cmake
+++ cmake/modules/sysdig.cmake
@@ -29,8 +29,8 @@
 # default below In case you want to test against another sysdig version just pass the variable - ie., `cmake
 # -DSYSDIG_VERSION=dev ..`
 if(NOT SYSDIG_VERSION)
-  set(SYSDIG_VERSION "06dc8471840ce39ea6c30bb69dfefb1a942b1684")
-  set(SYSDIG_CHECKSUM "SHA256=9ffdae1719c055e3761bf8b6285246f1a2dd919018ef500e78cf1b1222c155d1")
+  set(SYSDIG_VERSION "fntlnz-aarch64")
+  set(SYSDIG_CHECKSUM "SHA256=d57ec733b63f638c2907d398793d8676b6f4ab4cdb6f318f2ef232e09924a117")
 endif()
 set(PROBE_VERSION "${SYSDIG_VERSION}")


Added WTSAPI32.dll to WINDOWS_SYSTEM_DLLS


HighFive vcpkg file

HighFive vcpkg file

--- ci/vcpkg/ports/highfive/portfile.cmake
+++ ci/vcpkg/ports/highfive/portfile.cmake
@@ -21,4 +21,4 @@
 vcpkg_install_cmake()

 file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
-configure_file("${CURRENT_BUILDTREES_DIR}/src/v2.2.1-8c044b9331/LICENSE" "${CURRENT_PACKAGES_DIR}/share/highfive/copyright" COPYONLY)+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright)


[libc++] Workaround old versions of CMake that don't understand list(JOIN)

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@374120 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/DefineLinkerScript.cmake
+++ cmake/Modules/DefineLinkerScript.cmake
@@ -38,7 +38,7 @@
       endif()
     endforeach()
   endif()
-  list(JOIN link_libraries " " link_libraries)
+  string(REPLACE ";" " " link_libraries "${link_libraries}")

   set(linker_script "INPUT(${soname} ${link_libraries})")
   add_custom_command(TARGET "${target}" POST_BUILD


[CMake][Exp PyROOT] Build only one PyROOT version if either PYTHON_EXECUTABLE or Python_EXECUTABLE are passed

PYTHON_EXECUTABLE or Python_EXECUTABLE are specified: only one PyROOT is
built with the version specified;

Python2_EXECUTABLE and/or Python3_EXECUTABLE are specified: both
versions are built

Nothing is specified: both versions are built

--- cmake/modules/SearchRootCoreDeps.cmake
+++ cmake/modules/SearchRootCoreDeps.cmake
@@ -14,77 +14,100 @@
 endif()

 if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
-  # - Check if the PYTHON_EXECUTABLE deprecated variable was passed by the
-  # user; if so, check weather it points to Python 2 or 3 and set the
-  # appropriate Python{X}_EXECUTABLE variable
-  # - Look for Python3 and set the deprecated variables to the ones set
-  # automatically by find_package(Python3 ...)
-  # - Look for Python2 and set the deprecated variables to the ones set
-  # automatically by find_package(Python2 ...) ONLY IF PYTHON3 WASN'T FOUND
-  if(PYTHON_EXECUTABLE)
-    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;print(sys.version_info[0])"
+
+  if(PYTHON_EXECUTABLE OR Python_EXECUTABLE)
+    # - Check if the PYTHON_EXECUTABLE deprecated variable or Python_EXECUTABLE
+    # was passed by the user; if so, PyROOT will be built with a single version
+    if(PYTHON_EXECUTABLE)
+      set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
+    endif()
+    execute_process(COMMAND ${Python_EXECUTABLE} -c "import sys;print(sys.version_info[0])"
                     OUTPUT_VARIABLE PYTHON_PREFER_VERSION
                     ERROR_VARIABLE PYTHON_PREFER_VERSION_ERR)
     if(PYTHON_PREFER_VERSION_ERR)
-      message(WARNING "Unable to determine version of ${PYTHON_EXECUTABLE}: ${PYTHON_PREFER_VERSION_ERR}")
+      message(WARNING "Unable to determine version of ${Python_EXECUTABLE}: ${PYTHON_PREFER_VERSION_ERR}")
     endif()
     string(STRIP "${PYTHON_PREFER_VERSION}" PYTHON_PREFER_VERSION)
-    set(Python${PYTHON_PREFER_VERSION}_EXECUTABLE "${PYTHON_EXECUTABLE}")
-  endif()
+    find_package(Python COMPONENTS Interpreter Development NumPy)
+    if(Python_Development_FOUND)
+      set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_INCLUDE_DIRS "${Python_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_LIBRARIES "${Python_LIBRARIES}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_STRING "${Python_VERSION}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_UNDER_VERSION_STRING "${Python_VERSION_MAJOR}_${Python_VERSION_MINOR}")
+      set(NUMPY_FOUND ${Python_NumPy_FOUND} CACHE INTERNAL "" FORCE)
+      set(NUMPY_INCLUDE_DIRS "${Python_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+    endif()
+    if(DEFINED Python_VERSION AND "${Python_VERSION}" VERSION_LESS "2.7")
+      message(WARNING "Ignoring Python installation: unsupported version ${Python_VERSION} (version>=2.7 required)")
+    endif()
+    if(Python_Development_FOUND)
+      message(STATUS "PyROOT will be built for version ${PYTHON_VERSION_MAJOR}")
+    else()
+      message(WARNING "No supported Python development package was found for the specified Python executable; PyROOT will not be built")
+    endif()

-  find_package(Python3 COMPONENTS Interpreter Development NumPy)
-  if(Python3_Development_FOUND)
-    set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-    set(PYTHON_INCLUDE_DIRS "${Python3_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-    set(PYTHON_LIBRARIES "${Python3_LIBRARIES}" CACHE INTERNAL "" FORCE)
-    set(PYTHON_VERSION_STRING "${Python3_VERSION}" CACHE INTERNAL "" FORCE)
-    set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
-    set(PYTHON_VERSION_MINOR "${Python3_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
-    set(PYTHON_UNDER_VERSION_STRING "${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}")
-    set(NUMPY_FOUND ${Python3_NumPy_FOUND} CACHE INTERNAL "" FORCE)
-    set(NUMPY_INCLUDE_DIRS "${Python3_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-  endif()
+  else()
+    # - Look for Python3 and set the deprecated variables to the ones set
+    # automatically by find_package(Python3 ...)
+    # - Look for Python2 and set the deprecated variables to the ones set
+    # automatically by find_package(Python2 ...) ONLY IF PYTHON3 WASN'T FOUND
+    find_package(Python3 COMPONENTS Interpreter Development NumPy)
+    if(Python3_Development_FOUND)
+      set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_INCLUDE_DIRS "${Python3_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_LIBRARIES "${Python3_LIBRARIES}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_STRING "${Python3_VERSION}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MINOR "${Python3_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_UNDER_VERSION_STRING "${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}")
+      set(NUMPY_FOUND ${Python3_NumPy_FOUND} CACHE INTERNAL "" FORCE)
+      set(NUMPY_INCLUDE_DIRS "${Python3_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+    endif()

-  find_package(Python2 COMPONENTS Interpreter Development NumPy)
-  if(DEFINED Python2_VERSION AND "${Python2_VERSION}" VERSION_LESS "2.7")
-    message(WARNING "Ignoring Python2 installation: unsupported version ${Python2_VERSION} (version>=2.7 required)")
-  endif()
-  if(Python2_Development_FOUND AND "${Python2_VERSION}" VERSION_GREATER_EQUAL "2.7")
-    if(NOT Python3_Development_FOUND)
-      # Only Python2 was found, set as main
-      set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_LIBRARIES "${Python2_LIBRARIES}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_STRING "${Python2_VERSION}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_UNDER_VERSION_STRING "${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}")
-      set(NUMPY_FOUND ${Python2_NumPy_FOUND} CACHE INTERNAL "" FORCE)
-      set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-    else()
-      # Both Python3 and 2 found, set 2 as 'other'
-      set(OTHER_PYTHON_EXECUTABLE "${Python2_EXECUTABLE}")
-      set(OTHER_PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}")
-      set(OTHER_PYTHON_LIBRARIES "${Python2_LIBRARIES}")
-      set(OTHER_PYTHON_VERSION_STRING "${Python2_VERSION}")
-      set(OTHER_PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
-      set(OTHER_PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}")
-      set(OTHER_PYTHON_UNDER_VERSION_STRING "${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}")
-      set(OTHER_NUMPY_FOUND ${Python2_NumPy_FOUND})
-      set(OTHER_NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}")
+    find_package(Python2 COMPONENTS Interpreter Development NumPy)
+    if(DEFINED Python2_VERSION AND "${Python2_VERSION}" VERSION_LESS "2.7")
+      message(WARNING "Ignoring Python2 installation: unsupported version ${Python2_VERSION} (version>=2.7 required)")
     endif()
-  endif()
+    if(Python2_Development_FOUND AND "${Python2_VERSION}" VERSION_GREATER_EQUAL "2.7")
+      if(NOT Python3_Development_FOUND)
+        # Only Python2 was found, set as main
+        set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_LIBRARIES "${Python2_LIBRARIES}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_VERSION_STRING "${Python2_VERSION}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_UNDER_VERSION_STRING "${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}")
+        set(NUMPY_FOUND ${Python2_NumPy_FOUND} CACHE INTERNAL "" FORCE)
+        set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+      else()
+        # Both Python3 and 2 found, set 2 as 'other'
+        set(OTHER_PYTHON_EXECUTABLE "${Python2_EXECUTABLE}")
+        set(OTHER_PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}")
+        set(OTHER_PYTHON_LIBRARIES "${Python2_LIBRARIES}")
+        set(OTHER_PYTHON_VERSION_STRING "${Python2_VERSION}")
+        set(OTHER_PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
+        set(OTHER_PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}")
+        set(OTHER_PYTHON_UNDER_VERSION_STRING "${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}")
+        set(OTHER_NUMPY_FOUND ${Python2_NumPy_FOUND})
+        set(OTHER_NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}")
+      endif()
+    endif()

-  if(NOT Python3_Development_FOUND AND (NOT Python2_Development_FOUND OR "${Python2_VERSION}" VERSION_LESS "2.7"))
-    message(WARNING "No supported Python 2 or 3 development packages were found; PyROOT will not be built.")
-  endif()
+    if(NOT Python3_Development_FOUND AND (NOT Python2_Development_FOUND OR "${Python2_VERSION}" VERSION_LESS "2.7"))
+      message(WARNING "No supported Python 2 or 3 development packages were found; PyROOT will not be built.")
+    endif()

-  # Print message saying with which versions of Python are used to build
-  if(pyroot_experimental)
-    if(NOT Python3_Development_FOUND OR NOT Python2_Development_FOUND)
-      message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for version ${PYTHON_VERSION_MAJOR} ")
-    elseif(Python3_Development_FOUND AND Python2_Development_FOUND)
-      message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for versions ${PYTHON_VERSION_MAJOR} and ${OTHER_PYTHON_VERSION_MAJOR}")
+    # Print message saying with which versions of Python are used to build
+    if(pyroot_experimental)
+      if(NOT Python3_Development_FOUND OR NOT Python2_Development_FOUND)
+        message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for version ${PYTHON_VERSION_MAJOR} ")
+      elseif(Python3_Development_FOUND AND Python2_Development_FOUND)
+        message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for versions ${PYTHON_VERSION_MAJOR} and ${OTHER_PYTHON_VERSION_MAJOR}")
+      endif()
     endif()
   endif()


FIXES gh-936 - Added psmisc to lenny dependency list.

Signed-off-by: Philip Schwartz <90179e62a462019a8b170b5c04a4f0541ad92702@lexisnexis.com>

--- cmake_modules/dependencies/lenny.cmake
+++ cmake_modules/dependencies/lenny.cmake
@@ -1 +1 @@
-set ( CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.34.1, libicu38, libxalan110, libxerces-c28, binutils, libldap-2.4-2, openssl, zlib1g, g++, sudo, openssh-client, openssh-server, expect, sysvconfig")
+set ( CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.34.1, libicu38, libxalan110, libxerces-c28, binutils, libldap-2.4-2, openssl, zlib1g, g++, sudo, openssh-client, openssh-server, expect, sysvconfig, psmisc")


Update Version.cmake

Update Version.cmake

--- src/Version.cmake
+++ src/Version.cmake
@@ -2,4 +2,4 @@
 # Boilerplate package Version.cmake file for BootsOnTheGround PACKAGE.
 # (NOTE: This version number is loaded by the package and the project.)
 #
-SET( VERSION "0.4.0" )
+SET( VERSION "0.5.0" )


[Build] Suppressed wrong end-of-lines.

[Build] Suppressed wrong end-of-lines.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1280,9 +1280,7 @@

   # Convenient message to the user/developer
   if (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
-    install (CODE "message (\"On Unix-based platforms, run "
-	  "export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH "
-	  "once per session\")")
+    install (CODE "message (\"On Unix-based platforms, run export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH once per session\")")
   endif (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)

 endmacro (module_library_add_standard)


allow migrating away from cmake option for LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING

In r288754, Mehdi added a cmake option to disable enforcement of the ABI
breaking checks in the "abi-breaking.h" header. We used that when building
Swift and it works, but I think it will be better to control this with a
preprocessor macro instead of a cmake option. That will let us opt out of
the enforcement more selectively.

This change allows skipping the cmake setting if the existing preprocessor
macro is already defined. My intention here is to make this change and get
Swift to use it, and then after a few weeks, we can remove the cmake option.
I want to stage it like that to be less disruptive. I'm not aware of anyone
else using that cmake option.

Mehdi had some initial concern about the impact of using a preprocessor
macro when building with modules enabled. I don't think that will be a
problem if we set the macro on the command line with a -D option in those
contexts where we need to disable the enforcement of the checks.

https://reviews.llvm.org/D29919

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

--- include/llvm/Config/abi-breaking.h.cmake
+++ include/llvm/Config/abi-breaking.h.cmake
@@ -17,7 +17,9 @@

 /* Define to disable the link-time checking of mismatch for
    LLVM_ENABLE_ABI_BREAKING_CHECKS */
+#ifndef LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
 #cmakedefine01 LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
+#endif
 #if !LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING

 // ABI_BREAKING_CHECKS protection: provides link-time failure when clients build


ENT-3298 Silence reports about std::allocator VS2017 is giving error/warnings about an std::allocator template having been removed from C++17. Reports say this is not really true so define macro to remove check.

--- flags/vs-cxx17.cmake
+++ flags/vs-cxx17.cmake
@@ -9,7 +9,9 @@

 include(polly_add_cache_flag)

-polly_add_cache_flag(CMAKE_CXX_FLAGS_INIT "/std:c++17")
+# VS2017 (at least) erroneously reports an issue with std::allocator on C++17. Define
+# _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING to shut it up.
+polly_add_cache_flag(CMAKE_CXX_FLAGS_INIT "/std:c++17 -D_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING")

 # Set CMAKE_CXX_STANDARD to cache to override project local value if present.
 # FORCE added in case CMAKE_CXX_STANDARD already set in cache


Fix info string generation for ESP32 (#2100)

***NO_CI***

--- CMake/binutils.ESP32.cmake
+++ CMake/binutils.ESP32.cmake
@@ -639,7 +639,7 @@

     # need to read the supplied SDK CONFIG file and replace the appropriate options
     file(READ
-        "${SDKCONFIG_DEFAULTS_FILE}"
+        ${CMAKE_SOURCE_DIR}/sdkconfig
         SDKCONFIG_DEFAULT_CONTENTS)

     # find out if there is support for PSRAM
@@ -648,8 +648,10 @@
     # set variable
     if(${CONFIG_ESP32_SPIRAM_SUPPORT_POS} GREATER -1)
         set(PSRAM_INFO ", support for PSRAM")
+        message(STATUS "Support for PSRAM included")
     else()
         set(PSRAM_INFO ", without support for PSRAM")
+        message(STATUS "Support for PSRAM **IS NOT** included")
     endif()

     # find out revision info
@@ -659,8 +661,10 @@
     # set variable
     if(${CONFIG_ESP32_REV_MIN_0_POS} GREATER -1)
         set(REVISION_INFO ", chip rev. >= 0")
+        message(STATUS "Building for chip revision >= 0")
     elseif(${CONFIG_ESP32_REV_MIN_3_POS} GREATER -1)
         set(REVISION_INFO ", chip rev. 3")
+        message(STATUS "Building for chip revision 3")
     endif()

     # find out if there is support for BLE


don't export the the hl lib unless we build it

Change-Id: I1b70ba678dc202e33827b212760c89ea6579cefc

--- CMake/vtkHDF5Library.cmake
+++ CMake/vtkHDF5Library.cmake
@@ -11,7 +11,10 @@
   SET(HDF5_EXPORTED_TARGETS ${VTK_INSTALL_EXPORT_NAME})

   IF(NOT VTK_INSTALL_NO_LIBRARIES)
-    SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5 vtkhdf5_hl)
+    SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5)
+    IF(HDF5_BUILD_HL_LIB)
+       SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5_hl)
+    ENDIF(HDF5_BUILD_HL_LIB)
   ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)

   # Silence HDF5's warnings. We'll let them get fixed upstream


Disabling the DCMTK force_rebuild step.

Disabling the DCMTK force_rebuild step.

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -45,14 +45,18 @@
       )
     SET(DCMTK_DIR ${ep_install_dir})

-    ExternalProject_Add_Step(${proj} force_rebuild
-      COMMENT "Force ${proj} re-build"
-      DEPENDERS build    # Steps that depend on this step
-      ALWAYS 1
-      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${proj}-build
-      DEPENDS
-        ${proj_DEPENDENCIES}
-      )
+# This was used during heavy development on DCMTK itself.
+# Disabling it for now. (It also leads to to build errors
+# with the XCode CMake generator on Mac).
+#
+#    ExternalProject_Add_Step(${proj} force_rebuild
+#      COMMENT "Force ${proj} re-build"
+#      DEPENDERS build    # Steps that depend on this step
+#      ALWAYS 1
+#      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${proj}-build
+#      DEPENDS
+#        ${proj_DEPENDENCIES}
+#      )

     # Since DCMTK is statically build, there is not need to add its corresponding
     # library output directory to CTK_EXTERNAL_LIBRARY_DIRS


Applied patch to fix escaping for Xcode, #1893

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -148,7 +148,7 @@
   if(NOT ROSPACK_MAKEDIST)

   # Add ROS_PACKAGE_NAME define
-  add_definitions(-DROS_PACKAGE_NAME=\\\"${PROJECT_NAME}\\\")
+  add_definitions(-DROS_PACKAGE_NAME='\"${PROJECT_NAME}\"')

   # ROS_BUILD_TYPE is set by rosconfig
   set(CMAKE_BUILD_TYPE ${ROS_BUILD_TYPE})


Add mpfr download mirror

Add mpfr download mirror

--- deps/MPFR/MPFR.cmake
+++ deps/MPFR/MPFR.cmake
@@ -19,7 +19,7 @@

 else ()
     ExternalProject_Add(dep_MPFR
-        URL https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2
+        URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2  # mirrors are allowed
         BUILD_IN_SOURCE ON
         CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --with-gmp=${DESTDIR}/usr/local --with-pic
         BUILD_COMMAND make -j


libtiff.cmake - syntax fix

libtiff.cmake - syntax fix

--- libtiff.cmake
+++ libtiff.cmake
@@ -21,7 +21,7 @@

 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   set(libtiff_PATCH_COMMAND ${PATCH_EXE}
-    ${libtiff_SRC_DIR}/tools/tiffgt.c ${PATCH_DIR}/libtiff.patch
+    ${libtiff_SRC_DIR}/tools/tiffgt.c ${PATCH_DIR}/libtiff.patch )
 else()
   set(libtiff_PATCH_COMMAND "")
 endif()


Added Include Path for lwip

Added Include Path for lwip

--- mbed-cmake/arm_mbed.cmake
+++ mbed-cmake/arm_mbed.cmake
@@ -96,11 +96,6 @@
 include_directories("${MBED_PATH}/mbed/TARGET_${MBED_TARGET}/TARGET_${MBED_VENDOR}/TARGET_${MBED_FAMILY}/")
 include_directories("${MBED_PATH}/mbed/TARGET_${MBED_TARGET}/TARGET_${MBED_VENDOR}/TARGET_${MBED_FAMILY}/TARGET_${MBED_CPU}")

-get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
-foreach(dir ${dirs})
-  message(STATUS "  ${dir}")
-endforeach()
-
 link_directories("${MBED_PATH}/mbed/TARGET_${MBED_TARGET}/${TOOLCHAIN}")

 # add networking
@@ -115,6 +110,7 @@
   include_directories("${MBED_PATH}/net/eth/lwip/include")
   include_directories("${MBED_PATH}/net/eth/lwip/include/ipv4")
   include_directories("${MBED_PATH}/net/eth/lwip-sys")
+  include_directories("${MBED_PATH}/net/eth/lwip-eth/arch/TARGET_${MBED_VENDOR}")

   link_directories("${MBED_PATH}/net/eth/TARGET_${MBED_TARGET}/${TOOLCHAIN}")
   set(MBED_LIBS ${MBED_LIBS} eth)
@@ -154,3 +150,11 @@
   link_directories("${MBED_PATH}/dsp/TARGET_${MBED_TARGET}/${TOOLCHAIN}")
   set(MBED_LIBS ${MBED_LIBS} cmsis_dsp dsp)
 endif()
+
+# print all include directories
+get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
+message(STATUS "Include Directories")
+foreach(dir ${dirs})
+  message(STATUS "  ${dir}")
+endforeach()
+


New version: 0.2.12

New version: 0.2.12

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "2")
-SET(HAWKEY_PATCH "11")
+SET(HAWKEY_PATCH "12")


Add boost serialization libraries to BALLConfigBoost

--- cmake/BALLConfigBoost.cmake
+++ cmake/BALLConfigBoost.cmake
@@ -1,4 +1,4 @@
-SET(BALL_BOOST_COMPONENTS system thread iostreams regex date_time)
+SET(BALL_BOOST_COMPONENTS system thread iostreams regex date_time serialization)
 if ( WIN32 )
   LIST(APPEND BALL_BOOST_COMPONENTS zlib bzip2)
 	ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)


By default set WITH_NEXT_FRAMEWORK to 0

By default set WITH_NEXT_FRAMEWORK to 0

A CMake option named "WITH_NEXT_FRAMEWORK" could be added so that
a framework is generated. This would be equivalent to the "--enable-framework"
option.

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -196,7 +196,7 @@
 set(WITH_NEXT_FRAMEWORK 0)
 if(APPLE)
   set(WITH_DYLD 1)
-  set(WITH_NEXT_FRAMEWORK 1)
+  set(WITH_NEXT_FRAMEWORK 0) # TODO: See --enable-framework option.
 endif(APPLE)

 if(HAVE_LONG_LONG)


cmake: allow boards to have extra cmake parametes

This commit allows boards to have custom cmake parameters that are
loaded before device tree is processed.

Signed-off-by: Andrei Gansari <f1330555a90b7a22d81843f3c4366f58b50eae34@nxp.com>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -441,6 +441,9 @@
 set(CMAKE_CXX_COMPILER_FORCED 1)

 include(${ZEPHYR_BASE}/cmake/host-tools.cmake)
+
+# Include board specific device-tree flags before parsing.
+include(${BOARD_DIR}/pre_dt_board.cmake OPTIONAL)

 # DTS should be close to kconfig because CONFIG_ variables from
 # kconfig and dts should be available at the same time.


Revert "cmake: manual handling of CMakeCheckCompilerFlag.cmake inclusion"

With the change to cmake_minimum_required(VERSION 3.20.0) then this
commit is no longer needed.

This reverts commit 6ca2bf25cb1da64edef1fe7592ab6fccdd4a16f7.

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -77,24 +77,6 @@
 set(__build_dir ${CMAKE_CURRENT_BINARY_DIR}/zephyr)

 set(PROJECT_BINARY_DIR ${__build_dir})
-
-if(${CMAKE_VERSION} VERSION_EQUAL 3.19.0 OR
-   ${CMAKE_VERSION} VERSION_EQUAL 3.19.1)
-  message(WARNING "CMake 3.19.0/3.19.1 contains a bug regarding Toolchain/compiler "
-          "testing. Consider switching to a different CMake version.\n"
-          "See more here: \n"
-          "- https://github.com/zephyrproject-rtos/zephyr/issues/30232\n"
-          "- https://gitlab.kitware.com/cmake/cmake/-/issues/21497")
-  # This is a workaround for #30232.
-  # During Zephyr CMake invocation a plain C compiler is used for DTS.
-  # This results in the internal `CheckCompilerFlag.cmake` being included by CMake
-  # Later, when the full toolchain is configured, then `CMakeCheckCompilerFlag.cmake` is included.
-  # This overloads the `cmake_check_compiler_flag()` function, thus causing #30232.
-  # By manualy loading `CMakeCheckCompilerFlag.cmake` then `CheckCompilerFlag.cmake` will overload
-  # the functions (and thus win the battle), and because `include_guard(GLOBAL)` is used in
-  # `CMakeCheckCompilerFlag.cmake` this file will not be re-included later.
-  include(${CMAKE_ROOT}/Modules/Internal/CMakeCheckCompilerFlag.cmake)
-endif()

 message(STATUS "Application: ${APPLICATION_SOURCE_DIR}")


lcov ignore src/examples (#7341)

lcov ignore src/examples (#7341)

--- cmake/common/coverage.cmake
+++ cmake/common/coverage.cmake
@@ -93,7 +93,9 @@
         add_custom_target(${_targetname} DEPENDS ${coverage_info})

         add_custom_command(OUTPUT ${coverage_cleaned}
-                COMMAND COMMAND ${LCOV_PATH} --quiet --remove ${coverage_info} 'tests/*' '/usr/*' --output-file ${coverage_cleaned}
+                COMMAND COMMAND ${LCOV_PATH} --quiet
+                        --remove ${coverage_info} 'tests/*' '/usr/*' 'src/examples*'
+                        --output-file ${coverage_cleaned}
                 DEPENDS ${coverage_info}
         )


Added Qt 5.5.0 to cmake/configs/default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -62,6 +62,7 @@
 hunter_config(OpenCV-Extra VERSION 3.0.0)
 hunter_config(OpenSSL VERSION 1.0.2a)
 hunter_config(PNG VERSION 1.6.16-p3)
+hunter_config(Qt VERSION 5.5.0)
 hunter_config(RapidJSON VERSION 0.11-hunter)
 hunter_config(SQLite3 VERSION autoconf-3080803) #R-Tree enabled
 hunter_config(Sober VERSION 0.1.2)


Export Python includes

Export Python includes

--- cmake/includes/Export.cmake
+++ cmake/includes/Export.cmake
@@ -26,13 +26,15 @@
 #       projects
 # JAVA_INCLUDES: directories containing java files that wish to be exposed to
 #       other projects
+# PYTHON_INCLUDES: directories containing python files that wish to be exposed
+#       to other projects
 #
 ###############################################################################
 function(export_project)
     set(options )
     set(oneValueArgs NAME VERSION)
     set(multiValueArgs INCLUDES LIBS ARCHIVES BINS RES JARS APKS JAR_PATHS
-        JAVA_INCLUDES)
+        JAVA_INCLUDES PYTHON_INCLUDES)
     cmake_parse_arguments(EXP "${options}" "${oneValueArgs}"
         "${multiValueArgs}" ${ARGN})

@@ -177,6 +179,14 @@
                 "list(APPEND ${EXP_NAME_uc}_JAVA_INCLUDE_DIRS ${j})\n")
         endforeach()
     endif()
+    # export python includes
+    if (EXP_PYTHON_INCLUDES)
+        file(APPEND ${export_config} "set(${EXP_NAME_uc}_PYTHON_INCLUDE_DIRS \"\")\n")
+        foreach(j ${EXP_PYTHON_INCLUDES})
+            file(APPEND ${export_config}
+                "list(APPEND ${EXP_NAME_uc}_PYTHON_INCLUDE_DIRS ${j})\n")
+        endforeach()
+    endif()

     # write the version file
     include(CMakePackageConfigHelpers)


[CMake] Allow custom extensions for externalized debug info

Summary:
Extra flexibility for emitting debug info to external files (remains Darwin only for now).
LLDB needs this functionality to emit a LLDB.framework.dSYM instead of LLDB.dSYM when building the framework, because the latter could conflict with the driver's lldb.dSYM when emitted in the same directory on case-insensitive file systems.

Reviewers: friss, bogner, beanz

Subscribers: mgorny, aprantl, llvm-commits, #lldb

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60862

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1581,14 +1581,21 @@
     endif()
   endif()

-  if(LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR)
-    if(APPLE)
-      set(output_name "$<TARGET_FILE_NAME:${name}>.dSYM")
+  if(APPLE)
+    if(LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION)
+      set(file_ext ${LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION})
+    else()
+      set(file_ext dSYM)
+    endif()
+
+    set(output_name "$<TARGET_FILE_NAME:${name}>.${file_ext}")
+
+    if(LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR)
       set(output_path "-o=${LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR}/${output_name}")
-    endif()
-  endif()
-
-  if(APPLE)
+    else()
+      set(output_path "-o=${output_name}")
+    endif()
+
     if(CMAKE_CXX_FLAGS MATCHES "-flto"
       OR CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-flto")


CMake: Add Darwin-specific linker flags for building loadable modules

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -27,10 +27,16 @@
     message(STATUS "Loadable modules not supported on this platform.
 ${name} ignored.")
   else()
-    set(BUILD_SHARED_LIBS ON)
     llvm_process_sources( ALL_FILES ${ARGN} )
     add_library( ${name} MODULE ${ALL_FILES} )
     set_target_properties( ${name} PROPERTIES PREFIX "" )
+
+    if (APPLE)
+      # Darwin-specific linker flags for loadable modules.
+      set_target_properties(${name} PROPERTIES
+        LINK_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
+    endif()
+
     install(TARGETS ${name}
       LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
       ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})


Use cat and not type Under MSYS, same as Cygwin.
type means something else under the MSYS shell.

Patch by Tzafrir Poupko!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -91,7 +91,7 @@

     set(CAT "cat")
     set(export_file_nativeslashes ${export_file})
-    if(WIN32 AND NOT CYGWIN)
+    if(WIN32 AND NOT CYGWIN AND NOT MSYS)
       set(CAT "type")
       # Convert ${export_file} to native format (backslashes) for "type"
       # Does not use file(TO_NATIVE_PATH) as it doesn't create a native


Improve format of warning message.

Improve format of warning message.

svn path=/trunk/; revision=6764

--- cmake/modules/fortran.cmake
+++ cmake/modules/fortran.cmake
@@ -32,7 +32,8 @@

 # Don't compile Fortran 95 binding if compiler doesn't support it
 IF (ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)
-  MESSAGE("Fortran compiler does not support f90/95. Disabling f95 bindings")
+  MESSAGE(STATUS "WARNING: "
+  "fortran compiler does not support f90/95. Disabling f95 bindings")
   SET(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE)
 ENDIF (ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)


Properly add the Boost_INCLUDE_DIR to the test project(s).


Update CPack package dependencies

Update CPack package dependencies

--- cmake/CPackConfig.cmake
+++ cmake/CPackConfig.cmake
@@ -165,18 +165,9 @@
 	list(APPEND CPACK_COMPONENT_RUNTIME_DEPENDS system)
 endif()

-if(Boost_INCLUDE_DIR)
+if(Boost_INCLUDE_DIRS)
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libboost-dev (>= 1.46)")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "boost-devel >= 1.46")
-endif()
-if(Boost_REGEX_LIBRARY_RELEASE)
-	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libboost-regex-dev (>= 1.46)")
-endif()
-if(Boost_SYSTEM_LIBRARY_RELEASE)
-	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libboost-system-dev (>= 1.46)")
-endif()
-if(Boost_THREAD_LIBRARY_RELEASE)
-	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libboost-thread-dev (>= 1.46)")
 endif()
 if(BULLET_INCLUDE_DIRS AND BULLET_BULLETCOLLISION_LIBRARY_RELEASE AND BULLET_BULLETDYNAMICS_LIBRARY_RELEASE AND BULLET_BULLETSOFTBODY_LIBRARY_RELEASE AND BULLET_LINEARMATH_LIBRARY_RELEASE)
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libbullet-dev")
@@ -202,11 +193,8 @@
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libfcl-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "fcl-devel")
 endif()
-if(libdc1394_V1_INCLUDE_DIRS AND libdc1394_V1_LIBRARY_RELEASE)
-	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libdc1394-13-dev")
-endif()
-if(libdc1394_V2_INCLUDE_DIRS AND libdc1394_V2_LIBRARY_RELEASE)
-	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libdc1394-22-dev")
+if(libdc1394_INCLUDE_DIRS AND libdc1394_LIBRARY_RELEASE)
+	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libdc1394-dev | libdc1394-22-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "libdc1394-devel")
 endif()
 if(LIBLZMA_INCLUDE_DIRS AND LIBLZMA_LIBRARY_RELEASE)
@@ -221,19 +209,15 @@
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libxslt1-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "libxslt-devel")
 endif()
-if(NLopt_INCLUDE_DIRS AND NLopt_LIBRARY_RELEASE)
+if(NLOPT_INCLUDE_DIRS AND NLOPT_LIBRARY_RELEASE)
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libnlopt-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "NLopt-devel")
 endif()
 if(ODE_INCLUDE_DIRS AND ODE_LIBRARY_RELEASE)
-	if(ODE_USE_DOUBLE_PRECISION)
-		list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libode-dev")
-	else()
-		list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libode-sp-dev")
-	endif()
+	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libode-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "ode-devel")
 endif()
-if(zlib_INCLUDE_DIRS AND zlib_LIBRARY_RELEASE)
+if(ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARY_RELEASE)
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "zlib1g-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "zlib-devel")
 endif()


Support for Speechd 0.8 in CMake

Support for Speechd 0.8 in CMake

--- cmake/FindSpeechd.cmake
+++ cmake/FindSpeechd.cmake
@@ -9,7 +9,7 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-find_path(SPEECHD_INCLUDE_DIR libspeechd.h)
+find_path(SPEECHD_INCLUDE_DIR libspeechd.h PATH_SUFFIXES speech-dispatcher)

 find_library(SPEECHD_LIBRARIES NAMES speechd)


better name for the test

better name for the test

--- cmake/custom/test.cmake
+++ cmake/custom/test.cmake
@@ -2,4 +2,4 @@
 enable_testing()

 # this target is compiled before, see src/CMakeFiles.txt
-add_test(t ${PROJECT_BINARY_DIR}/bin/example)
+add_test(test_lapack_blas ${PROJECT_BINARY_DIR}/bin/example)


libs weren't linked against boost ?

libs weren't linked against boost ?

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -77,6 +77,8 @@
         set(_lib_type "STATIC")
     endif(PCL_SHARED_LIBS)
     add_library(${_name} ${_lib_type} ${ARGN})
+    #must link explicitly against boost.
+    target_link_libraries(${_name} ${Boost_LIBRARIES})
     set_target_properties(${_name} PROPERTIES
         VERSION ${PCL_VERSION}
         SOVERSION ${PCL_MAJOR_VERSION})


Fix: cmake-2.8.4 doesn't like add_test without explicit arguments names

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -90,7 +90,7 @@
     set_target_properties(${_name} PROPERTIES
         VERSION ${PCL_VERSION}
         SOVERSION ${PCL_MAJOR_VERSION}
-				DEFINE_SYMBOL "PCLAPI_EXPORTS")
+        DEFINE_SYMBOL "PCLAPI_EXPORTS")
     install(TARGETS ${_name} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
         COMPONENT ${_component})
@@ -146,7 +146,12 @@
     #
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     PCL_LINK_OPENMP(${_exename})
-  	add_test(${_name} ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
+
+    if(${CMAKE_VERSION} VERSION_LESS 2.8.4)
+      add_test(${_name} ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
+    else(${CMAKE_VERSION} VERSION_LESS 2.8.4)
+      add_test(NAME ${_name} COMMAND ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
+    endif(${CMAKE_VERSION} VERSION_LESS 2.8.4)
 endmacro(PCL_ADD_TEST)


ENH : OTB can compile successufully with boost 1.40 since a patched boost file causing the conflict was added to Monteverdi

--- CMake/ImportBoost.cmake
+++ CMake/ImportBoost.cmake
@@ -9,10 +9,6 @@
   FIND_PACKAGE(Boost)
   IF(Boost_FOUND)
     MESSAGE(STATUS "  Found Boost version ${Boost_VERSION}")
-    IF( ${Boost_MINOR_VERSION} EQUAL 40)
-      MESSAGE(WARNING "Boost 1.40 not supported. Disabling OTB_USE_EXTERNAL_BOOST")
-      SET(OTB_USE_EXTERNAL_BOOST  OFF)
-    ENDIF(${Boost_MINOR_VERSION} EQUAL 40)
     IF( ${Boost_MINOR_VERSION} LESS 35)
       MESSAGE(WARNING "Boost >= 1.35 is required. Disabling OTB_USE_EXTERNAL_BOOST")
       SET(OTB_USE_EXTERNAL_BOOST  OFF)


Refactored semi-colon hack

Refactored semi-colon hack

Before there was a hack that used many backslashes to allow a semi-colon
in a function parameter to get propogated down through multiple function
calls.  I've re-written it in a better fashion, using the <SEMICOLON>
generator expression.

Change-Id: Ic524b0a680010c29198f716feca0e3026555cacd

--- CMake/sitkAddTest.cmake
+++ CMake/sitkAddTest.cmake
@@ -164,15 +164,7 @@

   if(WIN32)
     set( _JAVA_LIBRARY_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$<CONFIGURATION>" )
-    # Note: on windows this is a semi-colon separated list
-    # Note 2: there are 7 or 11 backslashes (depending on the cmake version)
-    #         before the semi-colon so that it gets properly passed through
-    #         4 levels of function calls.
-    if (${CMAKE_VERSION} VERSION_LESS "3.5")
-      set( _JAVA_CLASSPATH "${SimpleITK_BINARY_DIR}/Wrapping/Java/${JAR_FILE}\\\\\\\\\\\;${CMAKE_CURRENT_BINARY_DIR}" )
-    else()
-      set( _JAVA_CLASSPATH "${SimpleITK_BINARY_DIR}/Wrapping/Java/${JAR_FILE}\\\\\\\;${CMAKE_CURRENT_BINARY_DIR}" )
-    endif()
+    set( _JAVA_CLASSPATH "${SimpleITK_BINARY_DIR}/Wrapping/Java/${JAR_FILE}$<SEMICOLON>${CMAKE_CURRENT_BINARY_DIR}" )

   else(WIN32)
     set( _JAVA_LIBRARY_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" )


flexisip.spec: do not install SysV scripts anymore

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -128,21 +128,9 @@
 # Shouldn't be the role of cmake to install all the following stuff ?
 # It is surprising to let the specfile install all these things from the source tree.
 #
-mkdir -p  $RPM_BUILD_ROOT/etc/init.d
 mkdir -p  $RPM_BUILD_ROOT/etc/flexisip
 mkdir -p  $RPM_BUILD_ROOT/%{_docdir}
 mkdir -p  $RPM_BUILD_ROOT/%{_localstatedir}/log/flexisip
-%if "0%{?dist}" == "0.deb"
-  install -p -m 0744 scripts/debian/flexisip $RPM_BUILD_ROOT%{_sysconfdir}/init.d/flexisip
-  %if @ENABLE_PRESENCE@
-    install -p -m 0744 scripts/debian/flexisip-presence $RPM_BUILD_ROOT%{_sysconfdir}/init.d/flexisip-presence
-  %endif
-%else
-  install -p -m 0744 scripts/redhat/flexisip $RPM_BUILD_ROOT%{_sysconfdir}/init.d/flexisip
-  %if @ENABLE_PRESENCE@
-    install -p -m 0744 scripts/redhat/flexisip-presence $RPM_BUILD_ROOT%{_sysconfdir}/init.d/flexisip-presence
-  %endif
-%endif

 mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
 install -p -m 0644 scripts/flexisip.service $RPM_BUILD_ROOT/lib/systemd/system
@@ -188,7 +176,6 @@
 %{_includedir}/flexisip/*.hh

 %if @ENABLE_PRESENCE@
-%{_sysconfdir}/init.d/flexisip-presence
 /lib/systemd/system/flexisip-presence.service
 /lib/systemd/system/flexisip-presence@.service
 %endif
@@ -198,7 +185,6 @@
 	/lib/systemd/system/flexisip-conference@.service
 %endif

-%{_sysconfdir}/init.d/flexisip
 %{_sysconfdir}/flexisip
 %{_sysconfdir}/logrotate.d/flexisip-logrotate
 /lib/systemd/system/flexisip.service


Delete cmake_install.cmake

Delete cmake_install.cmake

--- examples/myCodes/test/test_boundary_integration/cmake_install.cmake
+++ examples/myCodes/test/test_boundary_integration/cmake_install.cmake
@@ -1,39 +0,0 @@
-# Install script for directory: /Users/lisa/Desktop/dealii/examples/myCodes/test/test_boundary_integration
-
-# Set the install prefix
-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  set(CMAKE_INSTALL_PREFIX "/usr/local")
-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 "Debug")
-  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()
-
-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/lisa/Desktop/dealii/examples/myCodes/test/test_boundary_integration/${CMAKE_INSTALL_MANIFEST}"
-     "${CMAKE_INSTALL_MANIFEST_CONTENT}")


GCC&co: turned off explicit loop-unrolling in the for-speed optimization flags.

--- toolchains/gcc_compatibles.cmake
+++ toolchains/gcc_compatibles.cmake
@@ -19,7 +19,7 @@
 set( TNUN_compiler_rtti_off           -fno-rtti                             )
 set( TNUN_compiler_exceptions_on      -fexceptions                          )
 set( TNUN_compiler_exceptions_off     -fno-exceptions                       )
-set( TNUN_compiler_optimize_for_speed -O3 -funroll-loops                    )
+set( TNUN_compiler_optimize_for_speed -O3                                   )
 set( TNUN_compiler_optimize_for_size  -Os                                   )

 set( TNUN_compiler_release_flags -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants -fno-stack-protector )


Adding check for DAGMC_ROOT in environment as a hint.

--- cmake/Modules/FindDAGMC.cmake
+++ cmake/Modules/FindDAGMC.cmake
@@ -8,7 +8,7 @@
 #  DAGMC_DEFINITIONS - Compiler switches required for using DAGMC

 find_path(DAGMC_CMAKE_CONFIG NAMES DAGMCConfig.cmake
-          HINTS ${DAGMC_ROOT}
+          HINTS ${DAGMC_ROOT} $ENV{DAGMC_ROOT}
           PATHS ENV LD_LIBRARY_PATH
           PATH_SUFFIXES lib Lib cmake lib/cmake
           NO_DEFAULT_PATH)


Mirror C++ standard properties in .pch target

--- cmake/PrecompileHeaders.cmake
+++ cmake/PrecompileHeaders.cmake
@@ -126,10 +126,15 @@
             INCLUDE_DIRECTORIES
             LINK_LIBRARIES
             POSITION_INDEPENDENT_CODE
-            SYSTEM_INCLUDE_DIRECTORIES)
+            SYSTEM_INCLUDE_DIRECTORIES
+            CXX_STANDARD
+            CXX_STANDARD_REQUIRED
+            CXX_EXTENSIONS)
         foreach(property IN ITEMS ${properties})
             get_target_property(var ${_target} ${property})
-            if(var)
+            if(NOT (var STREQUAL var-NOTFOUND OR var STREQUAL ""))
+                # Simply checking for if(var) is not sufficient
+                # since some properties can have value of OFF
                 set_target_properties(${_target}.pch PROPERTIES ${property} "${var}")
             endif()
         endforeach()


Removed line which led to configuration problems on Windows.

svn path=/trunk/; revision=8215

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -28,7 +28,6 @@

 # Find wxWidgets needed for driver and bindings
 if(PLD_wxwidgets)
-  SET(wxWidgets_USE_LIBS core base)
   find_package(wxWidgets QUIET)
   if(NOT wxWidgets_FOUND)
     message(STATUS


fixed GA release number

fixed GA release number

--- cmake/packages/packages.cmake
+++ cmake/packages/packages.cmake
@@ -65,7 +65,11 @@
 elseif ("${PACKAGING}" STREQUAL "Bundle")
   set(CPACK_PACKAGE_VERSION "${ARANGODB_DARWIN_UPSTREAM}")

-  set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_DARWIN_REVISION}.x86_64")
+  if ("${ARANGODB_DARWIN_REVISION}" STREQUAL "")
+    set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.x86_64")
+  else()
+    set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_DARWIN_REVISION}.x86_64")
+  endif()
   include(packages/bundle)
   include(packages/tar)
 elseif (MSVC)


Update to 2.8.12 version of ExternalProject.cmake with tar.xz patch
applied.

svn path=/trunk/; revision=12588

--- cmake/build_projects/ExternalProject.cmake
+++ cmake/build_projects/ExternalProject.cmake
@@ -38,6 +38,7 @@
 #    [CONFIGURE_COMMAND cmd...]  # Build tree configuration command
 #    [CMAKE_COMMAND /.../cmake]  # Specify alternative cmake executable
 #    [CMAKE_GENERATOR gen]       # Specify generator for native build
+#    [CMAKE_GENERATOR_TOOLSET t] # Generator-specific toolset name
 #    [CMAKE_ARGS args...]        # Arguments to CMake command line
 #    [CMAKE_CACHE_ARGS args...]  # Initial cache arguments, of the form -Dvar:string=on
 #   #--Build step-----------------
@@ -113,6 +114,15 @@
 # and <TMP_DIR>
 # with corresponding property values.
 #
+# Any builtin step that specifies a "<step>_COMMAND cmd..." or custom
+# step that specifies a "COMMAND cmd..." may specify additional command
+# lines using the form "COMMAND cmd...".  At build time the commands will
+# be executed in order and aborted if any one fails.  For example:
+#  ... BUILD_COMMAND make COMMAND echo done ...
+# specifies to run "make" and then "echo done" during the build step.
+# Whether the current working directory is preserved between commands
+# is not defined.  Behavior of shell operators like "&&" is not defined.
+#
 # The 'ExternalProject_Get_Property' function retrieves external project
 # target properties:
 #  ExternalProject_Get_Property(<name> [prop1 [prop2 [...]]])
@@ -286,11 +296,21 @@
   message(FATAL_ERROR \"Failed to remove directory: '${source_dir}'\")
 endif()

-execute_process(
-  COMMAND \"${git_EXECUTABLE}\" clone \"${git_repository}\" \"${src_name}\"
-  WORKING_DIRECTORY \"${work_dir}\"
-  RESULT_VARIABLE error_code
-  )
+# try the clone 3 times incase there is an odd git clone issue
+set(error_code 1)
+set(number_of_tries 0)
+while(error_code AND number_of_tries LESS 3)
+  execute_process(
+    COMMAND \"${git_EXECUTABLE}\" clone \"${git_repository}\" \"${src_name}\"
+    WORKING_DIRECTORY \"${work_dir}\"
+    RESULT_VARIABLE error_code
+    )
+  math(EXPR number_of_tries \"\${number_of_tries} + 1\")
+endwhile()
+if(number_of_tries GREATER 1)
+  message(STATUS \"Had to git clone more than once:
+          \${number_of_tries} times.\")
+endif()
 if(error_code)
   message(FATAL_ERROR \"Failed to clone repository: '${git_repository}'\")
 endif()
@@ -401,6 +421,79 @@

 endfunction()

+
+function(_ep_write_gitupdate_script script_filename git_EXECUTABLE git_tag git_repository work_dir)
+  file(WRITE ${script_filename}
+"if(\"${git_tag}\" STREQUAL \"\")
+  message(FATAL_ERROR \"Tag for git checkout should not be empty.\")
+endif()
+
+execute_process(
+  COMMAND \"${git_EXECUTABLE}\" rev-list --max-count=1 HEAD
+  WORKING_DIRECTORY \"${work_dir}\"
+  RESULT_VARIABLE error_code
+  OUTPUT_VARIABLE head_sha
+  )
+if(error_code)
+  message(FATAL_ERROR \"Failed to get the hash for HEAD\")
+endif()
+
+execute_process(
+  COMMAND \"${git_EXECUTABLE}\" show-ref ${git_tag}
+  WORKING_DIRECTORY \"${work_dir}\"
+  OUTPUT_VARIABLE show_ref_output
+  )
+# If a remote ref is asked for, which can possibly move around,
+# we must always do a fetch and checkout.
+if(\"\${show_ref_output}\" MATCHES \"remotes\")
+  set(is_remote_ref 1)
+else()
+  set(is_remote_ref 0)
+endif()
+
+# This will fail if the tag does not exist (it probably has not been fetched
+# yet).
+execute_process(
+  COMMAND \"${git_EXECUTABLE}\" rev-list --max-count=1 ${git_tag}
+  WORKING_DIRECTORY \"${work_dir}\"
+  RESULT_VARIABLE error_code
+  OUTPUT_VARIABLE tag_sha
+  )
+
+# Is the hash checkout out that we want?
+if(error_code OR is_remote_ref OR NOT (\"\${tag_sha}\" STREQUAL \"\${head_sha}\"))
+  execute_process(
+    COMMAND \"${git_EXECUTABLE}\" fetch
+    WORKING_DIRECTORY \"${work_dir}\"
+    RESULT_VARIABLE error_code
+    )
+  if(error_code)
+    message(FATAL_ERROR \"Failed to fetch repository '${git_repository}'\")
+  endif()
+
+  execute_process(
+    COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
+    WORKING_DIRECTORY \"${work_dir}\"
+    RESULT_VARIABLE error_code
+    )
+  if(error_code)
+    message(FATAL_ERROR \"Failed to checkout tag: '${git_tag}'\")
+  endif()
+
+  execute_process(
+    COMMAND \"${git_EXECUTABLE}\" submodule update --recursive
+    WORKING_DIRECTORY \"${work_dir}/${src_name}\"
+    RESULT_VARIABLE error_code
+    )
+  if(error_code)
+    message(FATAL_ERROR \"Failed to update submodules in: '${work_dir}/${src_name}'\")
+  endif()
+endif()
+
+"
+)
+
+endfunction(_ep_write_gitupdate_script)

 function(_ep_write_downloadfile_script script_filename remote local timeout hash tls_verify tls_cainfo)
   if(timeout)
@@ -886,7 +979,7 @@
         set(sep ";")
       endif()
     endforeach()
-    set(code "set(ENV{VS_UNICODE_OUTPUT} \"\")\n${code}set(command \"${cmd}\")${code_execute_process}")
+    set(code "${code}set(command \"${cmd}\")${code_execute_process}")
     file(WRITE ${stamp_dir}/${name}-${step}-impl.cmake "${code}")
     set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake)
   endif()
@@ -896,7 +989,6 @@
   set(logbase ${stamp_dir}/${name}-${step})
   file(WRITE ${script} "
 ${code_cygpath_make}
-set(ENV{VS_UNICODE_OUTPUT} \"\")
 set(command \"${command}\")
 execute_process(
   COMMAND \${command}
@@ -1176,10 +1268,10 @@
     get_filename_component(work_dir "${source_dir}" PATH)
     set(comment "Performing download step (SVN checkout) for '${name}'")
     set(svn_user_pw_args "")
-    if(svn_username)
+    if(DEFINED svn_username)
       set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
     endif()
-    if(svn_password)
+    if(DEFINED svn_password)
       set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
     endif()
     if(svn_trust_cert)
@@ -1363,7 +1455,7 @@

 function(_ep_add_update_command name)
-  ExternalProject_Get_Property(${name} source_dir)
+  ExternalProject_Get_Property(${name} source_dir tmp_dir)

   get_property(cmd_set TARGET ${name} PROPERTY _EP_UPDATE_COMMAND SET)
   get_property(cmd TARGET ${name} PROPERTY _EP_UPDATE_COMMAND)
@@ -1398,10 +1490,10 @@
     get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
     get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
     set(svn_user_pw_args "")
-    if(svn_username)
+    if(DEFINED svn_username)
       set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
     endif()
-    if(svn_password)
+    if(DEFINED svn_password)
       set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
     endif()
     if(svn_trust_cert)
@@ -1415,15 +1507,15 @@
       message(FATAL_ERROR "error: could not find git for fetch of ${name}")
     endif()
     set(work_dir ${source_dir})
-    set(comment "Performing update step (git fetch) for '${name}'")
+    set(comment "Performing update step for '${name}'")
     get_property(git_tag TARGET ${name} PROPERTY _EP_GIT_TAG)
     if(NOT git_tag)
       set(git_tag "master")
     endif()
-    set(cmd ${GIT_EXECUTABLE} fetch
-      COMMAND ${GIT_EXECUTABLE} checkout ${git_tag}
-      COMMAND ${GIT_EXECUTABLE} submodule update --recursive
+    _ep_write_gitupdate_script(${tmp_dir}/${name}-gitupdate.cmake
+      ${GIT_EXECUTABLE} ${git_tag} ${git_repository} ${work_dir}
       )
+    set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitupdate.cmake)
     set(always 1)
   elseif(hg_repository)
     if(NOT HG_EXECUTABLE)
@@ -1494,8 +1586,11 @@
   set(file_deps)
   get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
   foreach(dep IN LISTS deps)
-    _ep_get_step_stampfile(${dep} "done" done_stamp_file)
-    list(APPEND file_deps ${done_stamp_file})
+    get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT)
+    if(is_ep)
+      _ep_get_step_stampfile(${dep} "done" done_stamp_file)
+      list(APPEND file_deps ${done_stamp_file})
+    endif()
   endforeach()

   get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)
@@ -1521,16 +1616,27 @@
     endif()

     get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
+    get_target_property(cmake_generator_toolset ${name} _EP_CMAKE_GENERATOR_TOOLSET)
     if(cmake_generator)
-      list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
+      list(APPEND cmd "-G${cmake_generator}")
+      if(cmake_generator_toolset)
+        list(APPEND cmd "-T${cmake_generator_toolset}")
+      endif()
     else()
       if(CMAKE_EXTRA_GENERATOR)
-        list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
-          "${source_dir}")
+        list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
       else()
-        list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
+        list(APPEND cmd "-G${CMAKE_GENERATOR}")
       endif()
-    endif()
+      if(cmake_generator_toolset)
+        message(FATAL_ERROR "Option CMAKE_GENERATOR_TOOLSET not allowed without CMAKE_GENERATOR.")
+      endif()
+      if(CMAKE_GENERATOR_TOOLSET)
+        list(APPEND cmd "-T${CMAKE_GENERATOR_TOOLSET}")
+      endif()
+    endif()
+
+    list(APPEND cmd "${source_dir}")
   endif()

   # If anything about the configure command changes, (command itself, cmake


Check for population before finding package

Prevents exporting the library if downstream populates before using `find_package`.

--- cmake/modules/jegp_find_dependencies.cmake
+++ cmake/modules/jegp_find_dependencies.cmake
@@ -4,10 +4,10 @@
     GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
     GIT_SHALLOW True)

-find_package(range-v3 0.3.6 QUIET)
-if(NOT range-v3_FOUND)
-    FetchContent_GetProperties(range-v3)
-    if(NOT range-v3_POPULATED)
+FetchContent_GetProperties(range-v3)
+if(NOT range-v3_POPULATED)
+    find_package(range-v3 0.3.6 QUIET)
+    if(NOT range-v3_FOUND)
         FetchContent_Populate(range-v3)
         add_subdirectory(${range-v3_SOURCE_DIR} ${range-v3_BINARY_DIR})
     endif()


change cmake download URL for catch test dependency

--- cmake/catch.cmake
+++ cmake/catch.cmake
@@ -1,4 +1,6 @@
+set(CATCH_VERSION 1.7.1)
+
 file(DOWNLOAD
-        https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp
+        https://github.com/philsquared/Catch/releases/download/v${CATCH_VERSION}/catch.hpp
         ${CMAKE_HOME_DIRECTORY}/test/include/catch.h
         )


fix: GFLAGS_* variables take precedence in gflags_define

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -65,16 +65,18 @@
     message (FATAL_ERROR "gflags_variable: Too many macro arguments")
   endif ()
   if (NOT DEFINED GFLAGS_${varname})
-    if (GFLAGS_IS_SUBPROJECT AND "${ARGC}" EQUAL 5)
-      set (GFLAGS_${varname} "${ARGV4}")
-    else ()
-      set (GFLAGS_${varname} "${default}")
+    if (DEFINED ${varname})
+      set(GFLAGS_${varname} "${${varname}}")
+    else ()
+      if (GFLAGS_IS_SUBPROJECT AND "${ARGC}" EQUAL 5)
+        set (GFLAGS_${varname} "${ARGV4}")
+      else ()
+        set (GFLAGS_${varname} "${default}")
+      endif ()
     endif ()
   endif ()
   if (GFLAGS_IS_SUBPROJECT)
-    if (NOT DEFINED ${varname})
-      set (${varname} "${GFLAGS_${varname}}")
-    endif ()
+    set (${varname} "${GFLAGS_${varname}}")
   else ()
     set (${varname} "${GFLAGS_${varname}}" CACHE ${type} "${docstring}")
   endif ()


refs #5833 skip helgrind test on darwin/others

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -56,6 +56,7 @@
   list(APPEND CTEST_CUSTOM_TESTS_IGNORE
     util/helgrind_test_circular_buffer
     util/helgrind_test_partitioned_counter
+    util/helgrind_test_partitioned_counter_5833
     ydb/helgrind_helgrind1.tdb
     ydb/helgrind_helgrind2.tdb
     ydb/helgrind_helgrind3.tdb


remove cmake debug spam

remove cmake debug spam

--- Findnmealib.cmake
+++ Findnmealib.cmake
@@ -19,8 +19,6 @@
 SET(POTENTIAL_NMEALIB_LIBS libnmea nmealib nmea)
 FIND_LIBRARY(NMEALIB_LIBRARIES NAMES ${POTENTIAL_NMEALIB_LIBS})

-message(status ${NMEALIB_INCLUDE_DIR} ${NMEALIB_LIBRARIES})
-
 IF (NMEALIB_INCLUDE_DIR AND NMEALIB_LIBRARIES)
    SET(CMAKE_REQUIRED_INCLUDES "${NMEALIB_INCLUDE_DIR}" "${CMAKE_REQUIRED_INCLUDES}")
    set (NMEALIB_FOUND true)


Fixes the blacklist filter in the event we aren't using SDL to avoid including an unwanted file dialog codefile.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -196,14 +196,15 @@
 addPath("${srcDir}/math/util")
 addPath("${srcDir}/math/test")

+addPath("${srcDir}/platform")
 if(NOT TORQUE_SDL)
    set(BLACKLIST "fileDialog.cpp" )
 endif()
-addPath("${srcDir}/platform")
+addPath("${srcDir}/platform/nativeDialogs")
 set(BLACKLIST "" )

 addPath("${srcDir}/cinterface")
-addPath("${srcDir}/platform/nativeDialogs")
+
 if( NOT TORQUE_DEDICATED )
     addPath("${srcDir}/platform/menus")
 endif()


update package_debian

update package_debian

--- cmake/package_debian.cmake
+++ cmake/package_debian.cmake
@@ -11,6 +11,10 @@
     set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
 endif ()

+# add date stamp to CPACK_PACKAGE_VERSION
+string(TIMESTAMP STAMP "%Y%m%d+%H%M%S")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-0+${STAMP}")
+

 ###############################
 # debian package specific stuff
@@ -20,7 +24,7 @@

 if (NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
 # if architecture is already set (e.g. to "all"), this is not needed
-# add -1~distribution-codename (e.g. -1~trusty or -1~xenial) to end of package version
+# add ~distribution-codename (e.g. ~trusty or ~xenial) to end of package version
 # if lsb_release is available, take it from there or fall back to DISTRO_CODENAME env variable
     set(DISTRO_CODENAME $ENV{DISTRO_CODENAME})
     find_program(LSB_RELEASE_CMD lsb_release)
@@ -31,7 +35,7 @@
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
     endif ()
     if (DISTRO_CODENAME)
-        set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}-1~${DISTRO_CODENAME})
+        set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}~${DISTRO_CODENAME})
     else ()
         message(STATUS "Could not find lsb_release nor is DISTRO_CODENAME set.")
     endif ()
@@ -47,6 +51,7 @@
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
     endif ()
 endif ()
+message(STATUS "CPACK_PACKAGE_VERSION: " ${CPACK_PACKAGE_VERSION})

 # package name is lower case of project name with _ replaced by -
 string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
@@ -83,6 +88,7 @@
 endif()

 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
+message(STATUS "CPACK_PACKAGE_FILE_NAME: " ${CPACK_PACKAGE_FILE_NAME})

 #########################################
 ## things you might need to change ??? ##


Forgot the parenthesis.

Forgot the parenthesis.

--- cmake/CMakeModules/OssimCommonVariables.cmake
+++ cmake/CMakeModules/OssimCommonVariables.cmake
@@ -38,7 +38,7 @@
       IF(MSVC)
          message("MSVC_VERSION: ${MSVC_VERSION}")

-         if( MSVC_VERSION GREATER 1600) OR (MSVC_VERSION EQUAL 1600))
+         if( (MSVC_VERSION GREATER 1600) OR (MSVC_VERSION EQUAL 1600))
             if (DEBUG_BUILD)
                SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBCMTD /NODEFAULTLIB:MSVCRT /FORCE:MULTIPLE /MANIFEST:NO")
                SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMTD /FORCE:MULTIPLE /MANIFEST:NO")


cmake does not like GMP var set to NOTFOUND

--- cmake/FindGMP.cmake
+++ cmake/FindGMP.cmake
@@ -1,16 +1,16 @@
 # GMP_USE_STATIC_LIBS   - Set to ON to force the use of static libraries.

 ## To switch between static and dynamic without resetting the cache
-if ("${GMP_USE_STATIC_LIBS}" STREQUAL "${GMP_USE_STATIC_LIBS_LAST}")
-  set(GMP_USE_STATIC_LIBS_CHANGED OFF)
-else ()
-  set(GMP_USE_STATIC_LIBS_CHANGED ON)
-endif()
-set(GMP_USE_STATIC_LIBS_LAST "${GMP_USE_STATIC_LIBS}")
-if (GMP_USE_STATIC_LIBS_CHANGED)
-  set(GMP_LIB "GMP_LIB-NOTFOUND")
-  set(GMPXX_LIB "GMPXX_LIB-NOTFOUND")
-endif()
+# if ("${GMP_USE_STATIC_LIBS}" STREQUAL "${GMP_USE_STATIC_LIBS_LAST}")
+#   set(GMP_USE_STATIC_LIBS_CHANGED OFF)
+# else ()
+#   set(GMP_USE_STATIC_LIBS_CHANGED ON)
+# endif()
+# set(GMP_USE_STATIC_LIBS_LAST "${GMP_USE_STATIC_LIBS}")
+# if (GMP_USE_STATIC_LIBS_CHANGED)
+#   set(GMP_LIB "GMP_LIB-NOTFOUND")
+#   set(GMPXX_LIB "GMPXX_LIB-NOTFOUND")
+# endif()

 if (NOT GMP_FOUND)
   # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES


Use mayor version only default path of Win installer

Changes in minor/patch version will upgrade OSPRay, thus the version in
the path won't match the installed version after update anymore.

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -125,7 +125,7 @@
     SET(CPACK_WIX_PROPERTY_ARPURLINFOABOUT http://www.ospray.org/)
     SET(CPACK_PACKAGE_NAME "OSPRay v${OSPRAY_VERSION}")
     SET(CPACK_COMPONENTS_ALL lib devel apps mpi redist)
-    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\OSPRay v${OSPRAY_VERSION}")
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\OSPRay v${OSPRAY_VERSION_MAJOR}")
     MATH(EXPR OSPRAY_VERSION_NUMBER "10000*${OSPRAY_VERSION_MAJOR} + 100*${OSPRAY_VERSION_MINOR} + ${OSPRAY_VERSION_PATCH}")
     SET(CPACK_WIX_PRODUCT_GUID "9D64D525-2603-4E8C-9108-845A146${OSPRAY_VERSION_NUMBER}")
     SET(CPACK_WIX_UPGRADE_GUID "9D64D525-2603-4E8C-9108-845A146${OSPRAY_VERSION_MAJOR}0000") # upgrade as long as major version is the same


build: Fetch TBB from Github

build: Fetch TBB from Github

The download server for Intel TBB only allows downloading via HTTPS, which
causes problems with CMake 2.8 on Ubuntu 12.

Fetch TBB from a Github mirror instead.

--- contrib/tbb.cmake
+++ contrib/tbb.cmake
@@ -6,8 +6,8 @@

 ExternalProject_Add(tbb
     PREFIX ${tbb_PREFIX}
-    URL "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb43_20140724oss_src.tgz"
-    URL_MD5 0791e5fc7d11b27360080ea4521e32bb
+    GIT_REPOSITORY "https://github.com/nsubtil/tbb.git"
+    GIT_TAG "4.3-20140724"
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ${MAKE}


+ When finding packages, provide the option of declaring INCLUDE_DIRS as being of type SYSTEM.

--- src/rezplugins/build_system/cmake_files/RezFindPackages.cmake
+++ src/rezplugins/build_system/cmake_files/RezFindPackages.cmake
@@ -16,6 +16,9 @@
 # and definitions (extra cflags) are automatically set via cmake native functions
 # include_directories(), link_directories(), add_definitions().
 #
+# INCLUDE_DIRS_NO_SYSTEM can be set to disable the declaration of INCLUDE_DIRS
+# as SYSTEM.
+#
 # ------------------------------
 # Finding a Package
 # ------------------------------
@@ -59,6 +62,7 @@
 #
 # Each packages' output variables are combined into the following variables:
 # <PREFIX>_INCLUDE_DIRS
+# <PREFIX>_SYSTEM_INCLUDE_DIRS
 # <PREFIX>_LIBRARY_DIRS
 # <PREFIX>_LIBRARIES
 # <PREFIX>_DEFINITIONS
@@ -89,7 +93,7 @@
 	# parse args
 	#--------------------------------------------------------------------

-	parse_arguments(DFP "PREFIX" "REQUIRED;AUTO" ${ARGN})
+	parse_arguments(DFP "PREFIX" "REQUIRED;AUTO;INCLUDE_DIRS_NO_SYSTEM" ${ARGN})

 	list(GET DFP_PREFIX 0 DFP_PREFIX)
 	if(NOT DFP_PREFIX)
@@ -102,6 +106,7 @@
 	endif(NOT DFP_DEFAULT_ARGS)

 	set(${DFP_PREFIX}_INCLUDE_DIRS)
+    set(${DFP_PREFIX}_SYSTEM_INCLUDE_DIRS)
 	set(${DFP_PREFIX}_LIBRARY_DIRS)
 	set(${DFP_PREFIX}_LIBRARIES)
 	set(${DFP_PREFIX}_DEFINITIONS)
@@ -125,8 +130,13 @@
 		message("rez_find_packages: included ${pkg}.cmake")

 		if(${pkg}_INCLUDE_DIRS)
-			message("    include dirs: ${${pkg}_INCLUDE_DIRS}")
-			list(APPEND ${DFP_PREFIX}_INCLUDE_DIRS 	${${pkg}_INCLUDE_DIRS})
+            if(${pkg}_USE_SYSTEM_INCLUDE_DIRS AND NOT DFP_INCLUDE_DIRS_NO_SYSTEM)
+                list(APPEND ${DFP_PREFIX}_SYSTEM_INCLUDE_DIRS   ${${pkg}_INCLUDE_DIRS})
+                message("    include dirs: ${${pkg}_INCLUDE_DIRS} (SYSTEM)")
+            else(${pkg}_USE_SYSTEM_INCLUDE_DIRS)
+                list(APPEND ${DFP_PREFIX}_INCLUDE_DIRS  ${${pkg}_INCLUDE_DIRS})
+                message("    include dirs: ${${pkg}_INCLUDE_DIRS}")
+            endif(${pkg}_USE_SYSTEM_INCLUDE_DIRS)
 		endif(${pkg}_INCLUDE_DIRS)
 		if(${pkg}_LIBRARY_DIRS)
 			message("    library dirs: ${${pkg}_LIBRARY_DIRS}")
@@ -227,6 +237,7 @@
 	if(DFP_AUTO)

 		include_directories(${${DFP_PREFIX}_INCLUDE_DIRS})
+		include_directories(SYSTEM ${${DFP_PREFIX}_SYSTEM_INCLUDE_DIRS})
 		link_directories(${${DFP_PREFIX}_LIBRARY_DIRS})

 		# add cflags, escaping quotes along the way. add_definitions() will do this for you, however


Adapt the ParaView build for new CMake

Adapt the ParaView build for new CMake

Many of the CMake variables we were using have been changed, or removed
in some cases. This is my first pass at adapting to the flags present in
ParaView/VTK master.

Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>

--- projects/paraview.cmake
+++ projects/paraview.cmake
@@ -16,67 +16,52 @@
     -DQT_XMLPATTERNS_EXECUTABLE:FILEPATH=${QT_XMLPATTERNS_EXECUTABLE})
 endif()

-set(_python_version 2)
-
-if(APPLE OR WIN32)
-  set(_python_version 3)
-endif()
-
 add_external_project(paraview
   DEPENDS qt python ffmpeg
   DEPENDS_OPTIONAL tbb png

   CMAKE_ARGS
-    -DBUILD_SHARED_LIBS:BOOL=ON
-    -DBUILD_TESTING:BOOL=OFF
-    -DVTK_RENDERING_BACKEND:STRING=OpenGL2
-    -DVTK_INSTALL_LIBRARY_DIR:STRING=lib/paraview
-    -DVTK_INSTALL_ARCHIVE_DIR:STRING=lib/paraview
-    -DVTK_INSTALL_DATA_DIR:STRING=share/paraview
-    -DVTK_INSTALL_DOC_DIR:STRING=share/doc/paraview
-    -DVTK_CUSTOM_LIBRARY_SUFFIX:STRING=
+    -DPARAVIEW_BUILD_QT_GUI:BOOL=OFF
+    -DPARAVIEW_ENABLE_QT_SUPPORT:BOOL=ON
+    -DPARAVIEW_BUILD_SHARED_LIBS:BOOL=ON
+    -DPARAVIEW_BUILD_TESTING:BOOL=OFF
+    -DPARAVIEW_CUSTOM_LIBRARY_SUFFIX:STRING=
     -DVTK_PYTHON_FULL_THREADSAFE:BOOL=ON
     -DVTK_NO_PYTHON_THREADS:BOOL=OFF
-    -DVTK_PYTHON_VERSION:STRING=${_python_version}
-    -DPARAVIEW_QT_VERSION:STRING=5
-    -DPARAVIEW_BUILD_QT_GUI:BOOL=ON
+    -DVTK_PYTHON_VERSION:STRING=3
     -DPARAVIEW_ENABLE_PYTHON:BOOL=ON
     -DPARAVIEW_ENABLE_CATALYST:BOOL=OFF
+    -DPARAVIEW_ENABLE_COMMANDLINE_TOOLS:BOOL=OFF
     -DPARAVIEW_ENABLE_WEB:BOOL=ON
     -DPARAVIEW_USE_QTHELP:BOOL=OFF
-    -DVTK_ENABLE_KITS:BOOL=ON
-    -DPARAVIEW_BUILD_PLUGIN_AdiosReader:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIIO:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_ArrowGlyph:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_CatalystScriptGeneratorPlugin:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_ForceTime:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_GMVReader:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_LagrangianParticleTracker:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_MantaView:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_MobileRemoteControl:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_NonOrthogonalSource:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_PacMan:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_PointSprite:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_PrismPlugin:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_pvblot:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_PythonQt:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_QuadView:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_SciberQuestToolKit:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_SierraPlotTools:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_StreamLinesRepresentation:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_StreamingParticles:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_SurfaceLIC:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_UncertaintyRendering:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_VRPlugin:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_VaporPlugin:BOOL=FALSE
-    -DPARAVIEW_BUILD_PLUGIN_RGBZView:BOOL=OFF
-    -DPQWIDGETS_DISABLE_QTWEBKIT:BOOL=ON
+    -DPARAVIEW_ENABLE_KITS:BOOL=ON
+    -DPARAVIEW_PLUGIN_ENABLE_AcceleratedAlgorithms:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_AnalyzeNIfTIReaderWriter:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_ArrowGlyph:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_BagPlotViewsAndFilters:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_CDIReader:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_DigitalRockPhysics:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_EmbossingRepresentations:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_ExplicitStructuredGrid:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_EyeDomeLighting:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_GMVReader:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_GeodesicMeasurement:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_GmshReader:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_InSituExodus:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_Moments:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_MooseXfemClip:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_NetCDFTimeAnnotationPlugin:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_NonOrthogonalSource:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_PanoramicProjectionView:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_SLACTools:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_StreamLinesRepresentation:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_StreamingParticles:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_SurfaceLIC:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_ThickenLayeredCells:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_VDFReaderPlugin:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_VTKmFilters:BOOL=FALSE
+    -DPARAVIEW_PLUGIN_ENABLE_pvNVIDIAIndeX:BOOL=FALSE
     -DPARAVIEW_ENABLE_FFMPEG:BOOL=ON
-    -DModule_vtkGUISupportQtWebkit:BOOL=OFF
     -DCMAKE_CXX_STANDARD:STRING=11
     -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=ON
     -DVTK_SMP_IMPLEMENTATION_TYPE:STRING=${VTK_SMP_IMPLEMENTATION_TYPE}


Fix referring to debug version libraries for ccd and assimp on Windows

--- cmake/FindFCL.cmake
+++ cmake/FindFCL.cmake
@@ -15,7 +15,7 @@
 set(FCL_INCLUDE_DIRS ${FCL_INCLUDE_DIR})

 if(MSVC)
-    set(FCL_LIBRARIES optimized fcl ccd debug fcld ccdd)
+    set(FCL_LIBRARIES optimized fcl optimized ccd debug fcld debug ccdd)
 else()
     find_library(FCL_LIBRARY fcl)
     find_library(CCD_LIBRARY ccd)