BUG: Improve module Group membership detection.

Use the EXCLUDE_FROM_DEFAULT option in the module definition to determine if
a module should be enabled by its group membership by default.

This fixes, for example, IODCMTK enablement on Windows.

ITK-3284

Change-Id: Ifc6fac43dcffa6891fa00b8b06a1147225408d8e

--- CMake/ITKGroups.cmake
+++ CMake/ITKGroups.cmake
@@ -120,13 +120,8 @@
   set( _current_module 0 )
   while( ${_current_module} LESS ${_num_modules} )
     list( GET _${group}_module_list ${_current_module} _module_name )
-    # Remote Modules do not start with "ITK", and should not be ON by default.
-    if( "${_module_name}" MATCHES "^ITK" )
-      list( GET _${group}_module_files ${_current_module} _module_file )
-      get_filename_component (module_file_dir ${_module_file} PATH)
-      if (NOT EXISTS "${module_file_dir}/itk-module-init.cmake")
-        list( APPEND _${group}_on_module_list ${_module_name} )
-      endif()
+    if( NOT ITK_MODULE_${_module_name}_EXCLUDE_FROM_DEFAULT )
+      list( APPEND _${group}_on_module_list ${_module_name} )
     endif()
   math( EXPR _current_module "${_current_module} + 1" )
   endwhile()


COMP: Do not warn about unused typedefs.

GCC 4.8 adds a warning about local unused typedefs, but making sure these types
are available is an important part of the ITK ConceptChecking framework.
Disable the check with a compiler flag.

Change-Id: I59040e9d445822d0ba9a0b846fe7f11e58bc76d3

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -110,6 +110,7 @@
     -Wwrite-strings
     -funit-at-a-time
     -Wno-strict-overflow
+    -Wno-unused-local-typedefs
   )

   # Check this list on C++ compiler only


Changed method of cleaning up output files to work with Windows.

--- Tests/VisualTests/PostTest.cmake
+++ Tests/VisualTests/PostTest.cmake
@@ -7,10 +7,17 @@
 #-------------------------------------------------------------------

 if (UNIX)
-  set(USER_HOME_DIRECTORY $ENV{HOME})
+  # escape spaces
+  string(REPLACE " " "\ " USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 elseif (WIN32)
   string(REPLACE "\\" "/" USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 # other platforms?
 endif ()

-exec_program("cmake -E remove ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
+# Use platform-specific utils, since 'cmake -E remove' didn't seem to handle wildcards in Windows
+if (UNIX)
+  exec_program("rm ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
+elseif (WIN32)
+  exec_program("cmd /c del \"${USER_HOME_DIRECTORY}\TestResults_*RenderingSubsystem.txt\"")
+# other platforms?
+endif ()


Also set the *__TRYRUN_OUTPUT cache value to something. (#24631)

CMake 3.14 fails in a cross-compilation ARM build and complains
that both both *_EXITCODE and *_EXITCODE__TRYRUN_OUTPUT have
to be set. Doing this re-enables the build.

--- cross/tryrun.cmake
+++ cross/tryrun.cmake
@@ -3,6 +3,7 @@

 macro(set_cache_value)
   set(${ARGV0} ${ARGV1} CACHE STRING "Result from TRY_RUN" FORCE)
+  set(${ARGV0}__TRYRUN_OUTPUT "dummy output" CACHE STRING "Output from TRY_RUN" FORCE)
 endmacro()

 if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf OR


Remove CMakeCache when configuring. This fixes an issue with CLion that means that the dependencies get built in the wrong directory due to the CMakeCache.txt being copied between the directories.  No adverse effect is caused for other generators.

--- DownloadProject.cmake
+++ DownloadProject.cmake
@@ -139,6 +139,16 @@
     set(${DL_ARGS_PROJ}_SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" PARENT_SCOPE)
     set(${DL_ARGS_PROJ}_BINARY_DIR "${DL_ARGS_BINARY_DIR}" PARENT_SCOPE)

+    # The way that CLion manages multiple configurations, it causes a copy of
+    # the CMakeCache.txt to be copied across due to it not expecting there to
+    # be a project within a project.  This causes the hard-coded paths in the
+    # cache to be copied and builds to fail.  To mitigate this, we simply
+    # remove the cache if it exists before we configure the new project.  It
+    # is safe to do so because it will be re-generated.  Since this is only
+    # executed at the configure step, it should not cause additional builds or
+    # downloads.
+    file(REMOVE "${DL_ARGS_DOWNLOAD_DIR}/CMakeCache.txt")
+
     # Create and build a separate CMake project to carry out the download.
     # If we've already previously done these steps, they will not cause
     # anything to be updated, so extra rebuilds of the project won't occur.


Work-around for libusb breaking changes in Master branch (v1.0.24)

Change-Id: I22d53022131041681759b89d62b1496700c07952
(cherry picked from commit 35908c7c4e087ab9196ae9c0e3382f666a2c5102)

--- CMake/external_libusb.cmake
+++ CMake/external_libusb.cmake
@@ -3,7 +3,9 @@
 ExternalProject_Add(
     libusb

-    GIT_REPOSITORY "https://github.com/libusb/libusb.git"
+    # Work-around for libusb master broken on Nov 26' 2020 with introduction of v1.0.24
+    # the issue has been reported in https://github.com/libusb/libusb/issues/812
+    GIT_REPOSITORY "https://github.com/ev-mp/libusb.git"
     GIT_TAG "2a7372db54094a406a755f0b8548b614ba8c78ec" # "v1.0.22" + Mac get_device_list hang fix

     UPDATE_COMMAND ${CMAKE_COMMAND} -E copy_if_different


Reactivated mitkToFCameraMITKPlayerDeviceTest

--- Modules/ToFHardware/Testing/files.cmake
+++ Modules/ToFHardware/Testing/files.cmake
@@ -1,7 +1,7 @@
 set(MODULE_TESTS
   mitkThreadedToFRawDataReconstructionTest.cpp
   mitkToFCameraMITKPlayerControllerTest.cpp
-  #mitkToFCameraMITKPlayerDeviceTest.cpp
+  mitkToFCameraMITKPlayerDeviceTest.cpp
   mitkToFCameraPMDCamBoardControllerTest.cpp
   mitkToFCameraPMDCamBoardDeviceTest.cpp
   #mitkToFCameraPMDRawDataCamBoardDeviceTest.cpp


Create the symlink for the "Autoload" directory in the build tree.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -1797,7 +1797,7 @@
     # Ensure the output directory exist before creating the symlinks
     file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     # Create symbolic links in the build tree
-    foreach (I CoreData Data)
+    foreach (I Autoload CoreData Data)
         if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${I})
             create_symlink (${CMAKE_SOURCE_DIR}/bin/${I} ${CMAKE_BINARY_DIR}/bin/${I} FALLBACK_TO_COPY)
         endif ()


Fix to ensure 'bin' dir in build tree exists before symlink creation.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -1705,6 +1705,8 @@
         file (WRITE ${CMAKE_BINARY_DIR}/Source/shell.html "${SHELL_HTML}")
     endif ()
 else ()
+    # Ensure the output directory exist before creating the symlinks
+    file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     # Create symbolic links in the build tree
     foreach (I CoreData Data)
         if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${I})


Added support for ndk-r9b and ndk-r9c. Bugfix: Detecting AndroidDependencies using direct paths.

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -4,7 +4,7 @@
 #  See home page: https://github.com/taka-no-me/android-cmake
 #
 #  The file is mantained by the OpenCV project. The latest version can be get at
-#  http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
+#  https://github.com/Itseez/opencv/tree/master/platforms/android/android.toolchain.cmake
 #
 #  Usage Linux:
 #   $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
@@ -288,7 +288,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9c -r9b -r9 -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -604,27 +604,30 @@

 macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath )
  foreach( __toolchain ${${__availableToolchainsLst}} )
-  if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
-   string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
-  else()
-   set( __gcc_toolchain "${__toolchain}" )
-  endif()
-  __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
-  if( __machine )
-   string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
-   if( __machine MATCHES i686 )
-    set( __arch "x86" )
-   elseif( __machine MATCHES arm )
-    set( __arch "arm" )
-   elseif( __machine MATCHES mipsel )
-    set( __arch "mipsel" )
+  # Skip renderscript folder. It's not C++ toolchain
+  if (NOT ${__toolchain} STREQUAL "renderscript")
+   if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
+     string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
+   else()
+     set( __gcc_toolchain "${__toolchain}" )
    endif()
-   list( APPEND __availableToolchainMachines "${__machine}" )
-   list( APPEND __availableToolchainArchs "${__arch}" )
-   list( APPEND __availableToolchainCompilerVersions "${__version}" )
-   list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
-  endif()
-  unset( __gcc_toolchain )
+   __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
+   if( __machine )
+    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
+    if( __machine MATCHES i686 )
+     set( __arch "x86" )
+    elseif( __machine MATCHES arm )
+     set( __arch "arm" )
+    elseif( __machine MATCHES mipsel )
+     set( __arch "mipsel" )
+    endif()
+    list( APPEND __availableToolchainMachines "${__machine}" )
+    list( APPEND __availableToolchainArchs "${__arch}" )
+    list( APPEND __availableToolchainCompilerVersions "${__version}" )
+    list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
+   endif()
+   unset( __gcc_toolchain )
+  endif()
  endforeach()
 endmacro()

@@ -685,7 +688,7 @@
 # verify that target ABI is supported
 list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx )
 if( __androidAbiIdx EQUAL -1 )
- string( REPLACE ";" "\", \"", PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
+ string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
  message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain.
    Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\"
    " )
@@ -1527,7 +1530,7 @@
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+set( CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}" "${OGRE_DEPENDENCIES_DIR}" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share")

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )


Bump required libuecc version

Bump required libuecc version

--- cmake/deps.cmake
+++ cmake/deps.cmake
@@ -12,7 +12,7 @@
   find_package(PkgConfig REQUIRED)
 endif(ANDROID)

-pkg_check_modules(UECC REQUIRED libuecc>=3)
+pkg_check_modules(UECC REQUIRED libuecc>=5)

 set(NACL_INCLUDE_DIRS "")


fix last commit

fix last commit

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@33191 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/macros/macro_add_test.cmake
+++ deal.II/cmake/macros/macro_add_test.cmake
@@ -218,7 +218,7 @@
               && echo "${_test_full}: RUN successful."
               && echo "${_test_full}: DIFF failed. ------ Source: ${_comparison_file}"
               && echo "${_test_full}: DIFF failed. ------ Result: ${_test_directory}/output"
-              && echo "Check ${_comparison_file} ${_test_directory}/output"
+              && echo "Check ${_test_directory}/output ${_comparison_file}"
               && echo "${_test_full}: DIFF failed. ------ Diff:   ${_test_directory}/failing_diff"
               && echo "${_test_full}: DIFF failed. ------ First 8 lines of numdiff/diff output:"
               && cat ${_test_directory}/failing_diff | head -n 8


Using currently set debug compiler flags for dependencies

The debug compiler flags that are set in the current .cmake file
will be used for all dependencies (ITK, VTK, etc.)

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -71,8 +71,11 @@
   -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
   -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
   -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-  "-DCMAKE_C_FLAGS:STRING=${ep_common_C_FLAGS}"
-  "-DCMAKE_CXX_FLAGS:STRING=${ep_common_CXX_FLAGS}"
+  -DCMAKE_C_FLAGS:STRING=${ep_common_C_FLAGS}
+  -DCMAKE_CXX_FLAGS:STRING=${ep_common_CXX_FLAGS}
+  -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
+  -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}
+
 )

 #-----------------------------------------------------------------------------


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


cmake adds GEARSHIFFT_EXT_DIR

cmake adds GEARSHIFFT_EXT_DIR

--- cmake/half.cmake
+++ cmake/half.cmake
@@ -4,7 +4,7 @@

 find_path(half_INCLUDE_DIR
   NAMES half-${GEARSHIFFT_HALF_VERSION}.zip
-  PATHS ${CMAKE_SOURCE_DIR}/ext/half/src)
+  PATHS ${GEARSHIFFT_EXT_DIR}/half/src)

 if((NOT half_INCLUDE_DIR) OR (NOT EXISTS ${half_INCLUDE_DIR}))
   # we couldn't find the header files for FOO or they don't exist
@@ -13,8 +13,8 @@
   include(ExternalProject)

   # half-code is a header-only library, so no build and install required
-  ExternalProject_Add(ext_half
-    PREFIX ${CMAKE_SOURCE_DIR}/ext/half
+  ExternalProject_Add(ExtHalf
+    PREFIX ${GEARSHIFFT_EXT_DIR}/half
     URL https://downloads.sourceforge.net/project/half/half/${GEARSHIFFT_HALF_VERSION}/half-${GEARSHIFFT_HALF_VERSION}.zip
     URL_MD5 86d023c0729abf3465bcd55665a39013
     INSTALL_COMMAND ""
@@ -24,9 +24,8 @@
     LOG_CONFIGURE OFF
     LOG_BUILD OFF
     )
-  ExternalProject_Get_Property(ext_half DOWNLOAD_DIR)

-  set(half_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/half/src
+  set(half_INCLUDE_DIR ${GEARSHIFFT_EXT_DIR}/half/src
     CACHE PATH "'half' include directory")
 endif()


update otf2 interface version

update otf2 interface version

--- OTF2XX.cmake
+++ OTF2XX.cmake
@@ -44,7 +44,7 @@
 endif()

 # find libOTF2
-find_package(OTF2 7.0.0 EXACT REQUIRED)
+find_package(OTF2 8.0.1 EXACT REQUIRED)
 include_directories(SYSTEM ${OTF2_INCLUDE_DIRS})

 include_directories(${CMAKE_CURRENT_LIST_DIR}/include)


Improve module name handling

Improve module name handling

Addon module names are actually required to be valid C identifiers (per
the nodejs documentation here: https://nodejs.org/api/addons.html) and
how NODE_MODULE uses the string. This alters the add_nodejs_module
function to validate this case prior to executing, to prevent undefined
behaviour / failure to compile.

Also has a little cleanup to make the _BUILD define formatted the way
its expected to be (all caps, like a preprocessor definition).

--- NodeJS.cmake
+++ NodeJS.cmake
@@ -551,6 +551,14 @@
 # correctly. Feel free to use it as a model to do this by hand (or to
 # tweak this configuration if you need something custom).
 function(add_nodejs_module NAME)
+    # Validate name parameter (must be a valid C identifier)
+    string(MAKE_C_IDENTIFIER ${NAME} ${NAME}_SYMBOL_CHECK)
+    if(NOT "${NAME}" STREQUAL "${${NAME}_SYMBOL_CHECK}")
+        message(FATAL_ERROR
+            "Module name must be a valid C identifier. "
+            "Suggested alternative: '${${NAME}_SYMBOL_CHECK}'"
+        )
+    endif()
     # Make sure node is initialized (variables set) before defining the module
     if(NOT NODEJS_INIT)
         message(FATAL_ERROR
@@ -574,9 +582,10 @@
     # Two helpful ones:
     # MODULE_NAME must match the name of the build library, define that here
     # ${NAME}_BUILD is for symbol visibility under windows
+    string(TOUPPER "${NAME}_BUILD" ${NAME}_BUILD_DEF)
     target_compile_definitions(${NAME}
         PRIVATE MODULE_NAME=${NAME}
-        PRIVATE ${NAME}_BUILD
+        PRIVATE ${${NAME}_BUILD_DEF}
         PUBLIC ${NODEJS_DEFINITIONS}
     )
     # This properly defines includes for the module


Fixed is_component implementation.

Fixed is_component implementation.

--- cmake/Components.cmake
+++ cmake/Components.cmake
@@ -34,14 +34,13 @@
 function(is_component output_variable component)
   set(target "${component_prefix}${component}")

-  if(NOT TARGET "${target}")
-    message(FATAL_ERROR
-      "'${component}' is not a component of ${PROJECT_NAME}.")
+  if(TARGET "${target}")
+    get_property(output TARGET "${target}"
+      PROPERTY "${component_prefix}COMPONENT")
+    set("${output_variable}" ${output} PARENT_SCOPE)
+  else()
+    set("${output_variable}" FALSE PARENT_SCOPE)
   endif()
-
-  get_property(output TARGET "${target}"
-    PROPERTY "${component_prefix}COMPONENT")
-  set("${output_variable}" ${output} PARENT_SCOPE)
 endfunction()

 #==============================================================================


cmake: Eigen3: exit on unsupported version

--- cmake/FindEigen3.cmake
+++ cmake/FindEigen3.cmake
@@ -39,6 +39,11 @@
   _eigen3_get_version()
 endif(EIGEN_INCLUDE_DIR)

+# https://github.com/shogun-toolbox/shogun/issues/4870
+IF(${EIGEN_VERSION} VERSION_GREATER 3.3.7)
+  MESSAGE(FATAL_ERROR "The system Eigen3 version ${EIGEN_VERSION} isn't supported!")
+ENDIF()
+
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args (Eigen3 REQUIRED_VARS EIGEN_INCLUDE_DIR VERSION_VAR EIGEN_VERSION)


Fix build without NaCl

Fix build without NaCl

--- cmake/check_reqs.cmake
+++ cmake/check_reqs.cmake
@@ -9,4 +9,10 @@
   if(USE_LIBSODIUM)
     set(HAVE_LIBSODIUM TRUE)
   endif(USE_LIBSODIUM)
+else(${nacl_required})
+  set(NACL_INCLUDE_DIRS "")
+  set(NACL_CFLAGS_OTHER "")
+  set(NACL_LIBRARY_DIRS "")
+  set(NACL_LIBRARIES "")
+  set(NACL_LDFLAGS_OTHER "")
 endif(${nacl_required})


cmake: zephyr_get_*: Add support for SKIP_PREFIX

Usually the zephyr_get_* API returns values prefixed with tokens like
-I -system, -D. But sometimes we need the values without these
prefixes, so we introduce the optional SKIP_PREFIX argument.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -119,7 +119,7 @@
 # includes, options).
 #
 # The naming convention follows:
-# zephyr_get_${build_information}_for_lang${format}(lang x)
+# zephyr_get_${build_information}_for_lang${format}(lang x [SKIP_PREFIX])
 # Where
 #  the argument 'x' is written with the result
 # and
@@ -138,12 +138,19 @@
 #   - CXX
 #   - ASM
 #
+# SKIP_PREFIX
+#
+# By default the result will be returned ready to be passed directly
+# to a compiler, e.g. prefixed with -D, or -I, but it is possible to
+# omit this prefix by specifying 'SKIP_PREFIX' . This option has no
+# effect for 'compile_options'.
+#
 # e.g.
 # zephyr_get_include_directories_for_lang(ASM x)
 # writes "-Isome_dir;-Isome/other/dir" to x

 function(zephyr_get_include_directories_for_lang_as_string lang i)
-  zephyr_get_include_directories_for_lang(${lang} list_of_flags)
+  zephyr_get_include_directories_for_lang(${lang} list_of_flags ${ARGN})

   convert_list_of_flags_to_string_of_flags(list_of_flags str_of_flags)

@@ -151,7 +158,7 @@
 endfunction()

 function(zephyr_get_system_include_directories_for_lang_as_string lang i)
-  zephyr_get_system_include_directories_for_lang(${lang} list_of_flags)
+  zephyr_get_system_include_directories_for_lang(${lang} list_of_flags ${ARGN})

   convert_list_of_flags_to_string_of_flags(list_of_flags str_of_flags)

@@ -159,7 +166,7 @@
 endfunction()

 function(zephyr_get_compile_definitions_for_lang_as_string lang i)
-  zephyr_get_compile_definitions_for_lang(${lang} list_of_flags)
+  zephyr_get_compile_definitions_for_lang(${lang} list_of_flags ${ARGN})

   convert_list_of_flags_to_string_of_flags(list_of_flags str_of_flags)

@@ -175,7 +182,10 @@
 endfunction()

 function(zephyr_get_include_directories_for_lang lang i)
-  get_property_and_add_prefix(flags zephyr_interface INTERFACE_INCLUDE_DIRECTORIES -I)
+  get_property_and_add_prefix(flags zephyr_interface INTERFACE_INCLUDE_DIRECTORIES
+    "-I"
+    ${ARGN}
+    )

   process_flags(${lang} flags output_list)

@@ -183,7 +193,10 @@
 endfunction()

 function(zephyr_get_system_include_directories_for_lang lang i)
-  get_property_and_add_prefix(flags zephyr_interface INTERFACE_SYSTEM_INCLUDE_DIRECTORIES -isystem)
+  get_property_and_add_prefix(flags zephyr_interface INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
+    "-isystem"
+    ${ARGN}
+    )

   process_flags(${lang} flags output_list)

@@ -191,7 +204,10 @@
 endfunction()

 function(zephyr_get_compile_definitions_for_lang lang i)
-  get_property_and_add_prefix(flags zephyr_interface INTERFACE_COMPILE_DEFINITIONS -D)
+  get_property_and_add_prefix(flags zephyr_interface INTERFACE_COMPILE_DEFINITIONS
+    "-D"
+    ${ARGN}
+    )

   process_flags(${lang} flags output_list)

@@ -204,6 +220,20 @@
   process_flags(${lang} flags output_list)

   set(${i} ${output_list} PARENT_SCOPE)
+endfunction()
+
+# This function writes a dict to it's output parameter
+# 'return_dict'. The dict has information about the parsed arguments,
+#
+# Usage:
+#   zephyr_get_parse_args(foo ${ARGN})
+#   print(foo_STRIP_PREFIX) # foo_STRIP_PREFIX might be set to 1
+function(zephyr_get_parse_args return_dict)
+  foreach(x ${ARGN})
+    if(x STREQUAL STRIP_PREFIX)
+      set(${return_dict}_STRIP_PREFIX 1 PARENT_SCOPE)
+    endif()
+  endforeach()
 endfunction()

 function(process_flags lang input output)
@@ -258,9 +288,17 @@
 endfunction()

 macro(get_property_and_add_prefix result target property prefix)
+  zephyr_get_parse_args(args ${ARGN})
+
+  if(args_STRIP_PREFIX)
+    set(maybe_prefix "")
+  else()
+    set(maybe_prefix ${prefix})
+  endif()
+
   get_property(target_property TARGET ${target} PROPERTY ${property})
   foreach(x ${target_property})
-    list(APPEND ${result} ${prefix}${x})
+    list(APPEND ${result} ${maybe_prefix}${x})
   endforeach()
 endmacro()


extensions.cmake: need unique strings, not random ones

1. To support being called multiple times, the function
zephyr_library_compile_options() uses unique
options_interface_lib_${random} names. These only need to be unique, not
random. So replace them with a simple MD5 hash of the ${item} argument.

To reproduce quickly run:
  sanitycheck -b -p qemu_xtensa --tag shell
... a few times and compare the output directories.

This bug sits for now at the top of the list of build reproducibility
issues the most bizarre and difficult to root cause. When running
sanitycheck over a large sample of configurations it was affecting
only qemu_xtensa/**/zephyr/arch/arch/xtensa/core/startup/Makefile
files (and their corresponding CMakeFiles/TargetDirectories.txt),
randomly ordering the following three Make targets and only these
three: rebuild_cache, edit_cache, arch__xtensa__core__startup.

The key to root causing was cmake --trace-expand which prints the random
string.

2. generate_unique_target_name_from_filename() also generated a random
string for the same uniqueness reason. This one was easier to root cause
and reproduce with: sanitycheck --tag gen_inc_file

Signed-off-by: Marc Herbert <77e7c7d746b52c6eb01119b65a031ae1f650246d@intel.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -397,8 +397,8 @@
   # zephyr_interface will be the first interface library that flags
   # are taken from.

-  string(RANDOM random)
-  set(lib_name options_interface_lib_${random})
+  string(MD5 uniqueness ${item})
+  set(lib_name options_interface_lib_${uniqueness})

   add_library(           ${lib_name} INTERFACE)
   target_compile_options(${lib_name} INTERFACE ${item} ${ARGN})
@@ -1219,7 +1219,7 @@
   string(REPLACE "." "_" x ${basename})
   string(REPLACE "@" "_" x ${x})

-  string(RANDOM LENGTH 8 random_chars)
-
-  set(${target_name} gen_${x}_${random_chars} PARENT_SCOPE)
-endfunction()
+  string(MD5 unique_chars ${filename})
+
+  set(${target_name} gen_${x}_${unique_chars} PARENT_SCOPE)
+endfunction()


zephyr_library_compile_options(): silently de-duplicate

PR #14776 / commit 915a35325562 changed function
zephyr_library_compile_options() to use MD5 instead of RANDOM for build
reproduction reasons. As later predicted by Sebastian Bøe in the PR
(thx), the names generated for these pseudo-libraries won't be unique
anymore if the exact same flag gets added more than once.

To reproduce the issue, simply add the following two lines in some
CMakeLists.txt file like samples/hello_world/CMakeLists.txt:

zephyr_library_compile_options("-Dfubar=barfu")
zephyr_library_compile_options("-Dfubar=barfu")

cmake will then fail like this:

 CMake Error at zephyr/cmake/extensions.cmake:403 (add_library):
  add_library cannot create target
  "options_interface_lib_e689fdb7eb15d801c2f95dd61301fc5e" because
  another target with the same name already exists.  The existing
  target is an interface library created in source directory
  "zephyr/samples/hello_world".  See documentation for
  policy CMP0002 for more details.
 Call Stack (most recent call first):
  CMakeLists.txt:9 (zephyr_library_compile_options)

As requested by Sebastian, silently discard duplicate options just like
CMake does.

Fixes #15093

Signed-off-by: Marc Herbert <77e7c7d746b52c6eb01119b65a031ae1f650246d@intel.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -399,6 +399,11 @@

   string(MD5 uniqueness ${item})
   set(lib_name options_interface_lib_${uniqueness})
+
+  if (TARGET ${lib_name})
+    # ${item} already added, ignoring duplicate just like CMake does
+    return()
+  endif()

   add_library(           ${lib_name} INTERFACE)
   target_compile_options(${lib_name} INTERFACE ${item} ${ARGN})


CMake: ios.toolchain - silence warnings with newer CMake versions

--- CMake/toolchain/ios.toolchain.xcode.cmake
+++ CMake/toolchain/ios.toolchain.xcode.cmake
@@ -50,10 +50,11 @@
   string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
 endif ()

-# Force the compilers to gcc for iOS
-include (CMakeForceCompiler)
-CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
-CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
+# Force the compilers for iOS
+# deprecated with CMake 3.5. uncomment below if you use an older version.
+# include (CMakeForceCompiler)
+# CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
+# CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
 set(CMAKE_AR ar CACHE FILEPATH "" FORCE)

 # Skip the platform compiler checks for cross compiling


Added endverbatim command

Added endverbatim command

--- Core/Code/CppMicroServices/CMake/usFunctionEmbedResources.cmake
+++ Core/Code/CppMicroServices/CMake/usFunctionEmbedResources.cmake
@@ -16,6 +16,7 @@
 #!                          ROOT_DIR resources
 #!                          FILES config.properties logo.png
 #!                         )
+#! \endverbatim
 #!
 #! \param LIBRARY_NAME (required if EXECUTABLE_NAME is empty) The library name of the module
 #!        which will include the generated source file, without extension.


fix typo in minuit2 omp cmake feature flag

--- math/minuit2/StandAlone.cmake
+++ math/minuit2/StandAlone.cmake
@@ -155,7 +155,7 @@
 endif()

 # Setup package info
-add_feature_info(minuit2_openmp minuit2_openmp "OpenMP (Thread safe FCNs only)")
+add_feature_info(minuit2_omp minuit2_omp "OpenMP (Thread safe FCNs only)")
 add_feature_info(minuit2_mpi minuit2_mpi "MPI (Thread safe FCNs only)")
 set_package_properties(OpenMP PROPERTIES
     URL "http://www.openmp.org"


Adding USE_MSAA to the cmgui_congifure file https://tracker.physiomeproject.org/show_bug.cgi?id=1203

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@8077 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/configure/cmgui_configure.h.cmake
+++ source/configure/cmgui_configure.h.cmake
@@ -45,6 +45,7 @@
 #cmakedefine FE_VALUE_IS_DOUBLE
 #cmakedefine HAVE_VFSCANF
 #cmakedefine GLEW_STATIC
+#cmakedefine USE_MSAA
 #cmakedefine OPTIMISED
 #cmakedefine DEBUG
 #cmakedefine MEMORY_CHECKING


capture also stderr from $CXX --version use cmake to keep only the first line; fixes Open64 detection

--- test.cmake
+++ test.cmake
@@ -22,7 +22,10 @@
    if(NOT _cxx)
       set(_cxx "c++")
    endif()
-   execute_process(COMMAND ${_cxx} --version COMMAND head -n1 OUTPUT_VARIABLE COMPILER_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+   execute_process(COMMAND ${_cxx} --version OUTPUT_VARIABLE COMPILER_VERSION ERROR_VARIABLE COMPILER_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+   string(REPLACE "\n" ";" COMPILER_VERSION "${COMPILER_VERSION}")
+   list(GET COMPILER_VERSION 0 COMPILER_VERSION)
+   string(REPLACE "Open64 Compiler Suite: Version" "Open64" COMPILER_VERSION "${COMPILER_VERSION}")
    if(arch STREQUAL "darwin")
       execute_process(COMMAND sysctl -n hw.ncpu OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE number_of_processors)
    else()


Little change

Little change

--- cmake/dev/generate_msvc_libraries.cmake
+++ cmake/dev/generate_msvc_libraries.cmake
@@ -22,7 +22,7 @@
         )

     add_custom_target(${PROJECT_NAME}_${platform} ALL
-        COMMAND ${CMAKE_COMMAND} -G "${GENERATOR}" -DEPROSIMA_BUILD=ON -DMINION=ON -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/eprosima_installer/${platform}/install ../../../..
+        COMMAND ${CMAKE_COMMAND} -G "${GENERATOR}" -DEPROSIMA_BUILD=ON -DMINION=ON -DCMAKE_INSTALL_PREFIX:PATH=${PROJECT_BINARY_DIR}/eprosima_installer/${platform}/install ../../../..
         COMMAND ${CMAKE_COMMAND} --build . --target install --config Release
         COMMAND ${CMAKE_COMMAND} --build . --target install --config Debug
         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/eprosima_installer/${platform}


Updated patch_project_files step dependency

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -30,6 +30,7 @@
   ExternalProject_Add_Step(
     breakpad
     patch_project_files
+    DEPENDEES configure
     DEPENDERS build
     WORKING_DIRECTORY <SOURCE_DIR>
     COMMAND cmake -DVCXPROJ_PATH=<SOURCE_DIR>/src/client/windows/handler/exception_handler.vcxproj -P ${CMAKE_SCRIPT_PATH}/breakpad_VS_patch.cmake


From Mattias Helsing, "I added FORCE to set cmake vars FREETYPE_INCLUDE_DIR_ft2build and
FREETYPE_INCLUDE_DIR_freetype2.
The error case was that during first cmake run (unspecified
ACTUAL_3RDPARTY_DIR) FindFreeType set these to xxx-NOTFOUND. After
specifying ACTUAL_3RDPARTY_DIR, Find3rdPartyDependencies warn't able
to change these (without FORCE).

I also added freetype237 to the library search list since it is what's
in my binary dependencies for vc90"

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -55,11 +55,11 @@

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


Change forge branch to master

Change forge branch to master

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -16,7 +16,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG api_cleanup
+    GIT_TAG master
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


[CMake] Extend copy-legacy-layouts dependency to swiftmodules (#34846)

... and other products as well.

Before this change, the dependency was enforced only for stdlib object
files -- since according to the Ninja dependency graph other libraries
can be scheduled as soon as the swiftmodules are ready, there is a
chance that we attempt to build those before legacy layours are copied.

Addresses rdar://71559791

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -801,6 +801,7 @@
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${swift_ide_test_dependency}
           ${create_dirs_dependency_target}
+          ${copy_legacy_layouts_dep}
         COMMENT "Generating ${module_file}")

     if(SWIFTFILE_STATIC)
@@ -857,6 +858,7 @@
           ${SWIFTFILE_DEPENDS}
           ${swift_ide_test_dependency}
           ${obj_dirs_dependency_target}
+          ${copy_legacy_layouts_dep}
         COMMENT
           "Generating ${maccatalyst_module_file}")

@@ -880,6 +882,7 @@
           ${swift_compiler_tool_dep}
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${create_dirs_dependency_target}
+          ${copy_legacy_layouts_dep}
         COMMENT "Generating ${sib_file}"
         EXCLUDE_FROM_ALL)
     set("${dependency_sib_target_out_var_name}" "${sib_dependency_target}" PARENT_SCOPE)
@@ -896,6 +899,7 @@
           ${swift_compiler_tool_dep}
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${create_dirs_dependency_target}
+          ${copy_legacy_layouts_dep}
         COMMENT "Generating ${sibopt_file}"
         EXCLUDE_FROM_ALL)
     set("${dependency_sibopt_target_out_var_name}" "${sibopt_dependency_target}" PARENT_SCOPE)
@@ -913,6 +917,7 @@
           ${swift_compiler_tool_dep}
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${create_dirs_dependency_target}
+          ${copy_legacy_layouts_dep}
           COMMENT "Generating ${sibgen_file}"
           EXCLUDE_FROM_ALL)
     set("${dependency_sibgen_target_out_var_name}" "${sibgen_dependency_target}" PARENT_SCOPE)


in that case the first RETURN_VALUE also needs a different check

--- VCTest.cmake
+++ VCTest.cmake
@@ -15,7 +15,7 @@
       set(START_TIME ${CTEST_ELAPSED_TIME})
       CTEST_START (Continuous)
       CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
-      if(res)
+      if(res GREATER 0)
          CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
          if(res EQUAL 0)
             CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
@@ -24,7 +24,7 @@
             endif(res EQUAL 0)
          endif(res EQUAL 0)
          CTEST_SUBMIT (RETURN_VALUE res)
-      endif(res)
+      endif(res GREATER 0)
       ctest_sleep(${START_TIME} 1200 ${CTEST_ELAPSED_TIME})
    endwhile()
 else($ENV{ctest_model} STREQUAL "Continuous")


cleanup(common): Fix link in Doxygen TAGFILES

--- cmake/GoogleCloudCppCommon.cmake
+++ cmake/GoogleCloudCppCommon.cmake
@@ -86,11 +86,11 @@
         if (NOT ("cloud" STREQUAL "${GOOGLE_CLOUD_CPP_SUBPROJECT}"))
             if (NOT "${GOOGLE_CLOUD_CPP_GEN_DOCS_FOR_GOOGLEAPIS_DEV}")
                 set(DOXYGEN_TAGFILES
-                    "${GOOGLE_CLOUD_CPP_COMMON_TAG}=https://googleapis.dev/google-cloud-common/master/"
+                    "${GOOGLE_CLOUD_CPP_COMMON_TAG}=https://googleapis.dev/cpp/google-cloud-common/latest/"
                 )
             elseif (NOT "${GOOGLE_CLOUD_CPP_USE_MASTER_FOR_REFDOC_LINKS}")
                 set(DOXYGEN_TAGFILES
-                    "${GOOGLE_CLOUD_CPP_COMMON_TAG}=https://googleapis.dev/google-cloud-common/master/"
+                    "${GOOGLE_CLOUD_CPP_COMMON_TAG}=https://googleapis.dev/cpp/google-cloud-common/latest/"
                 )
             else ()
                 set(DOXYGEN_TAGFILES


Add ARKode to FindSUNDIALS.

Add ARKode to FindSUNDIALS.

--- cmake/modules/FindSUNDIALS.cmake
+++ cmake/modules/FindSUNDIALS.cmake
@@ -19,6 +19,7 @@
 # This module exports
 #
 #   SUNDIALS_LIB_IDA
+#   SUNDIALS_LIB_ARKODE
 #   SUNDIALS_LIB_KINSOL
 #   SUNDIALS_LIB_PAR
 #   SUNDIALS_LIB_SER
@@ -38,6 +39,11 @@
 SET_IF_EMPTY(SUNDIALS_DIR "$ENV{SUNDIALS_DIR}")

 DEAL_II_FIND_LIBRARY(SUNDIALS_LIB_IDA NAMES sundials_ida
+  HINTS ${SUNDIALS_DIR}
+  PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+  )
+
+DEAL_II_FIND_LIBRARY(SUNDIALS_LIB_ARKODE NAMES sundials_arkode
   HINTS ${SUNDIALS_DIR}
   PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
   )
@@ -77,11 +83,11 @@

 DEAL_II_PACKAGE_HANDLE(SUNDIALS
   LIBRARIES REQUIRED
-    SUNDIALS_LIB_IDA SUNDIALS_LIB_KINSOL SUNDIALS_LIB_SER SUNDIALS_LIB_PAR
+    SUNDIALS_LIB_IDA SUNDIALS_LIB_ARKODE SUNDIALS_LIB_KINSOL SUNDIALS_LIB_SER SUNDIALS_LIB_PAR
     ${_sundials_additional_libs}
   INCLUDE_DIRS REQUIRED SUNDIALS_INCLUDE_DIR
   USER_INCLUDE_DIRS REQUIRED SUNDIALS_INCLUDE_DIR
   CLEAR
-    SUNDIALS_LIB_IDA SUNDIALS_LIB_KINSOL SUNDIALS_LIB_SER SUNDIALS_LIB_PAR
-    SUN_INC
+    SUNDIALS_LIB_IDA SUNDIALS_LIB_ARKODE SUNDIALS_LIB_KINSOL
+    SUNDIALS_LIB_SER SUNDIALS_LIB_PAR SUN_INC
   )


Do not build SWIG and PCRE on macOS anymore

Both dependencies have trouble with correct include paths of SDKs.
Externally provide SWIG to enable wrapping. For example, use Homebrew:

brew install swig

--- CMakeExternals/ExternalProjectList.cmake
+++ CMakeExternals/ExternalProjectList.cmake
@@ -23,9 +23,9 @@
  mitkFunctionAddExternalProject(NAME Qwt ON ADVANCED DEPENDS Qt5)
 endif()

-if(UNIX)
+if(UNIX AND NOT APPLE)
   mitkFunctionAddExternalProject(NAME PCRE OFF ADVANCED NO_PACKAGE)
   mitkFunctionAddExternalProject(NAME SWIG OFF ADVANCED NO_PACKAGE DEPENDS PCRE)
-else()
+elseif(WIN32)
   mitkFunctionAddExternalProject(NAME SWIG OFF ADVANCED NO_PACKAGE)
 endif()


SourceVersionControl: Fix MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE for hg and svn

--- Modules/ManageSourceVersionControl.cmake
+++ Modules/ManageSourceVersionControl.cmake
@@ -27,7 +27,9 @@
     INCLUDE(ManageTarget)

     MACRO(MANAGE_SOURCE_VERSION_CONTROL_COMMON)
-	ADD_DEPENDENCIES(after_release_commit changelog_prev_update)
+	ADD_CUSTOM_COMMAND(TARGET after_release_commit PRELINK
+	    COMMAND make changelog_prev_update
+	    )
     ENDMACRO(MANAGE_SOURCE_VERSION_CONTROL_COMMON)

     MACRO(MANAGE_SOURCE_VERSION_CONTROL_GIT)
@@ -54,11 +56,11 @@

     MACRO(MANAGE_SOURCE_VERSION_CONTROL_HG)
 	SET(MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE
-	    ${CMAKE_SOURCE_DIR}/.hg/refs/tags/${PRJ_VER}
+	    ${CMAKE_FEDORA_TEMP_DIR}/${PRJ_VER}
 	    CACHE PATH "Source Version Control Tag File")

 	ADD_CUSTOM_TARGET(after_release_commit
-	    COMMAND hg commit --m "${after_release_message}"
+	    COMMAND hg commit -m "${after_release_message}"
 	    COMMAND hg push
 	    COMMENT "After release ${PRJ_VER}"
 	    VERBATIM
@@ -75,7 +77,7 @@

     MACRO(MANAGE_SOURCE_VERSION_CONTROL_SVN)
 	SET(MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE
-	    ${CMAKE_SOURCE_DIR}/SVN/refs/tags/${PRJ_VER}
+	    ${CMAKE_FEDORA_TEMP_DIR}/${PRJ_VER}
 	    CACHE PATH "Source Version Control Tag File")

 	ADD_CUSTOM_TARGET(after_release_commit
@@ -86,6 +88,7 @@

 	ADD_CUSTOM_TARGET(tag
 	    COMMAND svn copy "${SOURCE_BASE_URL}/trunk" "${SOURCE_BASE_URL}/tags/${PRJ_VER}" -m "${CHANGE_SUMMARY}"
+	    COMMAND cmake -E touch ${MANAGE_SOURCE_VERSION_CONTROL_TAG_FILE}
 	    COMMENT "Tagging the source as ver ${PRJ_VER}"
 	    VERBATIM
 	    )


FFmpeg: switch to ffmpeg-mpv

FFmpeg: switch to ffmpeg-mpv

--- packages/ffmpeg.cmake
+++ packages/ffmpeg.cmake
@@ -17,7 +17,8 @@
         x264
         xvidcore
 #     GIT_REPOSITORY "git://source.ffmpeg.org/ffmpeg.git"
-    GIT_REPOSITORY "git://github.com/FFmpeg/FFmpeg.git"
+#     GIT_REPOSITORY "git://github.com/FFmpeg/FFmpeg.git"
+    GIT_REPOSITORY "https://github.com/mpv-player/ffmpeg-mpv.git"
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure
     --cross-prefix=${TARGET_ARCH}-


ARROW-1610: C++/Python: Only call python-prefix if the default PYTHON_LIBRARY is not present

Author: Korn, Uwe <Uwe.Korn@blue-yonder.com>

Closes #1130 from xhochy/ARROW-1610 and squashes the following commits:

8c7c190e [Korn, Uwe] ARROW-1610: C++/Python: Only call python-prefix if the default PYTHON_LIBRARY is not present

--- cpp/cmake_modules/FindPythonLibsNew.cmake
+++ cpp/cmake_modules/FindPythonLibsNew.cmake
@@ -149,19 +149,21 @@
     set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/libpython${PYTHON_LIBRARY_SUFFIX}.a")
   endif()
 elseif(APPLE)
-  # In some cases libpythonX.X.dylib is not part of the PYTHON_PREFIX and we
-  # need to call `python-config --prefix` to determine the correct location.
-
-  find_program(PYTHON_CONFIG python-config
-      NO_CMAKE_SYSTEM_PATH)
-  if (PYTHON_CONFIG)
-    execute_process(
-        COMMAND "${PYTHON_CONFIG}" "--prefix"
-        OUTPUT_VARIABLE PYTHON_CONFIG_PREFIX
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-    set(PYTHON_LIBRARY "${PYTHON_CONFIG_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
-  else()
-    set(PYTHON_LIBRARY "${PYTHON_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
+
+  set(PYTHON_LIBRARY "${PYTHON_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
+
+  if (NOT EXISTS ${PYTHON_LIBRARY})
+    # In some cases libpythonX.X.dylib is not part of the PYTHON_PREFIX and we
+    # need to call `python-config --prefix` to determine the correct location.
+    find_program(PYTHON_CONFIG python-config
+        NO_CMAKE_SYSTEM_PATH)
+    if (PYTHON_CONFIG)
+      execute_process(
+          COMMAND "${PYTHON_CONFIG}" "--prefix"
+          OUTPUT_VARIABLE PYTHON_CONFIG_PREFIX
+          OUTPUT_STRIP_TRAILING_WHITESPACE)
+      set(PYTHON_LIBRARY "${PYTHON_CONFIG_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
+    endif()
   endif()
 else()
     if(${PYTHON_SIZEOF_VOID_P} MATCHES 8)


build: don't define cmake project for each executable

Fixes: #391

Signed-off-by: Dmitry Rogozhkin <01f0df9cc32cbf6a7f0faa5c8376e6cf28354d70@intel.com>

--- builder/FindFunctions.cmake
+++ builder/FindFunctions.cmake
@@ -273,8 +273,6 @@
     list( APPEND sources ${sources.plus} )
   endif()

-  project( ${target} )
-
   add_executable( ${target} ${include} ${sources} )

   if( defs )


Threads for htslib

Threads for htslib

--- htslib.cmake
+++ htslib.cmake
@@ -24,4 +24,5 @@

 add_dependencies(htslib zlib)
 include_directories(${htslib_INSTALL}/include)
-set(htslib_LIB ${htslib_INSTALL}/lib/libhts.a ${zlib_LIB})
+find_package (Threads)
+set(htslib_LIB ${htslib_INSTALL}/lib/libhts.a ${zlib_LIB} ${CMAKE_THREAD_LIBS_INIT})


Fix `iree_run_module_test` setting to make it portable (#10677)

Remove the absolute path in flagfile, module_file, and expected_output
to make the test more portable.

Also update the `file(STRING)` --> `file(READ)` usage in the function.

--- build_tools/cmake/iree_run_module_test.cmake
+++ build_tools/cmake/iree_run_module_test.cmake
@@ -98,8 +98,12 @@
     message(SEND_ERROR "The DRIVER argument is required.")
   endif()

-  file(REAL_PATH "${_RULE_MODULE_SRC}" _SRC)
-  list(APPEND _RULE_RUNNER_ARGS "--module_file=${_SRC}")
+  # All the file paths referred in the _RULE_RUNNER_ARGS are relative paths to
+  # make it portable, and all the paths in `_RUNNER_DATA` are absolute paths to
+  # make sure it can be checked/copied by the `iree_native_test` flow.
+  file(RELATIVE_PATH _SRC_RELATIVE_PATH
+    "${CMAKE_CURRENT_BINARY_DIR}" "${_RULE_MODULE_SRC}")
+  list(APPEND _RUNNER_DATA ${_RULE_MODULE_SRC})

   if(_RULE_EXPECTED_OUTPUT)
     # this may be a file or a literal output. In the latter case, the
@@ -108,18 +112,18 @@
     if(NOT _OUTPUT_FILE_TYPE)  # The expected output is listed in the field.
       list(APPEND _RULE_RUNNER_ARGS "--expected_output=\"${_RULE_EXPECTED_OUTPUT}\"")
     elseif(_OUTPUT_FILE_TYPE STREQUAL ".txt")
-      file(REAL_PATH "${_RULE_EXPECTED_OUTPUT}" _OUTPUT_FILE_SRC)
+      file(REAL_PATH "${_RULE_EXPECTED_OUTPUT}" _OUTPUT_FILE_ABS_PATH)
       # Process the text input to remove the line breaks.
-      file(STRINGS "${_OUTPUT_FILE_SRC}" _EXPECTED_OUTPUT ENCODING UTF-8)
-      string(REPLACE ";" " " _EXPECTED_OUTPUT_STR "${_EXPECTED_OUTPUT}")
+      file(READ "${_OUTPUT_FILE_ABS_PATH}" _EXPECTED_OUTPUT)
+      string(REPLACE "\n" " " _EXPECTED_OUTPUT_STR "${_EXPECTED_OUTPUT}")
       set(_EXPECTED_OUTPUT_STR "--expected_output=\"${_EXPECTED_OUTPUT_STR}\"")
       list(APPEND _RULE_RUNNER_ARGS ${_EXPECTED_OUTPUT_STR})
-      list(APPEND _SRC ${_OUTPUT_FILE_SRC})
+      list(APPEND _RUNNER_DATA ${_OUTPUT_FILE_ABS_PATH})
     elseif(_OUTPUT_FILE_TYPE STREQUAL ".npy")
       # Large npy files are not stored in the codebase. Need to download them
       # from GCS iree-model-artifacts first and store them in the following possible
       # paths.
-      find_file(_OUTPUT_FILE_SRC_PATH
+      find_file(_OUTPUT_FILE_ABS_PATH
         NAME
           "${_RULE_EXPECTED_OUTPUT}"
         PATHS
@@ -132,16 +136,17 @@
       # If the expected output npy file is not found (the large file is not
       # loaded from GCS to `IREE_BENCHMARK_SUITE_DIR` benchmark suite test),
       # report error.
-      if(NOT _OUTPUT_FILE_SRC_PATH)
+      if(NOT _OUTPUT_FILE_ABS_PATH)
         message(SEND_ERROR "${_RULE_EXPECTED_OUTPUT} is not found in\n\
           ${CMAKE_CURRENT_SOURCE_DIR}\n\
           ${CMAKE_CURRENT_BINARY_DIR}\n\
           ${IREE_BENCHMARK_SUITE_DIR}\n\
           Please check if you need to download it first.")
       else()
-        file(REAL_PATH "${_OUTPUT_FILE_SRC_PATH}" _OUTPUT_FILE_SRC)
-        list(APPEND _RULE_RUNNER_ARGS "--expected_output=@${_OUTPUT_FILE_SRC}")
-        list(APPEND _SRC ${_OUTPUT_FILE_SRC})
+        file(RELATIVE_PATH _OUTPUT_FILE_RELATIVE_PATH
+          "${CMAKE_CURRENT_BINARY_DIR}" "${_OUTPUT_FILE_ABS_PATH}")
+        list(APPEND _RULE_RUNNER_ARGS "--expected_output=@${_OUTPUT_FILE_RELATIVE_PATH}")
+        list(APPEND _RUNNER_DATA ${_OUTPUT_FILE_ABS_PATH})
       endif()
     else()
       message(SEND_ERROR "Unsupported expected output file type: ${_RULE_EXPECTED_OUTPUT}")
@@ -149,9 +154,9 @@
   endif(_RULE_EXPECTED_OUTPUT)

   # Dump the flags into a flag file to avoid CMake's naive handling of spaces
-  # in expected output.
+  # in expected output. `--module_file` is coded separatedly to make it portable.
   if(_RULE_RUNNER_ARGS)
-    set(_OUTPUT_FLAGFILE "${CMAKE_CURRENT_BINARY_DIR}/${_RULE_NAME}_flagfile")
+    set(_OUTPUT_FLAGFILE "${_RULE_NAME}_flagfile")
     # Write each argument in a new line.
     string(REPLACE ";" "\n" _OUTPUT_FLAGS "${_RULE_RUNNER_ARGS}")
     file(CONFIGURE
@@ -160,7 +165,7 @@
       CONTENT
         "${_OUTPUT_FLAGS}"
     )
-    list(APPEND _SRC "${CMAKE_CURRENT_BINARY_DIR}/${_RULE_NAME}_flagfile")
+    list(APPEND _RUNNER_DATA "${CMAKE_CURRENT_BINARY_DIR}/${_RULE_NAME}_flagfile")
   endif()

   # A target specifically for the test.
@@ -186,9 +191,10 @@
     SRC
       "${_RUNNER_TARGET}"
     ARGS
+      "--module_file=${_SRC_RELATIVE_PATH}"
       "--flagfile=${_OUTPUT_FLAGFILE}"
     DATA
-      "${_SRC}"
+      "${_RUNNER_DATA}"
     WILL_FAIL
       ${_TEST_XFAIL}
     LABELS


No implicit dependency to all Qt in QtExt.

	* build-aux/cmake/modules/FindQtExt.cmake: Remove QT_INCLUDES and
	QT_LIBRARIES respectively from QT_EXT_INCLUDES and QT_EXT_LIBRARIES
	variables. Warn about using such variables.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/FindQtExt.cmake
+++ build-aux/cmake/modules/FindQtExt.cmake
@@ -54,19 +54,18 @@

 if(QT_EXT_FOUND)
   # Use this variables iff you use all those libraries otherwise you will add
-  # unused dependencies.
+  # unused dependencies. Unfortunately cmake is unable to track dependent
+  # library that are not built by itself (e.g. sdk-remote and qscintilla2).
   set(QT_EXT_LIBRARIES
     ${QT_EXT_LIBRARY}
     ${SDK_REMOTE_LIBRARY}
     ${QSCINTILLA2_LIBRARY}
-    ${QT_LIBRARIES}
     )

   set(QT_EXT_INCLUDES
     ${QT_EXT_INCLUDE_DIR}
     ${SDK_REMOTE_INCLUDE_DIR}
     ${QSCINTILLA2_INCLUDE_DIR}
-    ${QT_INCLUDES}
     )
 endif(QT_EXT_FOUND)


service.cmake small update

service.cmake small update

--- etc/service.cmake
+++ etc/service.cmake
@@ -228,7 +228,7 @@
   if(CREATE_TAR)
     add_custom_command(
       OUTPUT tarfile.o
-      COMMAND tar cf ${CREATE_TAR}.tar ${CREATE_TAR}
+      COMMAND tar cf ${TAR_RELPATH} ${CREATE_TAR}
       COMMAND cp ${TAR_RELPATH} input.bin
       COMMAND ${CMAKE_OBJCOPY} -I binary -O elf32-i386 -B i386 input.bin tarfile.o
       COMMAND rm input.bin
@@ -236,7 +236,7 @@
   elseif(CREATE_TAR_GZ)
     add_custom_command(
       OUTPUT tarfile.o
-      COMMAND tar czf ${CREATE_TAR_GZ}.tar.gz ${CREATE_TAR_GZ}
+      COMMAND tar czf ${TAR_RELPATH} ${CREATE_TAR_GZ}
       COMMAND cp ${TAR_RELPATH} input.bin
       COMMAND ${CMAKE_OBJCOPY} -I binary -O elf32-i386 -B i386 input.bin tarfile.o
       COMMAND rm input.bin


Fail in case Sphinx cannot be found

Fail in case Sphinx cannot be found

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -490,6 +490,10 @@
 if(DEVBASE_SPHINX_REQUIRED)
     # TODO Find Sphinx Python package.
     include(SphinxDoc)
+
+    if(NOT SPHINX_BUILD_EXECUTABLE OR NOT SPHINX_APIDOC_EXECUTABLE)
+        message(FATAL_ERROR "sphinx not found")
+    endif()
 endif()


Added dependency on ThirdParty zlib (if being built) for ThirdParty boost.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@4084 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -37,7 +37,12 @@
             INSTALL_COMMAND ""
             BUILD_IN_SOURCE 1
         )
-
+
+        # If building ThirdParty zlib, force zlib build before boost
+        IF (THIRDPARTY_BUILD_ZLIB)
+            ADD_DEPENDENCIES(boost zlib)
+        ENDIF(THIRDPARTY_BUILD_ZLIB)
+
         # Set up CMake variables
         SET(Boost_DATE_TIME_LIBRARY boost_date_time)
         SET(Boost_DATE_TIME_LIBRARY_DEBUG boost_date_time)


Fix detection of BOOST_HOME environmental variable.

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -92,7 +92,8 @@

     #If the user has not set BOOST_ROOT, look in a couple common places first.
     IF( NOT BOOST_ROOT )
-        IF (DEFINED($ENV{BOOST_HOME}))
+        SET(TEST_ENV ENV{BOOST_HOME})
+        IF (DEFINED TEST_ENV)
             SET(Boost_NO_SYSTEM_PATHS ON)
             SET(BOOST_ROOT $ENV{BOOST_HOME})
             FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time


upgraded MKLDNN version to V0.17.2 (#2389)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -49,7 +49,7 @@

 # This section sets up MKL as an external project to be used later by MKLDNN

-set(MKLURLROOT "https://github.com/intel/mkl-dnn/releases/download/v0.17/")
+set(MKLURLROOT "https://github.com/intel/mkl-dnn/releases/download/v0.17.2/")
 set(MKLVERSION "2019.0.1.20180928")
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     set(MKLPACKAGE "mklml_lnx_${MKLVERSION}.tgz")
@@ -90,7 +90,7 @@
 target_link_libraries(libmkl INTERFACE ${MKL_LIBS})

 set(MKLDNN_GIT_REPO_URL https://github.com/intel/mkl-dnn)
-set(MKLDNN_GIT_TAG "830a100")
+set(MKLDNN_GIT_TAG "b9ce57a")
 if(NGRAPH_LIB_VERSIONING_ENABLE)
     set(MKLDNN_PATCH_FILE mkldnn.patch)
 else()


[CMake] Fix install_targets function to accept non-header only libraries too

--- cmake/install_targets.cmake
+++ cmake/install_targets.cmake
@@ -6,7 +6,17 @@
 set( INSTALL_DIR_CMAKE share/MartCommon )
 set( CONFIG_STEM_NAME MartCommonConfig )

-install( TARGETS ${targets} EXPORT ${CONFIG_STEM_NAME} )
+include(GNUInstallDirs)
+
+# install results from compiling the targets and export the
+# relevant information into file
+install( TARGETS ${targets} EXPORT ${CONFIG_STEM_NAME}
+	RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+# install the CmakeConfig file holding the infromation about the isntalled targets
 install( EXPORT ${CONFIG_STEM_NAME}
 	FILE
 		${CONFIG_STEM_NAME}.cmake


FindAGG.cmake looks also for libaggfontfreetype.a and adds it to the AGG_LIBRARIES variable if found.

svn path=/trunk/; revision=8955

--- cmake/modules/FindAGG.cmake
+++ cmake/modules/FindAGG.cmake
@@ -35,8 +35,10 @@
   # plain name for static libraries case.
   if(BUILD_SHARED_LIBS)
     set(AGGLIB_NAMES = "agg_pic;agg")
+    set(AGGFONTLIB_NAMES = "aggfontfreetype_pic;aggfontfreetype")
   else(BUILD_SHARED_LIBS)
     set(AGGLIB_NAMES = "agg;agg_pic")
+    set(AGGFONTLIB_NAMES = "aggfontfreetype;aggfontfreetype_pic;")
   endif(BUILD_SHARED_LIBS)
   FIND_LIBRARY(AGG_LIBRARIES NAMES ${AGGLIB_NAMES}
     PATHS
@@ -44,6 +46,15 @@
     /usr/local/lib
     /usr/lib
   )
+  FIND_LIBRARY(AGGFONT_LIBRARIES NAMES ${AGGFONTLIB_NAMES}
+    PATHS
+    ${_AGGLinkDir}
+    /usr/local/lib
+    /usr/lib
+  )
+	if (AGGFONT_LIBRARIES AND AGG_LIBRARIES)
+		set(AGG_LIBRARIES ${AGG_LIBRARIES} ${AGGFONT_LIBRARIES})
+	endif (AGGFONT_LIBRARIES AND AGG_LIBRARIES)

   if (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
      set(AGG_FOUND TRUE)


Added changes from indigo branch

Added changes from indigo branch

--- cmake_modules/FindG2O.cmake
+++ cmake_modules/FindG2O.cmake
@@ -27,40 +27,40 @@
   ENDIF (G2O_INCLUDE_DIR)

   FIND_LIBRARY(G2O_CORE_LIB
-    NAMES g2o_core
-    PATHS /usr/local /usr
+    NAMES g2o_core g2o_core_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_STUFF_LIB
-    NAMES g2o_stuff
-    PATHS /usr/local /usr
+    NAMES g2o_stuff g2o_stuff_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_TYPES_SLAM2D_LIB
-    NAMES g2o_types_slam2d
-    PATHS /usr/local /usr
+    NAMES g2o_types_slam2d g2o_types_slam2d_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_TYPES_SLAM3D_LIB
-    NAMES g2o_types_slam3d
-    PATHS /usr/local /usr
+    NAMES g2o_types_slam3d g2o_types_slam3d_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_SOLVER_CHOLMOD_LIB
-    NAMES g2o_solver_cholmod
-    PATHS /usr/local /usr
+    NAMES g2o_solver_cholmod g2o_solver_cholmod_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_SOLVER_PCG_LIB
-    NAMES g2o_solver_pcg
-    PATHS /usr/local /usr
+    NAMES g2o_solver_pcg g2o_solver_pcg_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_SOLVER_CSPARSE_LIB
-    NAMES g2o_solver_csparse
+    NAMES g2o_solver_csparse g2o_solver_csparse_rd
     PATHS /usr/local /usr
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_INCREMENTAL_LIB
-    NAMES g2o_incremental
-    PATHS /usr/local /usr
+    NAMES g2o_incremental g2o_incremental_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)
   FIND_LIBRARY(G2O_CSPARSE_EXTENSION_LIB
-    NAMES g2o_csparse_extension
-    PATHS /usr/local /usr
+    NAMES g2o_csparse_extension g2o_csparse_extension_rd
+    PATHS /usr/local /usr ${CMAKE_PREFIX_PATH}
     PATH_SUFFIXES lib)

   SET(G2O_LIBRARIES ${G2O_CSPARSE_EXTENSION_LIB}


unix only now in ann.cmake

unix only now in ann.cmake

--- ann.cmake
+++ ann.cmake
@@ -24,7 +24,7 @@
     URL                 ${ann_URL}
     URL_MD5             ${ann_MD5}
     UPDATE_COMMAND      ""
-    PATCH_COMMAND       "configure_file(${PATCH_DIR}/ann.patch ${ann_SRC_DIR}/CMakeLists.txt)"
+    PATCH_COMMAND       ${BUILDEM_ENV_STRING} cp ${PATCH_DIR}/ann.patch ${ann_SRC_DIR}/CMakeLists.txt
         #${BUILDEM_ENV_STRING} ${PATCH_EXE}
     	#${ann_SRC_DIR}/CMakeLists.txt ${PATCH_DIR}/ann.patch


Only compile needed LibIGL dependencies

Only compile needed LibIGL dependencies

Added guards for their targets

--- common/cmake/MyLibIGL.cmake
+++ common/cmake/MyLibIGL.cmake
@@ -17,9 +17,9 @@
 	option (LIBIGL_WITH_NANOGUI     "Use Nanogui menu"   OFF)

 	# libigl options: choose your dependencies (by default everything is OFF except opengl)
-	option (LIBIGL_WITH_VIEWER      "Use OpenGL viewer"  ON)
-	option (LIBIGL_WITH_OPENGL      "Use OpenGL"         ON)
-	option (LIBIGL_WITH_OPENGL_GLFW "Use GLFW"           ON)
+	option (LIBIGL_WITH_VIEWER      "Use OpenGL viewer"  OFF)
+	option (LIBIGL_WITH_OPENGL      "Use OpenGL"         OFF)
+	option (LIBIGL_WITH_OPENGL_GLFW "Use GLFW"           OFF)
 	option (LIBIGL_WITH_BBW         "Use BBW"            OFF)
 	option (LIBIGL_WITH_EMBREE      "Use Embree"         OFF)
 	option (LIBIGL_WITH_PNG         "Use PNG"            OFF)
@@ -46,12 +46,20 @@
 	set_property (TARGET IGL::IGL PROPERTY INTERFACE_SOURCES ${LIBIGL_EXTRA_SOURCES})
 	set_property (TARGET IGL::IGL PROPERTY INTERFACE_LINK_LIBRARIES ${LIBIGL_LIBRARIES} ${LIBIGL_EXTRA_LIBRARIES})

-	set_property (TARGET glew         PROPERTY EXCLUDE_FROM_ALL TRUE)
-	set_property (TARGET glfw         PROPERTY EXCLUDE_FROM_ALL TRUE)
-	set_property (TARGET glfw_objects PROPERTY EXCLUDE_FROM_ALL TRUE)
+	if (TARGET glew)
+		set_property (TARGET glew         PROPERTY EXCLUDE_FROM_ALL TRUE)
+		target_compile_options (glew         PRIVATE -w)
+	endif (TARGET glew)

-	target_compile_options (glew         PRIVATE -w)
-	target_compile_options (glfw         PRIVATE -w)
-	target_compile_options (glfw_objects PRIVATE -w)
+	if (TARGET glfw)
+		set_property (TARGET glfw         PROPERTY EXCLUDE_FROM_ALL TRUE)
+		target_compile_options (glfw         PRIVATE -w)
+	endif (TARGET glfw)
+
+	if (TARGET glfw_objects)
+		set_property (TARGET glfw_objects PROPERTY EXCLUDE_FROM_ALL TRUE)
+		target_compile_options (glfw_objects PRIVATE -w)
+	endif (TARGET glfw_objects)
+
 endif (LIBIGL_FOUND AND NOT TARGET IGL::IGL)


Set MACOSX_DEPLOYMENT_TARGET to 10.9

Set MACOSX_DEPLOYMENT_TARGET to 10.9

--- projects/python.cmake
+++ projects/python.cmake
@@ -4,6 +4,7 @@
                     --prefix=<INSTALL_DIR>
                     --enable-unicode=ucs4
                     --enable-shared
+  PROCESS_ENVIRONMENT MACOSX_DEPLOYMENT_TARGET 10.9
   )
 set (pv_python_executable "${install_location}/bin/python3" CACHE INTERNAL "" FORCE)


cmake: Pass _FORTIFY_SOURCE directly to the preprocessor.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -29,9 +29,9 @@
         if (CMAKE_BUILD_TYPE)
             string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
             if (NOT CMAKE_BUILD_TYPE_LOWER MATCHES debug)
-                check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
+                check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
                 if (WITH_FORTIFY_SOURCE)
-                    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
+                    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")
                 endif (WITH_FORTIFY_SOURCE)
             endif()
         endif()


Refs #3541. Fixed error generation installer.

--- cmake/dev/generate_msvc_libraries.cmake
+++ cmake/dev/generate_msvc_libraries.cmake
@@ -71,8 +71,8 @@
         COMPONENT libraries_${platform}
         )

-    install(DIRECTORY ${PROJECT_BINARY_DIR}/eprosima_installer/${platform}/install/${DATA_INSTALL_DIR}/${PROJECT_NAME}/cmake
-        DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+    install(DIRECTORY ${PROJECT_BINARY_DIR}/eprosima_installer/${platform}/install/${DATA_INSTALL_DIR}/
+        DESTINATION ${DATA_INSTALL_DIR}
         COMPONENT cmake
         )


ORC-269: cmake fails when PROTOBUF_HOME set and libhdfs is built

Fixes #195

Signed-off-by: Owen O'Malley <54ea18af6a9d2f71f251392755b45ef039a9facd@apache.org>

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -293,7 +293,7 @@
                               -DBUILD_SHARED_HDFSPP=FALSE)

     ExternalProject_Add (libhdfspp_ep
-      DEPENDS protobuf_ep
+      DEPENDS protobuf
       URL ${LIBHDFSPP_SRC_URL}
       LOG_DOWNLOAD 0
       LOG_CONFIGURE 0


ENH: ExternalData: Optionally debug download step

During object download check for ExternalData_DEBUG_DOWNLOAD in the
environment.  If it is set then leave downloaded files with incorrect
hashes behind in the object database (under their own hash, of course).
This allows users to debug download problems by inspecting the data
returned from a server when it is not the desired object.

Change-Id: I6ffc91804aab9eb7899dd47c06ed216ee1c1bc31

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -576,6 +576,9 @@
         break()
       else()
         set(tried "${tried} (wrong hash ${algo}=${dl_hash})")
+        if("$ENV{ExternalData_DEBUG_DOWNLOAD}" MATCHES ".")
+          file(RENAME "${tmp}" "${ExternalData_OBJECT_DIR}/${algo}/${dl_hash}")
+        endif()
       endif()
     endif()
     file(REMOVE "${tmp}")


bugfix: fix error when enabling ESP32 OTA image build (#22953)

--- config/esp32/components/chip/ota-image.cmake
+++ config/esp32/components/chip/ota-image.cmake
@@ -36,9 +36,9 @@
         "--product-id"
         ${CONFIG_DEVICE_PRODUCT_ID}
         "--version"
-        ${CONFIG_DEVICE_SOFTWARE_VERSION_NUMBER}
+        ${PROJECT_VER_NUMBER}
         "--version-str"
-        ${CONFIG_DEVICE_SOFTWARE_VERSION}
+        ${PROJECT_VER}
         "--digest-algorithm"
         "sha256"
     )


Update FW: fix enabling MIPI clocks for 4-lane ports

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "47e069cc7f16d29b37e17b2923322bc9824ebed4")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "35d45ad291a6f988becc9663b6e8b2d58d4de24c")

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


px4fmu-v5:Add px4io

px4fmu-v5:Add px4io

--- cmake/configs/nuttx_px4fmu-v5_default.cmake
+++ cmake/configs/nuttx_px4fmu-v5_default.cmake
@@ -39,6 +39,7 @@
 	drivers/pwm_out_sim
 	drivers/px4flow
 	drivers/px4fmu
+	drivers/px4io
 	drivers/rgbled
 	drivers/rgbled_pwm
 	drivers/stm32


Update the documentation for the GenerateCppResourceFile module

--- cmake/modules/GenerateCppResourceFile.cmake
+++ cmake/modules/GenerateCppResourceFile.cmake
@@ -5,14 +5,17 @@
 # Currently only implemented for Unix.  Requires the 'xxd'
 # tool to be installed.
 #
-# INPUT_FILE : The name of the binary data file to be converted into a C++
-#              source file.
+# TARGET_NAME : The name of the target to generate
 #
-# CPP_FILE   : The path of the C++ source file to be generated.
-#              See the documentation for xxd for information on
-#              the structure of the generated source file.
+# INPUT_DIR   : The directory containing the input binary data file
 #
-# INPUT_FILE_TARGET : The name of the target which generates INPUT_FILE
+# INPUT_FILE  : The name of the binary data file in ${INPUT_DIR} to be converted into a C++
+#               source file.  The name of the input file will be used as the basis for the
+#               symbols in the generated C++ file referring to the data buffer and its length.
+#
+# CPP_FILE    : The path of the C++ source file to be generated.
+#               See the documentation for xxd for information on
+#               the structure of the generated source file.
 #
 function (generate_cpp_resource_file TARGET_NAME INPUT_DIR INPUT_FILE CPP_FILE)
 	add_custom_command(OUTPUT ${CPP_FILE} COMMAND cd ${INPUT_DIR} && xxd -i ${INPUT_FILE} ${CPP_FILE}


[PHi] Skip kernel declare for cuda only kernel on rocm (#39869)

* skip kernel declare for cuda only kernel on rocm

* fix error

--- cmake/pten.cmake
+++ cmake/pten.cmake
@@ -58,15 +58,21 @@
 function(kernel_declare TARGET_LIST)
     foreach(kernel_path ${TARGET_LIST})
         file(READ ${kernel_path} kernel_impl)
-        # TODO(chenweihang): rename PD_REGISTER_KERNEL to PD_REGISTER_KERNEL
-        # NOTE(chenweihang): now we don't recommend to use digit in kernel name
-        string(REGEX MATCH "(PD_REGISTER_KERNEL|PD_REGISTER_GENERAL_KERNEL)\\([ \t\r\n]*[a-z0-9_]*," first_registry "${kernel_impl}")
+        string(REGEX MATCH "(PD_REGISTER_KERNEL|PD_REGISTER_GENERAL_KERNEL)\\([ \t\r\n]*[a-z0-9_]*,[ \t\r\n\/]*[a-z0-9_]*" first_registry "${kernel_impl}")
         if (NOT first_registry STREQUAL "")
+            # some gpu kernel only can run on cuda, not support rocm, so we add this branch
+            if (WITH_ROCM)
+                string(FIND "${first_registry}" "cuda_only" pos)
+                if(pos GREATER 1)
+                    continue()
+                endif()
+            endif()
             # parse the first kernel name
             string(REPLACE "PD_REGISTER_KERNEL(" "" kernel_name "${first_registry}")
             string(REPLACE "PD_REGISTER_GENERAL_KERNEL(" "" kernel_name "${kernel_name}")
             string(REPLACE "," "" kernel_name "${kernel_name}")
             string(REGEX REPLACE "[ \t\r\n]+" "" kernel_name "${kernel_name}")
+            string(REGEX REPLACE "//cuda_only" "" kernel_name "${kernel_name}")
             # append kernel declare into declarations.h
             # TODO(chenweihang): default declare ALL_LAYOUT for each kernel
             if (${kernel_path} MATCHES "./cpu\/")


Add ${LIBGFLAGS_LIBRARY} to IMPORTED_LINK_INTERFACE_LIBRARIES of glog::glog (#9169)

Summary:
X-link: https://github.com/facebook/hhvm/pull/9169

X-link: https://github.com/facebook/wangle/pull/208

X-link: https://github.com/facebookincubator/reindeer/pull/4

X-link: https://github.com/facebookincubator/velox/pull/2445

X-link: https://github.com/facebookincubator/hsthrift/pull/98

X-link: https://github.com/facebookincubator/katran/pull/171

Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/272

X-link: https://github.com/facebook/fboss/pull/118

X-link: https://github.com/facebookincubator/fizz/pull/81

X-link: https://github.com/facebookexperimental/eden/pull/127

X-link: https://github.com/facebook/sapling-staging/pull/7

X-link: https://github.com/facebookexperimental/edencommon/pull/4

X-link: https://github.com/facebookexperimental/rust-shed/pull/34

X-link: https://github.com/facebook/fbthrift/pull/521

X-link: https://github.com/facebook/watchman/pull/1055

X-link: https://github.com/facebook/folly/pull/1854

X-link: https://github.com/facebook/openr/pull/140

X-link: https://github.com/facebook/fb303/pull/31

Previously Folly provided a polyfill of the `GflagsFlagSaver` symbol, which was removed since https://github.com/facebook/folly/commit/4dadde1256f74e756510a499c86459967f78afb9. Therefore, `glog` should solve the `GflagsFlagSaver` symbol directly from `gflags`.

This diff added `gflags` libraries as a dependency of the CMake project `glog::glog` into `fbcode_builder`'s `FindGlog.cmake`, so that the `fbcode_builder` users will be able to automatically link with `gflags`.

Reviewed By: alexeyt

Differential Revision: D39220438

fbshipit-source-id: 485d67bfeace955f83a4961372680f12eb9cc1a5

--- build/fbcode_builder/CMake/FindGlog.cmake
+++ build/fbcode_builder/CMake/FindGlog.cmake
@@ -34,4 +34,10 @@
   add_library(glog::glog UNKNOWN IMPORTED)
   set_target_properties(glog::glog PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}")
   set_target_properties(glog::glog PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${GLOG_LIBRARIES}")
+
+  find_package(Gflags)
+  if(GFLAGS_FOUND)
+    message(STATUS "Found gflags as a dependency of glog::glog, include=${LIBGFLAGS_INCLUDE_DIR}, libs=${LIBGFLAGS_LIBRARY}")
+    set_target_properties(glog::glog PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES ${LIBGFLAGS_LIBRARY})
+  endif()
 endif()


Track specific ITK commit instead of trunk

--- CMake/Superbuild/External_ITK.cmake
+++ CMake/Superbuild/External_ITK.cmake
@@ -40,7 +40,7 @@

   ExternalProject_Add( ITK
     GIT_REPOSITORY ${ITK_URL}
-    GIT_TAG ${ITK_URL_MD5_TAG}
+    GIT_TAG ${ITK_URL_OR_TAG}
     DOWNLOAD_DIR ${ITK_SOURCE_DIR}
     SOURCE_DIR ${ITK_SOURCE_DIR}
     BINARY_DIR ${ITK_DIR}


COMP: ctkMacroBuildLibWrapper: Improve configuration status messages

Status related to the decorator header is now explicitly reported. This
has the advantage of indicating what should be the expected header
name.

For example:

[...]
-- Looking for decorator header ctkDICOMWidgetsPythonQtDecorators.h
-- Looking for decorator header ctkDICOMWidgetsPythonQtDecorators.h - Found
-- Looking for decorator header ctkImageProcessingITKCorePythonQtDecorators.h
-- Looking for decorator header ctkImageProcessingITKCorePythonQtDecorators.h - Not found
[...]

--- CMake/ctkMacroBuildLibWrapper.cmake
+++ CMake/ctkMacroBuildLibWrapper.cmake
@@ -80,12 +80,17 @@
   string(REGEX REPLACE "^CTK" "ctk" lib_name_lc_ctk ${lib_name})
   set(DECORATOR_HEADER ${lib_name_lc_ctk}PythonQtDecorators.h)
   set(HAS_DECORATOR FALSE)
+
+  set(_msg "Looking for decorator header ${DECORATOR_HEADER}")
+  message(STATUS "${_msg}")
+  set(_status "Not found")
   if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DECORATOR_HEADER})
     set(HAS_DECORATOR TRUE)
     set(DECORATOR_HEADER ${DECORATOR_HEADER})
     set_source_files_properties(${DECORATOR_HEADER} WRAP_EXCLUDE)
+    set(_status "Found")
   endif()
-  #message("HAS_DECORATOR:${HAS_DECORATOR}")
+  message(STATUS "${_msg} - ${_status}")
   #message("path/to/DECORATOR_HEADER:${CMAKE_CURRENT_SOURCE_DIR}/${DECORATOR_HEADER}")

   set(KIT_PYTHONQT_SRCS) # Clear variable


ARROW-12086: [C++] Fix environment variables for bzip2, utf8proc URLs

This should fix offline builds after having run `./thirdparty/download_dependencies.sh`.

Closes #9803 from pitrou/ARROW-12086-offline-builds

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -405,6 +405,16 @@
     )
 endif()

+if(DEFINED ENV{ARROW_BZIP2_URL})
+  set(ARROW_BZIP2_SOURCE_URL "$ENV{ARROW_BZIP2_URL}")
+else()
+  set_urls(
+    ARROW_BZIP2_SOURCE_URL
+    "https://sourceware.org/pub/bzip2/bzip2-${ARROW_BZIP2_BUILD_VERSION}.tar.gz"
+    "https://github.com/ursa-labs/thirdparty/releases/download/latest/bzip2-${ARROW_BZIP2_BUILD_VERSION}.tar.gz"
+    )
+endif()
+
 if(DEFINED ENV{ARROW_CARES_URL})
   set(CARES_SOURCE_URL "$ENV{ARROW_CARES_URL}")
 else()
@@ -571,6 +581,15 @@
     )
 endif()

+if(DEFINED ENV{ARROW_UTF8PROC_URL})
+  set(ARROW_UTF8PROC_SOURCE_URL "$ENV{ARROW_UTF8PROC_URL}")
+else()
+  set_urls(
+    ARROW_UTF8PROC_SOURCE_URL
+    "https://github.com/JuliaStrings/utf8proc/archive/${ARROW_UTF8PROC_BUILD_VERSION}.tar.gz"
+    )
+endif()
+
 if(DEFINED ENV{ARROW_XSIMD_URL})
   set(XSIMD_SOURCE_URL "$ENV{ARROW_XSIMD_URL}")
 else()
@@ -595,25 +614,6 @@
     ZSTD_SOURCE_URL
     "https://github.com/facebook/zstd/archive/${ARROW_ZSTD_BUILD_VERSION}.tar.gz"
     "https://github.com/ursa-labs/thirdparty/releases/download/latest/zstd-${ARROW_ZSTD_BUILD_VERSION}.tar.gz"
-    )
-endif()
-
-if(DEFINED ENV{ARROW_BZIP2_SOURCE_URL})
-  set(ARROW_BZIP2_SOURCE_URL "$ENV{ARROW_BZIP2_SOURCE_URL}")
-else()
-  set_urls(
-    ARROW_BZIP2_SOURCE_URL
-    "https://sourceware.org/pub/bzip2/bzip2-${ARROW_BZIP2_BUILD_VERSION}.tar.gz"
-    "https://github.com/ursa-labs/thirdparty/releases/download/latest/bzip2-${ARROW_BZIP2_BUILD_VERSION}.tar.gz"
-    )
-endif()
-
-if(DEFINED ENV{ARROW_UTF8PROC_SOURCE_URL})
-  set(ARROW_UTF8PROC_SOURCE_URL "$ENV{ARROW_UTF8PROC_SOURCE_URL}")
-else()
-  set_urls(
-    ARROW_UTF8PROC_SOURCE_URL
-    "https://github.com/JuliaStrings/utf8proc/archive/${ARROW_UTF8PROC_BUILD_VERSION}.tar.gz"
     )
 endif()


Put FULL_DOCS for ExternalProject_Add on one lin for cmake 2.6

--- build/cmake/ExternalProjectPatched.cmake
+++ build/cmake/ExternalProjectPatched.cmake
@@ -208,15 +208,13 @@
 define_property(DIRECTORY PROPERTY "EP_BASE" INHERITED
   BRIEF_DOCS "Base directory for External Project storage."
   FULL_DOCS
-  "See documentation of the ExternalProject_Add() function in the "
-  "ExternalProject module."
+  "See documentation of the ExternalProject_Add() function in the ExternalProject module."
   )

 define_property(DIRECTORY PROPERTY "EP_PREFIX" INHERITED
   BRIEF_DOCS "Top prefix for External Project storage."
   FULL_DOCS
-  "See documentation of the ExternalProject_Add() function in the "
-  "ExternalProject module."
+  "See documentation of the ExternalProject_Add() function in the ExternalProject module."
   )


Don't run compile tests unless package is found

https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/6063082

--- cmake/find-modules/FindGTestSources.cmake
+++ cmake/find-modules/FindGTestSources.cmake
@@ -41,53 +41,58 @@
                                        NO_CMAKE_ENVIRONMENT_PATH)
 endif()

-set(_cmake_include_dirs ${CMAKE_REQUIRED_INCLUDES})
+set(GTestSources_VERSION GTestSources_VERSION-NOT_FOUND)

-include(CheckCXXSourceCompiles)
-list(APPEND CMAKE_REQUIRED_INCLUDES ${GTestSources_INCLUDE_DIR})
+if(GTestSources_SOURCE_DIR AND GTestSources_INCLUDE_DIR)
+    set(_cmake_include_dirs ${CMAKE_REQUIRED_INCLUDES})

-check_cxx_source_compiles("
-        #include <gtest/gtest.h>
-        int main() {
-            typedef const char* (testing::TestInfo::*fun)() const;
-            fun f = &testing::TestInfo::type_param;
-            return 0;
-        }"
-    _gtest_compatible_1_6_0)
+    include(CheckCXXSourceCompiles)
+    list(APPEND CMAKE_REQUIRED_INCLUDES ${GTestSources_INCLUDE_DIR})

-check_cxx_source_compiles("
-        #include <gtest/gtest.h>
-        int main() {
-            typedef bool (testing::TestInfo::*fun)() const;
-            fun f = &testing::TestInfo::is_reportable;
-            return 0;
-        }"
-    _gtest_compatible_1_7_0)
+    check_cxx_source_compiles("
+            #include <gtest/gtest.h>
+            int main() {
+                typedef const char* (testing::TestInfo::*fun)() const;
+                fun f = &testing::TestInfo::type_param;
+                return 0;
+            }"
+        _gtest_compatible_1_6_0)

-check_cxx_source_compiles("
-        #include <gtest/gtest.h>
-        int main() {
-            typedef const char* (testing::TestInfo::*fun)() const;
-            fun f = &testing::TestInfo::file;
-            return 0;
-        }"
-    _gtest_compatible_1_8_0)
+    check_cxx_source_compiles("
+            #include <gtest/gtest.h>
+            int main() {
+                typedef bool (testing::TestInfo::*fun)() const;
+                fun f = &testing::TestInfo::is_reportable;
+                return 0;
+            }"
+        _gtest_compatible_1_7_0)

-if(_gtest_compatible_1_8_0)
-    set(GTestSources_VERSION 1.8.0)
-elseif(_gtest_compatible_1_7_0)
-    set(GTestSources_VERSION 1.7.0)
-elseif(_gtest_compatible_1_6_0)
-    set(GTestSources_VERSION 1.6.0)
-else()
-    message(STATUS "FindGTestSources.cmake reports unhandled GTest version (<1.6.0)")
-    set(GTestSources_VERSION GTestSources_VERSION-NOT_FOUND)
+    check_cxx_source_compiles("
+            #include <gtest/gtest.h>
+            int main() {
+                typedef const char* (testing::TestInfo::*fun)() const;
+                fun f = &testing::TestInfo::file;
+                return 0;
+            }"
+        _gtest_compatible_1_8_0)
+
+    if(_gtest_compatible_1_8_0)
+        set(GTestSources_VERSION 1.8.0)
+    elseif(_gtest_compatible_1_7_0)
+        set(GTestSources_VERSION 1.7.0)
+    elseif(_gtest_compatible_1_6_0)
+        set(GTestSources_VERSION 1.6.0)
+    else()
+        message(STATUS "FindGTestSources.cmake reports unhandled GTest version (<1.6.0)")
+    endif()
+
+    set(CMAKE_REQUIRED_INCLUDES "${_cmake_include_dirs}")
+    unset(_cmake_include_dirs)
 endif()

-set(CMAKE_REQUIRED_INCLUDES "${_cmake_include_dirs}")
-
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GTestSources REQUIRED_VARS GTestSources_SOURCE_DIR
+find_package_handle_standard_args(GTestSources FOUND_VAR GTestSources_FOUND
+                                               REQUIRED_VARS GTestSources_SOURCE_DIR
                                                              GTestSources_INCLUDE_DIR
                                                VERSION_VAR GTestSources_VERSION)


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/puffin-buffer/hunter.cmake
+++ cmake/projects/puffin-buffer/hunter.cmake
@@ -5,6 +5,17 @@
 include(hunter_pick_scheme)

 # List of versions here...
+
+hunter_add_version(
+    PACKAGE_NAME
+    puffin-buffer
+    VERSION
+    "0.3.2.0"
+    URL
+    "https://github.com/designerror/puffin-buffer/archive/v0.3.2.0.tar.gz"
+    SHA1
+    7df80c3170766166cb59094eb85ac427469d882e
+)

 hunter_add_version(
     PACKAGE_NAME


refs #4871 fix gtags generation

refs #4871 fix gtags generation

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

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


more cleanups

more cleanups

--- cmake/ospray_macros.cmake
+++ cmake/ospray_macros.cmake
@@ -367,29 +367,22 @@
   # unhide compiler to make it easier for users to see what they are using
   MARK_AS_ADVANCED(CLEAR CMAKE_CXX_COMPILER)

+  SET(OSPRAY_COMPILER_ICC   OFF)
+  SET(OSPRAY_COMPILER_GCC   OFF)
+  SET(OSPRAY_COMPILER_CLANG OFF)
+  SET(OSPRAY_COMPILER_MSVC  OFF)
+
   IF (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
-    SET(OSPRAY_COMPILER_ICC   ON )
-    SET(OSPRAY_COMPILER_GCC   OFF)
-    SET(OSPRAY_COMPILER_CLANG OFF)
-    SET(OSPRAY_COMPILER_MSVC  OFF)
+    SET(OSPRAY_COMPILER_ICC ON)
     INCLUDE(icc)
   ELSEIF (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-    SET(OSPRAY_COMPILER_ICC   OFF)
-    SET(OSPRAY_COMPILER_GCC   ON )
-    SET(OSPRAY_COMPILER_CLANG OFF)
-    SET(OSPRAY_COMPILER_MSVC  OFF)
+    SET(OSPRAY_COMPILER_GCC ON)
     INCLUDE(gcc)
   ELSEIF (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    SET(OSPRAY_COMPILER_ICC   OFF)
-    SET(OSPRAY_COMPILER_GCC   OFF)
-    SET(OSPRAY_COMPILER_CLANG ON )
-    SET(OSPRAY_COMPILER_MSVC  OFF)
+    SET(OSPRAY_COMPILER_CLANG ON)
     INCLUDE(clang)
   ELSEIF (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
-    SET(OSPRAY_COMPILER_ICC   OFF)
-    SET(OSPRAY_COMPILER_GCC   OFF)
-    SET(OSPRAY_COMPILER_CLANG OFF)
-    SET(OSPRAY_COMPILER_MSVC  ON )
+    SET(OSPRAY_COMPILER_MSVC ON)
     INCLUDE(msvc)
   ELSE()
     MESSAGE(FATAL_ERROR


Print info about cache directory

Print info about cache directory

--- cmake/modules/hunter_save_to_cache.cmake
+++ cmake/modules/hunter_save_to_cache.cmake
@@ -172,6 +172,9 @@

   file(SHA1 "${temp_deps_info}" deps_sha1)
   hunter_make_directory("${cache_meta_dir}" "${deps_sha1}" cache_meta_dir)
+
+  hunter_status_debug("Cache directory: ${cache_meta_dir}")
+
   set(deps_info "${cache_meta_dir}/deps.info")
   file(RENAME "${temp_deps_info}" "${deps_info}")


cmake: improved configuration of numpy include dir

--- config/FindVIGRANUMPY_DEPENDENCIES.cmake
+++ config/FindVIGRANUMPY_DEPENDENCIES.cmake
@@ -10,14 +10,14 @@
     FIND_PACKAGE(PythonLibs)
     IF(NOT PYTHONLIBS_FOUND)
         # fallback when standard search does not work
-        execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
+        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
                          "import sys; skip = 2 if sys.platform.startswith('win') else 1; print 'python' + sys.version[0:3:skip]"
                           OUTPUT_VARIABLE PYTHON_LIBRARY_NAME OUTPUT_STRIP_TRAILING_WHITESPACE)
-        execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
+        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
                          "import sys; print sys.exec_prefix"
                           OUTPUT_VARIABLE PYTHON_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
         FIND_LIBRARY(PYTHON_LIBRARIES ${PYTHON_LIBRARY_NAME} "${PYTHON_PREFIX}/libs")
-        execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
+        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
                         "from distutils.sysconfig import *; print get_python_inc()"
                          OUTPUT_VARIABLE PYTHON_INCLUDE OUTPUT_STRIP_TRAILING_WHITESPACE)
         SET(PYTHON_INCLUDE_PATH ${PYTHON_INCLUDE}
@@ -35,7 +35,7 @@
     #
     ######################################################################
     IF(NOT DEFINED VIGRANUMPY_INSTALL_DIR OR VIGRANUMPY_INSTALL_DIR MATCHES "^$")
-        execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
+        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
                          "from distutils.sysconfig import *; print get_python_lib(1)"
                           OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
         FILE(TO_CMAKE_PATH ${PYTHON_SITE_PACKAGES} VIGRANUMPY_INSTALL_DIR)
@@ -53,8 +53,10 @@
     #
     ######################################################################
     IF(NOT PYTHON_NUMPY_INCLUDE_DIR)
-        execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                         "from numpy.distutils.misc_util import *; print ' '.join(get_numpy_include_dirs())"
+        # Note: we must suppress possible output of the 'from numpy... import *' command,
+        #       because the output cannot be interpreted correctly otherwise
+        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
+                         "import sys, os; sys.stdout = open(os.devnull, 'w'); from numpy.distutils.misc_util import *; sys.__stdout__.write(' '.join(get_numpy_include_dirs()))"
                           RESULT_VARIABLE PYTHON_NUMPY_NOT_FOUND
                           OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
                           OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -78,7 +80,7 @@
     #      check if nosetests are installed
     #
     ######################################################################
-    execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
+    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
                      "import nose"
                       RESULT_VARIABLE PYTHON_NOSETESTS_NOT_FOUND)

@@ -93,7 +95,7 @@
     #      check if sphinx documentation generator is installed
     #
     ######################################################################
-    find_program ( PYTHON_SPHINX sphinx-build "${PYTHON_PREFIX}/Scripts")
+    find_program(PYTHON_SPHINX sphinx-build "${PYTHON_PREFIX}/Scripts")

     IF(NOT PYTHON_SPHINX)
         MESSAGE(STATUS "Could NOT find sphinx documentation generator")
@@ -106,7 +108,7 @@
     #      find Python platform
     #
     ######################################################################
-    execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
+    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
                      "import sys; p = sys.platform; print 'windows' if p.startswith('win') else p"
                       OUTPUT_VARIABLE PYTHON_PLATFORM OUTPUT_STRIP_TRAILING_WHITESPACE)


ios toolchain: store values in environment variables

--- ios/iOS.cmake
+++ ios/iOS.cmake
@@ -28,9 +28,9 @@
 set (IOS True)

 # Force the compilers to gcc for iOS
-include (CMakeForceCompiler)
-#CMAKE_FORCE_C_COMPILER (clang clang)
-#CMAKE_FORCE_CXX_COMPILER (clang++ clang++)
+#include (CMakeForceCompiler)
+#CMAKE_FORCE_C_COMPILER (/usr/bin/clang clang)
+#CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ clang++)
 #CMAKE_FORCE_C_COMPILER (gcc gcc)
 #CMAKE_FORCE_CXX_COMPILER (g++ g++)

@@ -89,24 +89,36 @@
 endif (${IOS_PLATFORM} STREQUAL "OS")

 # Setup iOS developer location
-if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
-	set (CMAKE_IOS_DEVELOPER_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
-endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
-set (CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform")
+message(STATUS "Developer root: ${CMAKE_IOS_DEVELOPER_ROOT}")
+if (DEFINED CMAKE_IOS_DEVELOPER_ROOT)
+    set(ENV{_CMAKE_IOS_DEVELOPER_ROOT} "${CMAKE_IOS_DEVELOPER_ROOT}")
+elseif(NOT $ENV{_CMAKE_IOS_DEVELOPER_ROOT})
+	set(CMAKE_IOS_DEVELOPER_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
+    set(ENV{_CMAKE_IOS_DEVELOPER_ROOT} "${CMAKE_IOS_DEVELOPER_ROOT}")
+else()
+    set(CMAKE_IOS_DEVELOPER_ROOT "$ENV{_CMAKE_IOS_DEVELOPER_ROOT}")
+endif()
+set(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform")

-# Find and use the most recent iOS sdk
-if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
+# Find and use the most recent iOS sdk
+message(STATUS "SDK root: ${CMAKE_IOS_SDK_ROOT}")
+if(DEFINED CMAKE_IOS_SDK_ROOT)
+    set(ENV{_CMAKE_IOS_SDK_ROOT} "${CMAKE_IOS_SDK_ROOT}")
+elseif(NOT $ENV{_CMAKE_IOS_SDK_ROOT})
 	file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
 	if (_CMAKE_IOS_SDKS)
 		list (SORT _CMAKE_IOS_SDKS)
 		list (REVERSE _CMAKE_IOS_SDKS)
 		list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
+        set(ENV{_CMAKE_IOS_SDK_ROOT} "${CMAKE_IOS_SDK_ROOT}")
 	else (_CMAKE_IOS_SDKS)
-		message (FATAL_ERROR "No iOS SDK's found in default seach path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
+		message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
 	endif (_CMAKE_IOS_SDKS)
 	message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
-endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
-set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")
+else()
+    set(CMAKE_IOS_SDK_ROOT "$ENV{_CMAKE_IOS_SDK_ROOT}")
+endif()
+set(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")

 # Set the sysroot default to the most recent SDK
 set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support")


[FIX] Added -D to set definition correctly.

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -153,7 +153,7 @@
     endif ()

     # Enable global exception handler for all seqan apps.
-    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} SEQAN_INSTALL_GLOBAL_EXCEPTION_HANDLER")
+    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} -DSEQAN_INSTALL_GLOBAL_EXCEPTION_HANDLER")

     # Get all direct entries of the current source directory into ENTRIES.
     file (GLOB ENTRIES
@@ -653,7 +653,7 @@
     endif (${ARGC} GREATER 0)

     # Enable global exception handler for demos.
-    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} SEQAN_INSTALL_GLOBAL_EXCEPTION_HANDLER")
+    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} -DSEQAN_INSTALL_GLOBAL_EXCEPTION_HANDLER")

     # Install demo source files when releasing and build demos when developing.
     if ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE")
@@ -691,7 +691,7 @@
             CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")

     # Add global exception handler
-    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} SEQAN_INSTALL_GLOBAL_EXCEPTION_HANDLER")
+    set (SEQAN_DEFINITIONS "${SEQAN_DEFINITIONS} -DSEQAN_INSTALL_GLOBAL_EXCEPTION_HANDLER")

     # Conditionally enable coverage mode by setting the appropriate flags.
     if (MODEL STREQUAL "NightlyCoverage")


[FIX] Removing PARENT_SCOPE again for unused parameter flag.

Why did I add this earlier?

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -540,7 +540,7 @@

     # Supress unused parameter warnings for demos.
     if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
-        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter" PARENT_SCOPE)
+        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter")
     endif (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)

     # Add all demos with found flags in SeqAn.


Fix debian package generation and generate them by default. Note: python3-arcus does not exist yet and is installed via arcus, this is a bug with arcus

Signed-off-by: Olliver Schinagl <c2b00b164e77d062bb96d92afab05cfb12030d5f@ultimaker.com>

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -4,28 +4,29 @@
 set(CPACK_PACKAGE_VERSION_MAJOR 15)
 set(CPACK_PACKAGE_VERSION_MINOR 05)
 set(CPACK_PACKAGE_VERSION_PATCH 93)
+set(CPACK_GENERATOR "DEB;RPM")

 set(RPM_REQUIRES
     "python3 >= 3.4.0"
     "python3-qt5 >= 5.4.0"
     "qt5-qtquickcontrols >= 5.4.0"
-    "python3-arcus >= 15.05.90"
+    "arcus >= 15.05.90"
 )
 string(REPLACE ";" "," RPM_REQUIRES "${RPM_REQUIRES}")
 set(CPACK_RPM_PACKAGE_REQUIRES ${RPM_REQUIRES})

 set(DEB_DEPENDS
-    "python3 >= 3.4.0"
-    "python3-pyqt5 >= 5.4.0"
-    "python3-pyqt5.qtopengl >= 5.4.0"
-    "python3-pyqt5.qtquick >= 5.4.0"
-    "python3-pyqt5.qtsvg >= 5.4.0"
-    "qml-module-qtquick2 >= 5.4.0"
-    "qml-module-qtquick-window2 >= 5.4.0"
-    "qml-module-qtquick-layouts >= 5.4.0"
-    "qml-module-qtquick-dialogs >= 5.4.0"
-    "qml-module-qtquick-controls >= 5.4.0"
-    "python3-arcus >= 15.05.90"
+    "python3 (>= 3.4.0)"
+    "python3-pyqt5 (>= 5.4.0)"
+    "python3-pyqt5.qtopengl (>= 5.4.0)"
+    "python3-pyqt5.qtquick (>= 5.4.0)"
+    "python3-pyqt5.qtsvg (>= 5.4.0)"
+    "qml-module-qtquick2 (>= 5.4.0)"
+    "qml-module-qtquick-window2 (>= 5.4.0)"
+    "qml-module-qtquick-layouts (>= 5.4.0)"
+    "qml-module-qtquick-dialogs (>= 5.4.0)"
+    "qml-module-qtquick-controls (>= 5.4.0)"
+    "arcus (>= 15.05.90)"
 )
 string(REPLACE ";" "," DEB_DEPENDS "${DEB_DEPENDS}")
 set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS})


changed CDash to viennastar.iue.tuwien.ac.at

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,6 +8,6 @@
 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "frudo.iue.tuwien.ac.at:50080")
+set(CTEST_DROP_SITE "viennastar.iue.tuwien.ac.at")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ViennaMath")
 set(CTEST_DROP_SITE_CDASH TRUE)


Add HTTPS submission to CTestConfig.cmake

Change the url of submission the OSEHRA CDash instance to HTTPS.  Add a
line which removes the curl check for certificate validation.

Change-Id: Id12bc0f9d9be00c13ff93064b523c23743b04805

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -22,7 +22,12 @@
 set(CTEST_PROJECT_NAME "Open Source EHR")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

-set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_METHOD "https")
 set(CTEST_DROP_SITE "code.osehra.org")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Open+Source+EHR")
 set(CTEST_DROP_SITE_CDASH TRUE)
+
+## Eliminate the Certificate verification for CDash/submit
+set(CTEST_CURL_OPTIONS
+  "CURLOPT_SSL_VERIFYPEER_OFF"
+  "CURLOPT_SSL_VERIFYHOST_OFF")


Removed CDash config

Removed CDash config

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,13 +0,0 @@
-## This file should be placed in the root directory of your project.
-## Then modify the CMakeLists.txt file in the root directory of your
-## project to incorporate the testing dashboard.
-## # The following are required to uses Dart and the Cdash dashboard
-##   ENABLE_TESTING()
-##   INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "GLM")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
-
-set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=GLM")
-set(CTEST_DROP_SITE_CDASH TRUE)


swap 3.2 <-> default CTestConfig.cmake file

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -4,10 +4,14 @@
 ## # The following are required to uses Dart and the Cdash dashboard
 ##   ENABLE_TESTING()
 ##   INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "Eigen3.2")
+set(CTEST_PROJECT_NAME "Eigen")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "manao.inria.fr")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen3.2")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen")
 set(CTEST_DROP_SITE_CDASH TRUE)
+set(CTEST_PROJECT_SUBPROJECTS
+Official
+Unsupported
+)


refs #5537 suppress spurious build warnings about ranlib

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -217,6 +217,11 @@
 list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE "log_print.cc")

 list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
-  "xz-4.999.9beta/src/liblzma"              # don't complain about warnings in xz source
-  "clang: warning: unknown warning option"  # don't complain about clang missing warnings from xz code
-  )
+  # don't complain about warnings in xz source
+  "xz-4.999.9beta/src/liblzma"
+  # don't complain about clang missing warnings from xz code
+  "clang: warning: unknown warning option"
+  # don't complain about ranlib on empty archive
+  "ranlib: file: .* has no symbols"
+  "ranlib: warning for library: .* the table of contents is empty"
+  )


Don't find 'cgraph'

Don't find 'cgraph'

--- salome_adm/cmake_files/FindGraphviz.cmake
+++ salome_adm/cmake_files/FindGraphviz.cmake
@@ -46,11 +46,11 @@
   ${GRAPHVIZ_pathplan_LIBRARY}
   )

-# Don't detect cgraph on Windows
-IF(NOT WIN32)
-  FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY   NAMES cgraph PATH_SUFFIXES bin)
-  SET(GRAPHVIZ_LIBRARIES ${GRAPHVIZ_cgraph_LIBRARY})
-ENDIF()
+## Don't detect cgraph on Windows
+#IF(NOT WIN32)
+#  FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY   NAMES cgraph PATH_SUFFIXES bin)
+#  SET(GRAPHVIZ_LIBRARIES ${GRAPHVIZ_cgraph_LIBRARY})
+#ENDIF()

 # Handle the standard arguments of the find_package() command:
 INCLUDE(FindPackageHandleStandardArgs)


test: Tolerate warnings about unknown float abi

When running with an 'arm' target architecture, Clang warns:

 warning: unknown platform, assuming -mfloat-abi=soft

Tolerate this warning in test output by removing it before matching.

--- test/run.cmake
+++ test/run.cmake
@@ -49,6 +49,7 @@
 set(default_stderr "^$")

 foreach(o result stdout stderr ${maybe_xml})
+  string(REGEX REPLACE "(^|\n)warning: unknown platform, assuming -mfloat-abi=soft\n" "\\1" actual_${o} "${actual_${o}}")
   string(REGEX REPLACE "\n+$" "" actual_${o} "${actual_${o}}")
   string(REGEX REPLACE "\n" "\n actual-${o}> " actual-${o} " actual-${o}> ${actual_${o}}")
   set(actual-${o} "Actual ${o}:\n${actual-${o}}\n")


Doxygen: Use ivw_private_format_doxy_arg instead of string(JOIN

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -135,7 +135,7 @@

     string(TOLOWER ${ARG_NAME} name_lower)

-    string(JOIN " \\ \n" example_paths ${IVW_EXTERNAL_MODULES} )
+    ivw_private_format_doxy_arg(example_paths ${IVW_EXTERNAL_MODULES})

     set(doxyfile "\
 PROJECT_NAME           = \"${ARG_NAME}\"


[cmake] fix boost location, disable lto

[cmake] fix boost location, disable lto

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -133,15 +133,12 @@
 	"/opt/boost-1.48" CACHE STRING
 	"" )

-FIND_PACKAGE(Boost 1.42.0 REQUIRED)
+FIND_PACKAGE(Boost 1.48.0 REQUIRED)
 INCLUDE_DIR(${Boost_INCLUDE_DIR})
 FIND_PACKAGE( PkgConfig )
 pkg_check_modules( CCGNU REQUIRED libccgnu2 )
 ADD_CXX_FLAGS( "${CCGNU_CFLAGS}")
-<<<<<<< HEAD
 ADD_CXX_FLAGS( "-DHAVE_GRIDTYPE" )
-=======
->>>>>>> core module lib location change
 INCLUDE_SYS_DIR(${Boost_INCLUDE_DIR})

 #try to enable link-time-optimisation


[cmake] removed include_dir

[cmake] removed include_dir

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -14,16 +14,6 @@
 #   string(STRIP ${NEW_LIST_SPACE} NEW_LIST_SPACE)
   set(${OUTPUT_VAR} "${NEW_LIST_SPACE}" PARENT_SCOPE)
 endfunction()
-
-MACRO(INCLUDE_DIR)
-	FOREACH( ARG ${ARGN} )
-		IF(IS_DIRECTORY ${ARG} )
-			INCLUDE_DIRECTORIES(${ARG})
-		ELSE(IS_DIRECTORY ${ARG} )
-			MESSAGE( STATUS "Include directory ${ARG} does not exist" )
-		ENDIF(IS_DIRECTORY ${ARG} )
-    ENDFOREACH( ARG )
-ENDMACRO(INCLUDE_DIR)

 MACRO(INCLUDE_SYS_DIR)
 	FOREACH( ARG ${ARGN} )