GC HAVE_BCOPY.

GC HAVE_BCOPY.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -18,9 +18,6 @@

 /* Define to 1 if you have the `backtrace' function. */
 #cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}
-
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY

 /* Define to 1 if you have the <CrashReporterClient.h> header file. */
 #undef HAVE_CRASHREPORTERCLIENT_H


Disable InlineVector tests for valgrind tests

Solution with custom new[] doesn't seem to work with valgrind

--- cmake/Testing.cmake
+++ cmake/Testing.cmake
@@ -83,7 +83,7 @@
       AND NOT ${TEST_TARGET} STREQUAL "runBiodynamoTests_resource_manager_aos_test"
       AND NOT ${TEST_TARGET} STREQUAL "runBiodynamoTests_so_pointer_aos_test")
     # filter out SchedulerTest.Backup because of timing issue
-    add_test(NAME "valgrind_${TEST_TARGET}" COMMAND ${CMAKE_SOURCE_DIR}/util/valgrind.sh ./${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup:ResourceManagerTest.SortAndApplyOnAllElementsParallel*)
+    add_test(NAME "valgrind_${TEST_TARGET}" COMMAND ${CMAKE_SOURCE_DIR}/util/valgrind.sh ./${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup:ResourceManagerTest.SortAndApplyOnAllElementsParallel*:InlineVector*)
   endif()

   add_dependencies(check ${TEST_TARGET})


FIX: merge objects to static lib

FIX: merge objects to static lib

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -146,9 +146,9 @@
     set(outlibfile "$<TARGET_FILE:${TARGET_NAME}>")

     foreach(lib ${libs})
-    add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
-      COMMAND ${CMAKE_AR} ru ${outlibfile} @"../${objlistfile}"
-      WORKING_DIRECTORY ${objdir})
+      add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
+      COMMAND ${CMAKE_AR} ru ${outlibfile} @"../${lib}.objlist"
+      WORKING_DIRECTORY ${lib}.objdir)
     endforeach()

     add_custom_command(TARGET ${TARGET_NAME} POST_BUILD


cmake: kconfig: Fix broken menuconfig due to misspelling

Due to a misspelling in the existence check for the stored checksum
file, zephyr/.config was always regenerated from the config fragments
(e.g. prj.conf), overwriting any custom zephyr/.config configuration
done in e.g. menuconfig.

This bug was introduced by commit 5402662dd9611 ("cmake: kconfig: Fix
rerunning cmake after Kconfig warnings").

Fixes: #9270

Signed-off-by: Ulf Magnusson <01743f1c1deb1fe75271d62edb65757d98ac0bcb@nordicsemi.no>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -106,7 +106,7 @@
 set(CREATE_NEW_DOTCONFIG 1)
 # Check if the checksum file exists too before trying to open it, though it
 # should under normal circumstances
-if(EXISTS ${DOTCONFIG} AND EXISTS ${merge_config_file_checksum_file})
+if(EXISTS ${DOTCONFIG} AND EXISTS ${merge_config_files_checksum_file})
   # Read out what the checksum was previously
   file(READ
     ${merge_config_files_checksum_file}


remove stale mpi references in CPack config

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -89,9 +89,6 @@
 set(CPACK_COMPONENT_APPS_DISPLAY_NAME "Applications")
 set(CPACK_COMPONENT_APPS_DESCRIPTION "Example and viewer applications and tutorials demonstrating how to use OSPRay.")

-set(CPACK_COMPONENT_MPI_DISPLAY_NAME "MPI Module")
-set(CPACK_COMPONENT_MPI_DESCRIPTION "OSPRay module for MPI-based distributed rendering.")
-
 set(CPACK_COMPONENT_REDIST_DISPLAY_NAME "Redistributables")
 set(CPACK_COMPONENT_REDIST_DESCRIPTION "Dependencies of OSPRay (such as Embree, TBB, imgui) that may or may not be already installed on your system.")

@@ -101,7 +98,6 @@
 # dependencies between components
 set(CPACK_COMPONENT_DEVEL_DEPENDS lib)
 set(CPACK_COMPONENT_APPS_DEPENDS lib)
-set(CPACK_COMPONENT_MPI_DEPENDS lib)
 set(CPACK_COMPONENT_LIB_REQUIRED ON) # always install the libs
 set(CPACK_COMPONENT_TEST_DEPENDS lib)

@@ -128,7 +124,7 @@
     set(CPACK_WIX_ROOT_FEATURE_DESCRIPTION "OSPRay is an open source, scalable, and portable ray tracing engine for high-performance, high-fidelity visualization.")
     set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT http://www.ospray.org/)
     set(CPACK_PACKAGE_NAME "OSPRay v${OSPRAY_VERSION}")
-    set(CPACK_COMPONENTS_ALL lib devel apps mpi redist)
+    set(CPACK_COMPONENTS_ALL lib devel apps redist)
     set(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\OSPRay v${OSPRAY_VERSION_MAJOR}")
     math(EXPR OSPRAY_VERSION_NUMBER "10000*${OSPRAY_VERSION_MAJOR} + 100*${OSPRAY_VERSION_MINOR} + ${OSPRAY_VERSION_PATCH}")
     set(CPACK_WIX_PRODUCT_GUID "9D64D525-2603-4E8C-9108-845A146${OSPRAY_VERSION_NUMBER}")
@@ -163,7 +159,7 @@
     set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
   else()
     set(CPACK_GENERATOR RPM)
-    set(CPACK_COMPONENTS_ALL lib devel apps mpi)
+    set(CPACK_COMPONENTS_ALL lib devel apps)
     if (OSPRAY_ENABLE_TESTING)
       list(APPEND CPACK_COMPONENTS_ALL test)
     endif()
@@ -180,7 +176,6 @@
       set(CPACK_RPM_lib_PACKAGE_REQUIRES ${OSPLIB_REQS})
       set(CPACK_RPM_apps_PACKAGE_REQUIRES "ospray-lib >= ${OSPRAY_VERSION}")
       set(CPACK_RPM_devel_PACKAGE_REQUIRES "ospray-lib = ${OSPRAY_VERSION}, ispc >= ${ISPC_VERSION_REQUIRED}")
-      set(CPACK_RPM_mpi_PACKAGE_REQUIRES "ospray-lib = ${OSPRAY_VERSION}")
       set(CPACK_RPM_test_PACKAGE_REQUIRES "ospray-lib = ${OSPRAY_VERSION}")
     endif()

@@ -207,8 +202,6 @@
     file(WRITE ${SCRIPT_FILE_LDCONFIG} "/sbin/ldconfig")
     set(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${SCRIPT_FILE_LDCONFIG})
     set(CPACK_RPM_lib_POST_UNINSTALL_SCRIPT_FILE ${SCRIPT_FILE_LDCONFIG})
-    set(CPACK_RPM_mpi_POST_INSTALL_SCRIPT_FILE ${SCRIPT_FILE_LDCONFIG})
-    set(CPACK_RPM_mpi_POST_UNINSTALL_SCRIPT_FILE ${SCRIPT_FILE_LDCONFIG})
     set(CPACK_RPM_apps_POST_INSTALL_SCRIPT_FILE ${SCRIPT_FILE_LDCONFIG})
     set(CPACK_RPM_apps_POST_UNINSTALL_SCRIPT_FILE ${SCRIPT_FILE_LDCONFIG})
   endif()


Fix: 'sed: illegal option -- -' on OSX (#1658)

Not sure why `--regexp-extended` was in there in the first place...

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1,6 +1,6 @@
 find_package(Git)
 if(Git_FOUND)
-    execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags  | cut -c 2- | tr -d '\n' | sed --regexp-extended s/-/./"
+    execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags  | cut -c 2- | tr -d '\n' | sed s/-/./"
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         OUTPUT_VARIABLE PROJECT_VERSION_GIT
         )


Some minor norelevant modifications to FindECF

--- cmake/FindECF.cmake
+++ cmake/FindECF.cmake
@@ -1,11 +1,11 @@
 # - Try to find ECF
 # Once done this will define
-#  ECF_FOUND - System has Aquila
-#  ECF_INCLUDE_DIRS - The Aquila include directories
-#  ECF_LIBRARIES - The libraries needed to use Aquila
-#  ECF_DEFINITIONS - Compiler switches required for using Aquila
+#  ECF_FOUND - System has ECF
+#  ECF_INCLUDE_DIRS - The ECF include directories
+#  ECF_LIBRARIES - The libraries needed to use ECF
+#  ECF_DEFINITIONS - Compiler switches required for using ECF

-#set(AQUILA_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
+#set(ECF_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})

 find_path(ECF_INCLUDE_DIR ECF.h
   $ENV{ECF_DIR}
@@ -18,6 +18,5 @@

 mark_as_advanced(ECF_INCLUDE_DIR ECF_LIBRARY )

-#set(AQUILA_DEFINITIONS -std=c++11 )
 set(ECF_INCLUDE_DIRS ${ECF_INCLUDE_DIR} )
 set(ECF_LIBRARIES ${ECF_LIBRARY} )


GRT_LIBRARY instead GRT_LIBRARIES

GRT_LIBRARY instead GRT_LIBRARIES

--- cmake/FindGrt.cmake
+++ cmake/FindGrt.cmake
@@ -14,7 +14,7 @@
 find_package(PkgConfig)
 pkg_check_modules(PC_GRT QUIET libgrt)

-find_library(GRT_LIBRARIES
+find_library(GRT_LIBRARY
   NAMES grt
   HINTS ${PC_GRT_LIBDIR} ${PC_GRT_LIBRARY_DIRS}
   )
@@ -27,14 +27,14 @@
   )

 find_library(
-  GRT_LIBRARIES NAMES grt
+  GRT_LIBRARY NAMES grt
   HINTS ${PC_GRT_LIBDIR} ${PC_GRT_LIBRARY_DIRS}
   )

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(
   grt
-  REQUIRED_VARS GRT_LIBRARIES GRT_INCLUDE_DIR
+  REQUIRED_VARS GRT_LIBRARY GRT_INCLUDE_DIR
   )

-mark_as_advanced(GRT_INCLUDE_DIR GRT_LIBRARIES)
+mark_as_advanced(GRT_INCLUDE_DIR GRT_LIBRARY)


added changes to FindHIP.cmake which would allow us to build using ninja #467

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -471,7 +471,13 @@
                 INPUT "${custom_target_script_pregen}"
                 )
             set(main_dep DEPENDS ${source_file})
-            set(verbose_output "$(VERBOSE)")
+            if(CMAKE_GENERATOR MATCHES "Makefiles")
+                set(verbose_output "$(VERBOSE)")
+            elseif(HIP_VERBOSE_BUILD)
+                set(verbose_output ON)
+            else()
+                set(verbose_output OFF)
+            endif()

             # Create up the comment string
             file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}")


try harder to get dependencies right

try harder to get dependencies right

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -205,6 +205,7 @@
          -DVC_IMPL=MIC
          ${_flags} ${ARGN} -c -o "${${_output}}" "${_abs}"
          DEPENDS "${_abs}"
+         IMPLICIT_DEPENDS CXX "${_abs}"
          WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
          COMMENT "Compiling (MIC) ${${_output}}"
          VERBATIM
@@ -319,7 +320,7 @@
             get_target_property(_tmp "${_arg}" OUTPUT_NAME)
             if(_tmp)
                set(_libs ${_libs} "${_tmp}")
-               set(_libTargets ${_libTargets} "${_tmp}")
+               set(_libTargets ${_libTargets} "${_tmp}" "${_arg}")
             else()
                get_filename_component(_lpath "${_arg}" PATH)
                get_filename_component(_lname "${_arg}" NAME)


fix deps on mic libs

fix deps on mic libs

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -319,11 +319,12 @@
             get_target_property(_tmp "${_arg}" OUTPUT_NAME)
             if(_tmp)
                set(_libs ${_libs} "${_tmp}")
-               set(_libTargets ${_libTargets} "${_arg}")
+               set(_libTargets ${_libTargets} "${_tmp}")
             else()
                get_filename_component(_lpath "${_arg}" PATH)
                get_filename_component(_lname "${_arg}" NAME)
                set(_libs "${_libs} \"-L${_lpath}\" \"-l${_lname}\"")
+               set(_libTargets ${_libTargets} "${_arg}")
             endif()
          elseif(_state EQUAL 3) # OUTPUT_NAME
             set(_exec_output_name "${_arg}")


add go extern

add go extern

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -195,3 +195,10 @@
   add_custom_target(${TARGET_NAME} ALL DEPENDS ${TARGET_NAME}_timestamp ${go_test_DEPS})
   add_test(${TARGET_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME})
 endfunction(go_test)
+
+# go_extern will download extern go project.
+# go_extern(target_name extern_source)
+# go_extern(go_redis github.com/hoisie/redis)
+function(go_extern TARGET_NAME)
+  add_custom_target(${TARGET_NAME} env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get ${ARGN})
+endfunction(go_extern)


cmake: Move certificate bundle to new repo

--- cmake/openssl.cmake
+++ cmake/openssl.cmake
@@ -33,7 +33,7 @@

 ExternalProject_Add(cert_bundle
         PREFIX cert_bundle
-        URL https://github.com/fwsGonzo/OpenSSL_bundle/releases/download/v1.2/ca_bundle.tar.gz
+        URL https://github.com/fwsGonzo/s2n_bundle/releases/download/v1/ca_bundle.tar.gz
         URL_HASH MD5=4596f90b912bea7ad7bd974d10c58efd
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""


Download PLplot source from svn trunk.

Download PLplot source from svn trunk.

This means build_projects users must have a subversion client
installed, but the big advantage of this new approach is they don't
have to edit the local PLplot location anymore in this configuration
file.

svn path=/trunk/; revision=12594

--- cmake/build_projects/plplot/bp.cmake
+++ cmake/build_projects/plplot/bp.cmake
@@ -76,19 +76,6 @@
 # This can be safely done only after above includes.
 set(BP_PACKAGE plplot)

-# Note could retrieve the latest release, but that is pretty dated.
-# So ideally, would use a subversion client to get the trunk version,
-# but that means (on Windows) you must build a subversion client.
-# That build (of the apache version of subversion) should be
-# straightforward assuming wget (available both for Unix and MSYS) is
-# installed.  So I think ultimately a build of a subversion client
-# will be configured and available for all platforms.  But for now
-# just use a local directory where the trunk version of PLplot has
-# been recently updated.
-# TEMPORARY
-set(PLPLOT_LOCAL_SOURCE_DIR /home/software/${BP_PACKAGE}_svn/HEAD/${BP_PACKAGE}_allura)
-file(TO_NATIVE_PATH ${PLPLOT_LOCAL_SOURCE_DIR} PLPLOT_LOCAL_SOURCE_DIR)
-
 set(tags "" "_lite")
 foreach(tag IN LISTS tags)
   # Data that is related to the PATH that must be used.
@@ -97,12 +84,6 @@
     set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}${tag}/dll;${BP_PATH_NODLL}")
     message(STATUS "Original BP_PATH for ${BP_PACKAGE}${tag} = ${BP_PATH}")
     determine_msys_path(BP_PATH "${BP_PATH}")
-    # TEMPORARY (already in the _required_ native form for the cmake -E
-    # copy_directory command below except for the drive letter which is
-    # z: for this local result.)
-    set(MODIFIED_PLPLOT_LOCAL_SOURCE_DIR z:${PLPLOT_LOCAL_SOURCE_DIR})
-  else(MSYS_PLATFORM)
-    set(MODIFIED_PLPLOT_LOCAL_SOURCE_DIR ${PLPLOT_LOCAL_SOURCE_DIR})
   endif(MSYS_PLATFORM)
   message(STATUS "modified BP_PATH for ${BP_PACKAGE}${tag} = ${BP_PATH}")

@@ -111,8 +92,7 @@
   ExternalProject_Add(
     build_${BP_PACKAGE}${tag}
     DEPENDS "${${BP_PACKAGE}${tag}_dependencies_targets}"
-    #TEMPORARY
-    DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${MODIFIED_PLPLOT_LOCAL_SOURCE_DIR} ${EP_BASE}/Source/build_${BP_PACKAGE}${tag}
+    SVN_REPOSITORY http://svn.code.sf.net/p/plplot/code/trunk
     CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DBUILD_TEST=ON -DPLD_pdf=ON ${${BP_PACKAGE}${tag}_cmake_args} ${EP_BASE}/Source/build_${BP_PACKAGE}${tag}
     BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
     INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install


SWDEV-279372 - HIP_CLANG_PATH should resolve from HIP_PATH if its defined

Change-Id: Iee909f1e2f3d6443b494846219ad955a1f0ebfe8

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -238,6 +238,8 @@
             set(HIP_CLANG_PATH "$ENV{ROCM_PATH}/llvm/bin")
         elseif(DEFINED ENV{HIP_PATH})
             set(HIP_CLANG_PATH "$ENV{HIP_PATH}/../llvm/bin")
+        elseif(DEFINED HIP_PATH)
+            set(HIP_CLANG_PATH "${HIP_PATH}/../llvm/bin")
         else()
             set(HIP_CLANG_PATH "/opt/rocm/llvm/bin")
         endif()
@@ -655,6 +657,8 @@
                 set(HIP_CLANG_PATH "$ENV{ROCM_PATH}/llvm/bin")
             elseif(DEFINED ENV{HIP_PATH})
                 set(HIP_CLANG_PATH "$ENV{HIP_PATH}/../llvm/bin")
+            elseif(DEFINED HIP_PATH)
+                set(HIP_CLANG_PATH "${HIP_PATH}/../llvm/bin")
             else()
                 set(HIP_CLANG_PATH "/opt/rocm/llvm/bin")
             endif()


cmake: use set(webui_defvalue ${root7})

cmake: use set(webui_defvalue ${root7})

webui should always be build with root7, if other is not specified

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -229,7 +229,6 @@
  set(r_defvalue ON)
  set(roofit_defvalue ON)
  set(root7_defvalue ON)
- set(webui_defvalue ON)
  set(shadowpw_defvalue ON)
  set(table_defvalue ON)
  set(unuran_defvalue ON)
@@ -265,6 +264,9 @@
   set(builtin_zlib_defvalue ON)
 endif()

+#---webui always build together with root7----------------------------------------------------
+set(webui_defvalue ${root7})
+
 #---Vc supports only x86_64 architecture-------------------------------------------------------
 if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
   message(STATUS "Vc does not support ${CMAKE_SYSTEM_PROCESSOR}. Support for Vc disabled.")
@@ -290,11 +292,6 @@
 #---ROOT 7 requires C++14 standard or higher---------------------------------------------------
 if(NOT CMAKE_CXX_STANDARD GREATER 11)
   set(root7_defvalue OFF)
-  set(webui_defvalue OFF)
-endif()
-
-if (NOT webui AND NOT "${webui}" STREQUAL "")
-   set(webui_disabled ON)
 endif()

 #---roottest option implies testing
@@ -311,9 +308,6 @@
       message(STATUS "Enabling C++14 for compilation of root7 components")
   elseif(NOT CMAKE_CXX_STANDARD GREATER 11)
       message(FATAL_ERROR ">>> At least C++14 standard required with root7")
-   endif()
-   if(NOT webui AND NOT webui_disabled)
-      set(webui ON CACHE BOOL "(webui built automatically when root7 is enabled)" FORCE)
    endif()
 endif()


clarify error message

clarify error message

svn path=/trunk/kdesupport/strigi/; revision=644144

--- cmake/FindSha.cmake
+++ cmake/FindSha.cmake
@@ -21,7 +21,7 @@
    ENDIF(NOT OpenSSL_FIND_QUIETLY)
 ELSE(SHA_FOUND)
    IF(Sha_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find Sha. Please install libssl-dev")
+      MESSAGE(FATAL_ERROR "Could not find SHA1. Please install OpenSSL Development libraries")
    ENDIF(Sha_FIND_REQUIRED)
 ENDIF(SHA_FOUND)


Add more paths to find TBB on Unix

Add more paths to find TBB on Unix

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -48,7 +48,11 @@

   FIND_PATH(TBB_ROOT include/tbb/task_scheduler_init.h
     DOC "Root of TBB installation"
-    PATHS ${PROJECT_SOURCE_DIR}/tbb /opt/intel/composerxe/tbb
+    PATHS
+      ${PROJECT_SOURCE_DIR}/tbb
+      /opt/intel/composerxe/tbb
+      /opt/intel/compilers_and_libraries/tbb
+      $ENV{TBBROOT}
   )

   IF (APPLE)


Addressed issue #3100, removing an unnecessary write to the include directory

--- cmake/lapacke.cmake
+++ cmake/lapacke.cmake
@@ -2499,6 +2499,5 @@
 endforeach ()

 set(lapacke_include_dir "${NETLIB_LAPACK_DIR}/LAPACKE/include")
-configure_file("${lapacke_include_dir}/lapacke_mangling_with_flags.h.in" "${lapacke_include_dir}/lapacke_mangling.h" COPYONLY)
 include_directories(${lapacke_include_dir})
 set_source_files_properties(${LAPACKE_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS}")


CPack: always install the libs

CPack: always install the libs

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

 SET(CPACK_PACKAGE_VERSION_MAJOR ${OSPRAY_VERSION_MAJOR})
 SET(CPACK_PACKAGE_VERSION_MINOR ${OSPRAY_VERSION_MINOR})
@@ -82,8 +82,10 @@
 SET(CPACK_COMPONENT_APPS_DESCRIPTION "Viewer applications and tutorials demonstrating how to use OSPRay.")

 # dependencies between components
+SET(CPACK_COMPONENT_DEVEL_DEPENDS lib)
 SET(CPACK_COMPONENT_LIB_MIC_DEPENDS lib)
 SET(CPACK_COMPONENT_APPS_DEPENDS lib)
+SET(CPACK_COMPONENT_LIB_REQUIRED ON) # always install the libs

 # point to readme and license files
 SET(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md)


erthink-cmake: add ability to force building GTest by `BUILD_GTEST=ON` to compatibility when alternative toolchain/libraries are used.

--- cmake/testing.cmake
+++ cmake/testing.cmake
@@ -22,20 +22,6 @@
 include(CTest)
 if(BUILD_TESTING)
   cmake_policy(PUSH)
-  if(NOT DEFINED BUILD_GTEST)
-    set(BUILD_GTEST ON CACHE BOOL "Builds the googletest subproject")
-  endif()
-  if(NOT DEFINED BUILD_GMOCK)
-    set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")
-  endif()
-  if(NOT DEFINED INSTALL_GTEST)
-    set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest")
-  endif()
-
-  if(NOT DEFINED GTEST_USE_VERSION)
-    set(GTEST_USE_VERSION "LAST_RELEASE")
-  endif()
-
   cmake_policy(SET CMP0042 NEW)
   cmake_policy(SET CMP0054 NEW)
   if(NOT CMAKE_VERSION VERSION_LESS 3.9)
@@ -46,12 +32,24 @@
     cmake_policy(SET CMP0075 NEW)
   endif()

-  # Expected GTest was already found and/or pointed via ${gtest_root},
-  # otherwise will search at ${gtest_paths} locations, if defined or default ones.
-  find_package(GTest)
+  if(NOT GTEST_FOUND AND NOT (DEFINED BUILD_GTEST AND BUILD_GTEST))
+    # Expected GTest was already found and/or pointed via ${gtest_root},
+    # otherwise will search at ${gtest_paths} locations, if defined or default ones.
+    find_package(GTest)
+  endif()

   if(NOT GTEST_FOUND)
     message(STATUS "Lookup GoogleTest sources...")
+    if(NOT DEFINED BUILD_GTEST)
+      set(BUILD_GTEST ON CACHE BOOL "Builds the googletest subproject")
+    endif()
+    if(NOT DEFINED BUILD_GMOCK)
+      set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")
+    endif()
+    if(NOT DEFINED INSTALL_GTEST)
+      set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest")
+    endif()
+
     if(NOT gtest_paths)
       if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
         set(gtest_paths


Removed unneeded include_directories() in add_project_exe()

--- cmake/OpenBFMEMacros.cmake
+++ cmake/OpenBFMEMacros.cmake
@@ -40,8 +40,6 @@
     endif()

     if(${OPTION_NAME} OR BUILD_ALL)
-        include_directories("./include")
-
         file(GLOB SOURCES "${ARGV0}/*.cpp")
         file(GLOB HEADERS "${ARGV0}/include/*.hpp")


Fix zlib cmake dependency and some formatting

--- cmake/ThirdPartyZlib.cmake
+++ cmake/ThirdPartyZlib.cmake
@@ -50,5 +50,7 @@
         SET(ZLIB_LIBRARY_DEBUG z)
         SET(ZLIB_LIBRARY_RELEASE z)
     ENDIF (WIN32)
+ELSE (THIRDPARTY_BUILD_ZLIB)
+    ADD_CUSTOM_TARGET(zlib-1.2.7 ALL)
 ENDIF (THIRDPARTY_BUILD_ZLIB)


set version in .pc and .cmake files, #66

--- cmake/catkin_project.cmake
+++ cmake/catkin_project.cmake
@@ -22,6 +22,10 @@
     message(STATUS "VESTIGIAL: VERSION argument to catkin_project.")
     message(STATUS "           Use stack's version via catkin_stack()")
   endif()
+  # ${${CATKIN_CURRENT_STACK}_VERSION} is set by the most recent call to
+  # catkin_stack(), which sets CATKIN_CURRENT_STACK and then parses the
+  # stack.yaml, making each field into a CMake cache variable.
+  set(PACKAGE_VERSION ${${CATKIN_CURRENT_STACK}_VERSION})
   set(PACKAGE_INCLUDE_DIRS ${PACKAGE_INCLUDE_DIRS})
   set(PACKAGE_DEPENDS ${PACKAGE_DEPENDS})
   set(PACKAGE_LIBRARIES ${PACKAGE_LIBRARIES})


remove noise.

remove noise.

--- cmake/catkin_project.cmake
+++ cmake/catkin_project.cmake
@@ -5,7 +5,6 @@
       "Did you forget to call project()?\n")
   endif()
   set(Maintainer ${${CATKIN_CURRENT_STACK}_MAINTAINER})
-  message(STATUS "************** MAINTAINER ${CATKIN_CURRENT_STACK}_MAINTAINER ${Maintainer}")

   parse_arguments(PACKAGE
     "INCLUDE_DIRS;LIBRARIES;CFG_EXTRAS;MSG_DIRS;PYTHONPATH;DEPENDS"


pass fortran compiler on to numgrid

pass fortran compiler on to numgrid

--- cmake/custom/numgrid.cmake
+++ cmake/custom/numgrid.cmake
@@ -7,8 +7,9 @@
     GIT_TAG 6eabd3e1806383089fedba986780d21739975caf
     INSTALL_COMMAND true  # currently no install command
     CMAKE_ARGS
-        "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
-#       "-DENABLE_UNIT_TESTS=OFF"
+        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+        -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
+        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
     )

 link_directories(${PROJECT_BINARY_DIR}/numgrid/src/numgrid-build/src)


Back out remains of previous attempt.

Back out remains of previous attempt.

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -183,11 +183,6 @@
   IF(NOT ARG_DESTINATION)
     MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
   ENDIF()
-  IF(target_type MATCHES "EXECUTABLE")
-    SET(INSTALL_TYPE TARGETS)
-  ELSE()
-    SET(INSTALL_TYPE FILES)
-  ENDIF()
   GET_TARGET_PROPERTY(target_location ${target} LOCATION)
   IF(CMAKE_GENERATOR MATCHES "Makefiles")
    STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}"  debug_target_location "${target_location}")
@@ -225,7 +220,7 @@
       GROUP_READ
       WORLD_READ)

-  INSTALL(${INSTALL_TYPE} ${debug_target_location}
+  INSTALL(FILES ${debug_target_location}
     DESTINATION ${ARG_DESTINATION}
     ${RENAME_PARAM}
     ${PERMISSIONS_${target_type}}


If the library is named with full version, make a major version symlink

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -139,6 +139,17 @@
                     ${TARGET_NAME} ${CMAKE_CURRENT_BINARY_DIR}/lib${NAME}.so)
     INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lib${NAME}.so
             DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT redist)
+
+    # If the shared lib we're copying is named with a specific version, also
+    # create a major version suffixed symlink
+    STRING(REGEX MATCH "([0-9]+)[.]([0-9]+)[.]([0-9]+)" VERSION_STRING ${TARGET_NAME})
+    if (CMAKE_MATCH_0)
+      EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -E create_symlink
+                      ${TARGET_NAME}
+                      ${CMAKE_CURRENT_BINARY_DIR}/lib${NAME}.so.${CMAKE_MATCH_1})
+      INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lib${NAME}.so.${CMAKE_MATCH_1}
+              DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT redist)
+    endif()
   ENDMACRO()

   IF (OSPRAY_TASKING_TBB)


COMP: Add target for generated filter source

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -63,6 +63,9 @@

 endforeach()

+# Make target for generated code
+add_custom_target(generate_filter_source_code ALL DEPENDS ${SimpleITKBasicFiltersSource})
+
 # clear the include files
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.h "" )
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.i "" )


support to find TBB from ICC install under Windows

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -15,7 +15,9 @@
 ## ======================================================================== ##

 IF (WIN32)
-  SET(TBB_ROOT ${PROJECT_SOURCE_DIR}/tbb CACHE STRING "Root of TBB installation")
+  FIND_PATH(TBB_ROOT_PARENT tbb PATHS "${PROJECT_SOURCE_DIR}" "C:/Program Files (x86)/Intel/Composer XE")
+  SET(TBB_ROOT ${TBB_ROOT_PARENT}/tbb CACHE STRING "Root of TBB installation")
+
   IF (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
     SET(TBB_SUBDIR intel64)
   ELSE()
@@ -52,6 +54,8 @@
   SET(TBB_LIBRARIES_MIC ${TBB_LIBRARY_MIC} ${TBB_LIBRARY_MALLOC_MIC})
 ENDIF()

+MARK_AS_ADVANCED(TBB_ROOT_PARENT)
+
 MARK_AS_ADVANCED(TBB_INCLUDE_DIR)
 MARK_AS_ADVANCED(TBB_LIBRARY)
 MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC)


cmake-modules:
 * FindThirdPartyMatlab.cmake : message status on where it found matlab, removed mclcrrt as lib dependency (unnecessary)

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3293 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyMatlab.cmake
+++ trunk/cmake-modules/FindThirdPartyMatlab.cmake
@@ -21,7 +21,7 @@
 				ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
 			ENDIF(UNIX)
 			IF(WIN32)
-				SET(Matlab_LIBRARIES libmex libmx libeng mclmcrrt)
+				SET(Matlab_LIBRARIES libmex libmx libeng) #mclmcrrt
 				SET(Matlab_LIB_DIRECTORIES ${Matlab_ROOT}/extern/lib/win32/microsoft)
 				# for delayed importation on windows
 				TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic Delayimp )
@@ -29,15 +29,13 @@
 				# /DELAYLOAD:libmex.dll /DELAYLOAD:mclmcrrt.dll --> useless, no import
 			ENDIF(WIN32)
 			SET(Matlab_FOUND TRUE)
-			SET(PLOP $ENV{OV_DEP_MATLAB})
-			MESSAGE(STATUS "Found matlab in [${Matlab_EXECUTABLE}] ")
 		ELSE(Matlab_INCLUDE)
 		ENDIF(Matlab_INCLUDE)
 	ENDIF(Matlab_EXECUTABLE)
 ENDIF(UNIX OR WIN32)

 IF(Matlab_FOUND)
-	MESSAGE(STATUS "  Found Matlab...")
+	MESSAGE(STATUS "  Found Matlab [${Matlab_EXECUTABLE}]")
 	SET(Matlab_LIB_FOUND TRUE)
 	INCLUDE_DIRECTORIES(${Matlab_INCLUDE})


fix logic in tag check, AND -> OR

fix logic in tag check, AND -> OR

Signed-off-by: Riccardo Spagni <ff4dc518fb3d5d20a81fd1c6faff577641edf4b9@spagni.net>

--- src/version.cmake
+++ src/version.cmake
@@ -7,7 +7,7 @@
 else()
 	message(STATUS "You are currently on commit ${COMMIT}")
 	execute_process(COMMAND "${GIT}" show-ref --tags -d --abbrev COMMAND awk "END{print $1}" RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
-	if(RET AND NOT TAGGEDCOMMIT)
+	if(RET OR NOT TAGGEDCOMMIT)
 	    message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
 	    set(VERSIONTAG "${COMMIT}")
 	else()


[FIX] Build System: removed a debug message from FindSeqAn.cmake

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -375,8 +375,6 @@
   if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
     get_filename_component (CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
   endif (NOT CMAKE_CURRENT_LIST_DIR)
-
-  message (STATUS CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${SEQAN_INCLUDE_DIRS_MAIN}")

   try_run (_SEQAN_RUN_RESULT
            _SEQAN_COMPILE_RESULT


Wall removed from cuda parameters

Wall removed from cuda parameters

--- util/cmake/load_cuda.cmake
+++ util/cmake/load_cuda.cmake
@@ -8,6 +8,7 @@
 	string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER)
 	set(CUDA_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla ${CMAKE_CXX_FLAGS_${BUILD_TYPE_UPPER}}") # add flags specific to build type
 	string(REPLACE "-std=c++11" "" CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS}) # remove C++11 from options
+	string(REPLACE "-Wall" "" CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS}) # remove Wall from options

 	set(FLAGS_DEF "-USE_CUDA ${FLAGS_DEF}")
 	set(FLAGS_DEF_D "-DUSE_CUDA ${FLAGS_DEF_D}")


adding c++17 support for AppleClang

adding c++17 support for AppleClang

--- scripts/CMake/CommonCppFlags.cmake
+++ scripts/CMake/CommonCppFlags.cmake
@@ -7,6 +7,9 @@

 # NOT LESS == GREATER_OR_EQUAL; CMake doesn't support this out of the box.
 if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
+    if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.2"))
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+    endif()
     if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1"))
         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
     endif()


BUG: Moved ctest_start up, hoping to fix "Current Tag empty, this may mean NightlyStartTime / CTEST_NIGHTLY_START_TIME was not set correctly. Or maybe you forgot to call ctest_start() before calling ctest_configure()" at https://stingray.researchlumc.nl/job/SuperElastix/job/SuperElastix/job/SELX-163-GitHub-CDash-Jenkins-integration/20/consoleText

--- SuperBuild/CTest.cmake
+++ SuperBuild/CTest.cmake
@@ -55,10 +55,11 @@
 # For CDash integration with GitHub: https://blog.kitware.com/cdash-integration-with-github
 set(CTEST_CHANGE_ID $ENV{CHANGE_ID})

+ctest_start("Continuous")
+
 # Added ctest_update() to ensure that the commit SHA will be passed to CDash, and GitHub.
 ctest_update()
-
-ctest_start("Continuous")
+
 ctest_configure()
 ctest_build()
 ctest_submit( PARTS Configure Build Update )


added MSVC folders

added MSVC folders

--- external/UseGDAL.cmake
+++ external/UseGDAL.cmake
@@ -10,6 +10,8 @@
   BUILD_COMMAND ""
   INSTALL_COMMAND ""
 )
+
+set_target_properties(netcdf PROPERTIES FOLDER "modules/omegaOsgEarth")

 ExternalProject_Get_Property(netcdf SOURCE_DIR)

@@ -56,3 +58,4 @@
 endif()

+set_target_properties(gdal PROPERTIES FOLDER "modules/omegaOsgEarth")


cmake: set VPR --strict_checks option to off

This also updates conda to use the latest VTR merge

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -25,6 +25,7 @@
       --allow_unrelated_clustering on
       --clustering_pin_feasibility_filter off
       --disable_check_route on
+      --strict_checks off
     RR_PATCH_TOOL
       ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_routing_import.py
     RR_PATCH_CMD "${CMAKE_COMMAND} -E env \


Update generate_for_pb_utility.cmake

Update generate_for_pb_utility.cmake

--- src/generate_for_pb_utility.cmake
+++ src/generate_for_pb_utility.cmake
@@ -60,8 +60,8 @@
   "  --proto_path \"${PROJECT_SERVER_FRAME_BAS_DIR}/protocol/config\" `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
   "  --proto_path \"${PROJECT_SERVER_FRAME_BAS_DIR}/protocol/pbdesc\" `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
   "  --proto_path \"${PROJECT_THIRD_PARTY_INSTALL_DIR}/include\" `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
-  "  --proto_path \"${ATFRAMEWORK_LIBATBUS_REPO_DIR}/include\" \\${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
-  "  --proto_path \"${ATFRAMEWORK_LIBATAPP_REPO_DIR}/include\" \\${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
+  "  --proto_path \"${ATFRAMEWORK_LIBATBUS_REPO_DIR}/include\" `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
+  "  --proto_path \"${ATFRAMEWORK_LIBATAPP_REPO_DIR}/include\" `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
   "  -o \"${PROJECT_INSTALL_RES_PBD_DIR}/network.pb\" `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
   "  \"${PROJECT_THIRD_PARTY_XRESCODE_GENERATOR_REPO_DIR}/pb_extension/xrescode_extensions_v3.proto\" `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"
   "  \$(Get-ChildItem \"${PROJECT_SERVER_FRAME_BAS_DIR}/protocol/config/*.proto\") `${PROJECT_THIRD_PARTY_BUILDTOOLS_BASH_EOL}"


Copy IMPORT_PREFIX and IMPORT_SUFFIX target properties for unity targets.

For unity targets, the PREFIX and SUFFIX target properties were being
copied so that library output file names would make the non-unity
target.  However, this wasn't the case for IMPORT_PREFIX and
IMPORT_SUFFIX which control the import library file name on Windows.  As
a result, the unity target and the original target differed in the
output file name for import libraries.

This fix simply adds IMPORT_PREFIX and IMPORT_SUFFIX to the list of
properties being copied from the original target.

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -2757,7 +2757,8 @@
 		LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_<CONFIG>
 		OUTPUT_NAME OUTPUT_NAME_<CONFIG>
 		RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_<CONFIG>
-		PREFIX <CONFIG>_POSTFIX SUFFIX)
+		PREFIX <CONFIG>_POSTFIX SUFFIX
+		IMPORT_PREFIX IMPORT_SUFFIX)
 	# copy compile stuff
 	cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
 		COMPILE_DEFINITIONS COMPILE_DEFINITIONS_<CONFIG>


Add dependency for check on libpthread

Add dependency for check on libpthread

--- build/FindCheck.cmake
+++ build/FindCheck.cmake
@@ -11,6 +11,7 @@

 list(APPEND CHECK_LIBRARIES rt)
 list(APPEND CHECK_LIBRARIES m)
+list(APPEND CHECK_LIBRARIES pthread)

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check
 	REQUIRED_VARS CHECK_LIBRARIES CHECK_INCLUDE_DIRS)


only run if HAS_VALGRIND is true

only run if HAS_VALGRIND is true

--- phSolver/common/test/testing.cmake
+++ phSolver/common/test/testing.cmake
@@ -18,18 +18,34 @@
   COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOreadFtn
   WORKING_DIRECTORY ${CASES}/incompressible/
 )
-add_test(
-  NAME readFtnVG
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 valgrind --log-file=vg.%p --leak-check=yes ${PHASTA_BINARY_DIR}/bin/phIOreadFtn
-  WORKING_DIRECTORY ${CASES}/incompressible/
-)
+if(HAS_VALGRIND)
+  set(vgcmd
+    valgrind
+    --log-file=vg.%p
+    --leak-check=yes
+    ${PHASTA_BINARY_DIR}/bin/phIOreadFtn
+  )
+  add_test(
+    NAME readFtnVG
+    COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${vgcmd}
+    WORKING_DIRECTORY ${CASES}/incompressible/
+  )
+endif(HAS_VALGRIND)
 add_test(
   NAME writeFtn
   COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
   WORKING_DIRECTORY ${CASES}/
 )
-add_test(
-  NAME writeFtnVG
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 valgrind --log-file=vg.%p --leak-check=yes ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
-  WORKING_DIRECTORY ${CASES}/incompressible/
-)
+if(HAS_VALGRIND)
+  set(vgcmd
+    valgrind
+    --log-file=vg.%p
+    --leak-check=yes
+    ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
+  )
+  add_test(
+    NAME writeFtnVG
+    COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${vgcmd}
+    WORKING_DIRECTORY ${CASES}/incompressible/
+  )
+endif(HAS_VALGRIND)


[cmake] fix boost location, disable lto

[cmake] fix boost location, disable lto

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -129,7 +129,11 @@
 SET( CUSTOM_FLAGS
 	"-Wall -Wextra -pedantic -O3 -DDNDEBUG -funroll-loops -g -ggdb -DENABLE_ADAPTIVE=1 -DADAPTIVE_SOLVER -DUSE_BFG_CG_SCHEME -fno-strict-aliasing" CACHE STRING
 	"CUSTOM FLAGS")
-FIND_PACKAGE(Boost 1.35.0 REQUIRED)
+SET( BOOST_ROOT
+	"/opt/boost-1.48" CACHE STRING
+	"" )
+
+FIND_PACKAGE(Boost 1.48.0 REQUIRED)
 INCLUDE_DIR(${Boost_INCLUDE_DIR})
 FIND_PACKAGE( PkgConfig )
 pkg_check_modules( CCGNU REQUIRED libccgnu2 )
@@ -137,13 +141,13 @@
 INCLUDE_SYS_DIR(${Boost_INCLUDE_DIR})

 #try to enable link-time-optimisation
-if (CMAKE_COMPILER_IS_GNUCC)
-	execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-	if (GCC_VERSION VERSION_GREATER 4.5 OR GCC_VERSION VERSION_EQUAL 4.5)
-		set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
-		set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
-		set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flto")
-	endif()
-endif()
+# if (CMAKE_COMPILER_IS_GNUCC)
+# 	execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+# 	if (GCC_VERSION VERSION_GREATER 4.5 OR GCC_VERSION VERSION_EQUAL 4.5)
+# 		set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
+# 		set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
+# 		set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flto")
+# 	endif()
+# endif()

 ENABLE_TESTING()


[UBSan][MIPS] Adding support for MIPS64

[UBSan][MIPS] Adding support for MIPS64

No MIPS64 architecture dependant code

reviewed by : samsonov
submitted by: sagar

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -183,7 +183,7 @@
 filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64
   mipsel mips64el aarch64 powerpc64 powerpc64le)
 filter_available_targets(TSAN_SUPPORTED_ARCH x86_64)
-filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel)
+filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel mips64 mips64el)

 if(ANDROID)
   set(OS_NAME "Android")


explicitly use no optimizations for debug builds

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -35,7 +35,7 @@
         if_flag("-Wno-unknown-warning-option" CMAKE_CXX_FLAGS)
 endif()

-        set(CMAKE_CXX_FLAGS_DEBUG               "-g -fno-omit-frame-pointer")
+        set(CMAKE_CXX_FLAGS_DEBUG               "-O0 -g -fno-omit-frame-pointer")
         set(CMAKE_CXX_FLAGS_RELEASE             "-O3 -DNDEBUG -DEIGEN_NO_DEBUG")
         set(CMAKE_CXX_FLAGS_RELWITHDEBINFO      "-O3 -g -fno-omit-frame-pointer")
         set(CMAKE_CXX_FLAGS_MINSIZEREL          "-Os -DNDEBUG")


use z for zlib

use z for zlib

--- deps/lua-zlib.cmake
+++ deps/lua-zlib.cmake
@@ -1,4 +1,4 @@
-set(ZLIB_SHARED zlib)
+set(ZLIB_SHARED z)
 set(ZLIB_STATIC zlibstatic)

 set(LUA_ZLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/lua-zlib)


[CMake] Add missing framework dependency to `tf_c_python_api`.

This was occasionally causing flaky failures due to the module being compiled
before the proto_text headers had been generated.

PiperOrigin-RevId: 175322168

--- tensorflow/contrib/cmake/tf_c.cmake
+++ tensorflow/contrib/cmake/tf_c.cmake
@@ -46,4 +46,5 @@
   tf_c_python_api
   tf_c
   tf_core_lib
+  tf_core_framework
   tf_protos_cc)


undo search replace error

undo search replace error

--- hw/bsp/rp2040/family.cmake
+++ hw/bsp/rp2040/family.cmake
@@ -19,8 +19,8 @@
 	set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..")
 	get_filename_component(TOP "${TOP}" REALPATH)

-	if (NOT TOP)
-		set(TOP ${TOP})
+	if (NOT PICO_TINYUSB_PATH)
+		set(PICO_TINYUSB_PATH ${TOP})
 	endif()

 	# Base config for both device and host; wrapped by SDK's tinyusb_common


Fix bug in cmake alembic script.

Fix bug in cmake alembic script.

Wrong parameters are used for GET_FILENAME_COMPONENT.

--- src/cmakeFindModules/FindAlembic.cmake
+++ src/cmakeFindModules/FindAlembic.cmake
@@ -39,7 +39,7 @@
         $ENV{ILMBASE_LIBRARY_DIR}
     )

-GET_FILENAME_COMPONENT(${ABC_ILMBASE_IEX_LIB} ABC_ILMBASE_LIBS_PATH DIRECTORY)
+GET_FILENAME_COMPONENT(ABC_ILMBASE_LIBS_PATH ${ABC_ILMBASE_IEX_LIB} DIRECTORY)

 FIND_LIBRARY(ABC_ILMBASE_IEX Iex PATHS ${ABC_ILMBASE_LIBS_PATH})
 FIND_LIBRARY(ABC_ILMBASE_IEXMATH IexMath PATHS ${ABC_ILMBASE_LIBS_PATH})


Fix the Cg fix...

Fix the Cg fix...

--- cmake/FindCg.cmake
+++ cmake/FindCg.cmake
@@ -40,9 +40,9 @@
   IF (WIN32)
 		IF (CMAKE_SIZEOF_VOID_P EQUALS 8)
 			SET(CG_BIN_SEARCH_PATH "$ENV{PROGRAMFILES}/NVIDIA\ Corporation/Cg/bin.x64")
-		ELSE
+		ELSE()
 			SET(CG_BIN_SEARCH_PATH "$ENV{PROGRAMFILES}/NVIDIA\ Corporation/Cg/bin")
-		ENDIF
+		ENDIF()
     FIND_PROGRAM( CG_COMPILER cgc
       $ENV{CG_BIN_PATH}
 			${CG_BIN_SEARCH_PATH}
@@ -68,9 +68,9 @@
       )
 		IF (CMAKE_SIZEOF_VOID_P EQUALS 8)
 			SET(CG_LIB_SEARCH_PATH "$ENV{PROGRAMFILES}/NVIDIA\ Corporation/Cg/lib.x64")
-		ELSE
+		ELSE()
 			SET(CG_LIB_SEARCH_PATH "$ENV{PROGRAMFILES}/NVIDIA\ Corporation/Cg/lib")
-		ENDIF
+		ENDIF()
     FIND_LIBRARY( CG_LIBRARY
       NAMES Cg
       PATHS


Fix gtest_source_paths (#1088)

Fix gtest_source_paths (#1088)

Since googletest_path is /usr/src/googletest, it resulted in /usr/src/googletest/googletest/googletest/src

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -238,7 +238,7 @@

   # Path to gtest from the googletest Debian package.
   list(APPEND _gtest_include_paths "${googletest_path}/googletest/include/gtest")
-  list(APPEND _gtest_source_paths "${googletest_path}/googletest/googletest/src")
+  list(APPEND _gtest_source_paths "${googletest_path}/googletest/src")

   if(CATKIN_TOPLEVEL)
     # Ensure current workspace is searched before system path


missing include line

missing include line

--HG--
extra : convert_revision : 57cee969b1c4fecde56ca80e69593fba1a2e0756

--- trunk/CMakeModules/FindPython.cmake
+++ trunk/CMakeModules/FindPython.cmake
@@ -17,6 +17,8 @@
 # If numpy is found, the variable PY_NUMPY contains the location of the numpy
 # module. If the module is required add the keyword "REQUIRED":
 #	find_python_module(numpy REQUIRED)
+
+include(FindPackageHandleStandardArgs)

 find_program(PYTHON_EXEC "python${Python_FIND_VERSION}"
 	PATHS


STYLE: UseITK: Document static registration of ITK IO factories. See #3393

Change-Id: I931a81c1d1cb070d3d14b36915e4641841ab7df8

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -1,7 +1,20 @@
-# This file sets up include directories, link directories, and
+
+#
+#  W A R N I N G
+#  -------------
+#
+# This file is not part of the ITK API.  It exists purely as an
+# implementation detail.  This CMake module may change from version to
+# version without notice, or even be removed.
+#
+# We mean it.
+#
+
+# This file sets up include directories, link directories, IO settings and
 # compiler settings for a project to use ITK.  It should not be
 # included directly, but rather through the ITK_USE_FILE setting
 # obtained from ITKConfig.cmake.
+

 # Add compiler flags needed to use ITK.
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ITK_REQUIRED_C_FLAGS}")
@@ -10,13 +23,182 @@
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")

-
 # Add include directories needed to use ITK.
 include_directories(BEFORE ${ITK_INCLUDE_DIRS})

 # Add link directories needed to use ITK.
 link_directories(${ITK_LIBRARY_DIRS})

+
+#
+# Introduction
+# ------------
+#
+# ITK IO factories can be registered automatically either "statically" or "dynamically".
+#
+# "statically" : This is the mechanism described below and supported by UseITK.
+#
+# "dynamically": This corresponds to the runtime loading of shared libraries
+#                exporting the "itkLoad" symbol and available in directory
+#                associated with the `ITK_AUTOLOAD_PATH` environment variable.
+#
+#
+# Overview: Static registration of ITK IO factories
+# -------------------------------------------------
+#
+# For each factory type (Image, Transform, ...), a registration manager header
+# named `itk<factory_type>IOFactoryRegisterManager.h` is configured.
+#
+# The registration manager header is itself included at the end of the Reader and
+# Writer header of each factory types. It will ensure all the IO factories
+# associated with the different file formats are registered only once by
+# relying on static initialization of a global variable properly initialized
+# by the loader across all translation units.
+#
+# By including either `itk<factory_type>FileReader.h` or `itk<factory_type>FileWriter.h`
+# header in user code, the corresponding IO factories will be ensured to be
+# registered globally and available across translation units.
+#
+# The file formats associated with each factory type are hard-coded as
+# a list in a CMake variable named after `LIST_OF_<factory_type>IO_FORMATS`
+# generated by this file.
+#
+#
+# Registration manager header
+# ---------------------------
+#
+# Configuration of the header requires two CMake variables to be set. The
+# two variables `LIST_OF_FACTORY_NAMES` and `LIST_OF_FACTORIES_REGISTRATION` will
+# respectively contain a list of function declaration and calls. The associated
+# function names are of the form `<factory_name>FactoryRegister__Private`.
+#
+# These variables are set by iterating over the IO format lists.
+#
+#
+# Disabling static registration
+# -----------------------------
+#
+# Setting variable `ITK_NO_IO_FACTORY_REGISTER_MANAGER` to `OFF` prior calling
+# `include(${ITK_USE_FILE})` disables the static registration. As a consequence,
+# the two variables `LIST_OF_FACTORY_NAMES` and `LIST_OF_FACTORIES_REGISTRATION`
+# are empty and no calls to "Private" function is done.
+#
+# IO format lists
+# ---------------
+#
+# The IO format lists are CMake variables set to an hardcoded list of file
+# format.
+#
+# One list will be set for each factory type.
+#
+# Variable name is expected to be of the form `LIST_OF_<factory_type>IO_FORMATS`
+# where `<factory_type>` is the upper-cased `factory_type`.
+#
+# Notes:
+#
+#  * The order of file format matters: Since it will define in which order
+#    the different factories are registered, it will by extension defines the
+#    "priority" for each file format.
+#
+#  * This list does not indicates which factory are registered: It should be
+#    considered as a hint to indicate the order in which factory should
+#    registered based on which ITK modules are used or imported within a
+#    given project.
+#
+#
+# The "Private" function
+# ----------------------
+#
+# The function is responsible to register the IO factory for a given format
+# associated with a specific factory type.
+#
+# It is defined in the `itk<format><factory_type>IOFactory.cxx` file and should
+# internally call the function `<format><factory_type>IOFactory::RegisterOneFactory()`.
+#
+# The factory is then effectively registered in `RegisterOneFactory()` by calling
+# `ObjectFactoryBase::RegisterFactoryInternal(<format><factory_type>IOFactory::New())`.
+#
+# Notes:
+#
+#  * the function will be available in both shared or static build case. Static
+#    initialiation will happen in both cases.
+#
+#  * the function is unique and consistently named for each IO factory. The
+#    current naming convention is an implementation detail and is not part
+#    of the ITK Public API.
+#
+#
+# Generation of "Private()" function lists
+# ----------------------------------------
+#
+# The configuration of the registration header for each factory is done
+# using the convenience function `_configure_IOFactoryRegisterManager()`.
+#
+# It expects a list of file format associated with each factory types.
+#
+# By iterating over the format list, the CMake function `_configure_IOFactoryRegisterManager()`
+# will itself call `ADD_FACTORY_REGISTRATION()` to generate the Private function
+# names and update the `LIST_OF_FACTORY_NAMES` and `LIST_OF_FACTORIES_REGISTRATION`
+# CMake lists.
+#
+# Every file format is associated with a module name and factory name set
+# by iterating over the list of file format prior the call to `_configure_IOFactoryRegisterManager()`.
+#
+# For any given file format, it is possible to hardcode a different factory and
+# module name by setting CMake variable of the form `<format>_<factory_type>_module_name`
+# and `<format>_<factory_type>_factory_name` where `<factory_type>` is lower-cased.
+#
+# These custom associations are reported below under the "Exceptions" comments.
+#
+#
+# Caveats
+# -------
+#
+# Since the both include directory containing the registration manager headers
+# and the `ITK_IO_FACTORY_REGISTER_MANAGER` COMPILE_DEFINITIONS are set as
+# directory properties, including external project (themselves including ITK)
+# after including ITK can have unintended side effects.
+#
+
+
+
+# _configure_IOFactoryRegisterManager(<factory_type> <formats>)
+#
+# Configure the registration manager header in the directory
+# `<CMAKE_CURRENT_BINARY_DIR>/ITKIOFactoryRegistration/`.
+#
+# Header is named using the template `itk<factory_type>IOFactoryRegisterManager.h`
+#
+function(_configure_IOFactoryRegisterManager factory_type formats)
+  set(LIST_OF_FACTORIES_REGISTRATION "")
+  set(LIST_OF_FACTORY_NAMES "")
+
+  string(TOLOWER ${factory_type} factory_type_lc)
+  set(_qualifier "_${factory_type_lc}")
+
+  # See below for explanation.
+  if("${factory_type}" STREQUAL "Image")
+    set(_qualifier "")
+  endif()
+
+  foreach (format ${formats})
+    set(_module_name ${${format}${_qualifier}_module_name})
+    set(_factory_name ${${format}${_qualifier}_factory_name})
+    ADD_FACTORY_REGISTRATION("LIST_OF_FACTORIES_REGISTRATION" "LIST_OF_FACTORY_NAMES"
+      ${_module_name} ${_factory_name})
+  endforeach()
+
+  get_filename_component(_selfdir "${CMAKE_CURRENT_LIST_FILE}" PATH)
+  configure_file(${_selfdir}/itk${factory_type}IOFactoryRegisterManager.h.in
+   "${CMAKE_CURRENT_BINARY_DIR}/ITKIOFactoryRegistration/itk${factory_type}IOFactoryRegisterManager.h" @ONLY)
+
+endfunction()
+
+# ADD_FACTORY_REGISTRATION(<registration_list_var> <names_list_var> <module_name> <factory_name>)
+#
+# Update variables`LIST_OF_FACTORY_NAMES` and `LIST_OF_FACTORIES_REGISTRATION`
+# used to configure `itk<factory_type>IOFactoryRegisterManager.h`.
+#
 macro(ADD_FACTORY_REGISTRATION _registration_list_var _names_list_var _module_name _factory_name)
   list(FIND ITK_MODULES_REQUESTED ${_module_name} _module_was_requested)
   if(NOT ${_module_was_requested} EQUAL -1)
@@ -31,39 +213,6 @@
   endif()
 endmacro()

-function(_configure_IOFactoryRegisterManager factory_type formats)
-  set(LIST_OF_FACTORIES_REGISTRATION "")
-  set(LIST_OF_FACTORY_NAMES "")
-
-  string(TOLOWER ${factory_type} factory_type_lc)
-  set(_qualifier "_${factory_type_lc}")
-
-  # See below for explanation.
-  if("${factory_type}" STREQUAL "Image")
-    set(_qualifier "")
-  endif()
-
-  foreach (format ${formats})
-    set(_module_name ${${format}${_qualifier}_module_name})
-    set(_factory_name ${${format}${_qualifier}_factory_name})
-    ADD_FACTORY_REGISTRATION("LIST_OF_FACTORIES_REGISTRATION" "LIST_OF_FACTORY_NAMES"
-      ${_module_name} ${_factory_name})
-  endforeach()
-
-  get_filename_component(_selfdir "${CMAKE_CURRENT_LIST_FILE}" PATH)
-  configure_file(${_selfdir}/itk${factory_type}IOFactoryRegisterManager.h.in
-   "${CMAKE_CURRENT_BINARY_DIR}/ITKIOFactoryRegistration/itk${factory_type}IOFactoryRegisterManager.h" @ONLY)
-
-endfunction()
-
-#
-# Infrastructure for registering automatically the factories of commonly used IO formats
-#
-
-# Set each IO format's module name and factory name
-# Most IO modules have consistent string characters between their module names
-# and their factory class names, except the one listed below.
-
 #-----------------------------------------------------------------------------
 # ImageIO
 #-----------------------------------------------------------------------------


handle simple generator expression in target usage requirements

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -320,13 +320,18 @@
 	endforeach()
 endfunction()

-function (cotire_get_target_usage_requirements _target _targetRequirementsVar)
+function (cotire_get_target_usage_requirements _target _config _targetRequirementsVar)
 	set (_targetRequirements "")
 	get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES)
 	while (_librariesToProcess)
 		# remove from head
 		list (GET _librariesToProcess 0 _library)
 		list (REMOVE_AT _librariesToProcess 0)
+		if (_library MATCHES "^\\$<\\$<CONFIG:${_config}>:([A-Za-z0-9_:-]+)>$")
+			set (_library "${CMAKE_MATCH_1}")
+		elseif (_config STREQUAL "None" AND _library MATCHES "^\\$<\\$<CONFIG:>:([A-Za-z0-9_:-]+)>$")
+			set (_library "${CMAKE_MATCH_1}")
+		endif()
 		if (TARGET ${_library})
 			list (FIND _targetRequirements ${_library} _index)
 			if (_index LESS 0)
@@ -441,7 +446,7 @@
 	# interface compile options from linked library targets
 	if (_target)
 		set (_linkedTargets "")
-		cotire_get_target_usage_requirements(${_target} _linkedTargets)
+		cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
 		foreach (_linkedTarget ${_linkedTargets})
 			get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS)
 			if (_targetOptions)
@@ -573,7 +578,7 @@
 	# interface include directories from linked library targets
 	if (_target)
 		set (_linkedTargets "")
-		cotire_get_target_usage_requirements(${_target} _linkedTargets)
+		cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
 		foreach (_linkedTarget ${_linkedTargets})
 			get_target_property(_linkedTargetType ${_linkedTarget} TYPE)
 			if (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS "3.4.0" AND
@@ -703,7 +708,7 @@
 	endif()
 	# interface compile definitions from linked library targets
 	set (_linkedTargets "")
-	cotire_get_target_usage_requirements(${_target} _linkedTargets)
+	cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets)
 	foreach (_linkedTarget ${_linkedTargets})
 		get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS)
 		if (_definitions)


Set variable to 0 if not set (#490)

Set variable to 0 if not set (#490)

--- scripts/cmake/doctestAddTests.cmake
+++ scripts/cmake/doctestAddTests.cmake
@@ -11,6 +11,10 @@
 set(script)
 set(suite)
 set(tests)
+
+if(NOT DEFINED ${add_labels})
+    set(add_labels 0)
+endif()

 function(add_command NAME)
   set(_args "")


Turn off LL_TESTS by default

Turn off LL_TESTS by default

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -24,7 +24,7 @@
 set(SERVER_PREFIX)
 set(VIEWER_PREFIX)
 set(INTEGRATION_TESTS_PREFIX)
-set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation")
+set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation")

 set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
 set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})


Fixes swig bug.

Fixes swig bug.

--- internal/cpp_library.cmake
+++ internal/cpp_library.cmake
@@ -78,25 +78,24 @@
       IF(BUILD_STATIC_LIB)
         SET(target_output "${_NAME}")
         ADD_LIBRARY(${target} STATIC ${_HEADERS} ${_SOURCES})
-        set_target_properties(${target} PROPERTIES COMPILE_FLAGS "-fPIC") # -fPIC required for x86_64 static libs
+        set_target_properties(${target} PROPERTIES COMPILE_FLAGS "-fPIC") # -fPIC required for x86_64 static libs
+        SET_TARGET_PROPERTIES("${target}" PROPERTIES OUTPUT_NAME "${target_output}")
       ELSEIF(BUILD_SHARED_LIB)
         SET(target "${target}-shared")
         SET(target_output "${_NAME}-shared")
-        ADD_LIBRARY(${target} SHARED ${_HEADERS} ${_SOURCES})
-        #MESSAGE(FATAL_ERROR "_SWIG_PY: ${_SWIG_PY}")
+        ADD_LIBRARY(${target} SHARED ${_HEADERS} ${_SOURCES})
+        SET_TARGET_PROPERTIES("${target}" PROPERTIES OUTPUT_NAME "${target_output}")
         IF(_SWIG_PY)
           SET(wrap_package_uri "${target_uri}-shared")
           SWIG_PYTHON(NAME   py_${_NAME}
                       SOURCE ${_SWIG_PY}
-                      WRAP_PACKAGE_URI   ${wrap_package_uri})
+                      WRAP_PACKAGE_URI   ${wrap_package_uri})
         ENDIF()
       ELSE()
         MESSAGE(FATAL_ERROR "this shouldn't happen")
       ENDIF()
-      SET_TARGET_PROPERTIES("${target}" PROPERTIES OUTPUT_NAME "${target_output}")
-      CHECK_FOR_MISSING_SYMBOLS(${target})
-
       TARGET_LINK_LIBRARIES(${target} ${required_libraries})
+      CHECK_FOR_MISSING_SYMBOLS(${target})
       INCLUDE(${cmakesnap_DIR}/internal/cpp_install_common.cmake)
     ENDIF()


fpta-cmake: fix add_compile_flags macro.

--- cmake.fpta/utils.cmake
+++ cmake.fpta/utils.cmake
@@ -2,9 +2,9 @@
   foreach(_lang ${langs})
     string(REPLACE ";" " " _flags "${ARGN}")
     set("${_lang}_FLAGS" "${${_lang}_FLAGS} ${_flags}")
-    unset(${_lang})
-    unset(${_flags})
   endforeach()
+  unset(_lang)
+  unset(_flags)
 endmacro(add_compile_flags)

 macro(set_source_files_compile_flags)


Add GENERATE_TODOLIST var

Add GENERATE_TODOLIST var

--- cmake/DoxygenDoc.cmake
+++ cmake/DoxygenDoc.cmake
@@ -1,3 +1,12 @@
+# Only generate the TODO page in Debug configurations. Note that this only
+# works for single-configuration generators like make. The idea is not to
+# install a TODO list page in the API docs when releasing a project.
+set(DEVBASE_DOXYGEN_GENERATE_TODOLIST "NO")
+if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+    set(DEVBASE_DOXYGEN_GENERATE_TODOLIST "YES")
+endif()
+
+
 set(DOXYGEN_TEMPLATE "
     ALWAYS_DETAILED_SEC     = YES
     BUILTIN_STL_SUPPORT     = YES
@@ -11,7 +20,7 @@
     FILE_PATTERNS           = *.h *.hpp *.hxx *.c *.cc *.cpp *.cxx *.dox *.md ${FERN_EXTERNAL_SOURCES_FILE_PATTERNS}
     FULL_PATH_NAMES         = YES
     GENERATE_LATEX          = NO
-    GENERATE_TODOLIST       = ${FERN_DOXYGEN_GENERATE_TODOLIST}
+    GENERATE_TODOLIST       = ${DEVBASE_DOXYGEN_GENERATE_TODOLIST}
     HAVE_DOT                = YES
     INCLUDE_GRAPH           = YES
     INHERIT_DOCS            = YES


removed cmake in favor to submodules

removed cmake in favor to submodules

--- cmake/FindFFmpeg.cmake
+++ cmake/FindFFmpeg.cmake
@@ -1,148 +0,0 @@
-# vim: ts=2 sw=2
-# - Try to find the required ffmpeg components(default: AVFORMAT, AVUTIL, AVCODEC)
-#
-# Once done this will define
-#  FFMPEG_FOUND         - System has the all required components.
-#  FFMPEG_INCLUDE_DIRS  - Include directory necessary for using the required components headers.
-#  FFMPEG_LIBRARIES     - Link these to use the required ffmpeg components.
-#  FFMPEG_DEFINITIONS   - Compiler switches required for using the required ffmpeg components.
-#
-# For each of the components it will additionally set.
-#   - AVCODEC
-#   - AVDEVICE
-#   - AVFORMAT
-#   - AVUTIL
-#   - POSTPROCESS
-#   - SWSCALE
-# the following variables will be defined
-#  <component>_FOUND        - System has <component>
-#  <component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers
-#  <component>_LIBRARIES    - Link these to use <component>
-#  <component>_DEFINITIONS  - Compiler switches required for using <component>
-#  <component>_VERSION      - The components version
-#
-# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org>
-# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
-# Copyright (c) 2011, Michael Jansen, <kde@michael-jansen.biz>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-include(FindPackageHandleStandardArgs)
-
-# The default components were taken from a survey over other FindFFMPEG.cmake files
-if (NOT FFmpeg_FIND_COMPONENTS)
-  set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL)
-endif ()
-
-#
-### Macro: set_component_found
-#
-# Marks the given component as found if both *_LIBRARIES AND *_INCLUDE_DIRS is present.
-#
-macro(set_component_found _component )
-  if (${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS)
-    # message(STATUS "  - ${_component} found.")
-    set(${_component}_FOUND TRUE)
-  else ()
-    # message(STATUS "  - ${_component} not found.")
-  endif ()
-endmacro()
-
-#
-### Macro: find_component
-#
-# Checks for the given component by invoking pkgconfig and then looking up the libraries and
-# include directories.
-#
-macro(find_component _component _pkgconfig _library _header)
-
-  if (NOT WIN32)
-     # use pkg-config to get the directories and then use these values
-     # in the FIND_PATH() and FIND_LIBRARY() calls
-     find_package(PkgConfig)
-     if (PKG_CONFIG_FOUND)
-       pkg_check_modules(PC_${_component} ${_pkgconfig})
-     endif ()
-  endif (NOT WIN32)
-
-  find_path(${_component}_INCLUDE_DIRS ${_header}
-    HINTS
-      ${PC_LIB${_component}_INCLUDEDIR}
-      ${PC_LIB${_component}_INCLUDE_DIRS}
-    PATH_SUFFIXES
-      ffmpeg
-  )
-
-  find_library(${_component}_LIBRARIES NAMES ${_library}
-      HINTS
-      ${PC_LIB${_component}_LIBDIR}
-      ${PC_LIB${_component}_LIBRARY_DIRS}
-  )
-
-  set(${_component}_DEFINITIONS  ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
-  set(${_component}_VERSION      ${PC_${_component}_VERSION}      CACHE STRING "The ${_component} version number.")
-
-  set_component_found(${_component})
-
-  mark_as_advanced(
-    ${_component}_INCLUDE_DIRS
-    ${_component}_LIBRARIES
-    ${_component}_DEFINITIONS
-    ${_component}_VERSION)
-
-endmacro()
-
-
-# Check for cached results. If there are skip the costly part.
-if (NOT FFMPEG_LIBRARIES)
-
-  # Check for all possible component.
-  find_component(AVCODEC  libavcodec  avcodec  libavcodec/avcodec.h)
-  find_component(AVFORMAT libavformat avformat libavformat/avformat.h)
-  find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
-  find_component(AVUTIL   libavutil   avutil   libavutil/avutil.h)
-  find_component(SWSCALE  libswscale  swscale  libswscale/swscale.h)
-  find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h)
-
-  # Check if the required components were found and add their stuff to the FFMPEG_* vars.
-  foreach (_component ${FFmpeg_FIND_COMPONENTS})
-    if (${_component}_FOUND)
-      # message(STATUS "Required component ${_component} present.")
-      set(FFMPEG_LIBRARIES   ${FFMPEG_LIBRARIES}   ${${_component}_LIBRARIES})
-      set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
-      list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
-    else ()
-      # message(STATUS "Required component ${_component} missing.")
-    endif ()
-  endforeach ()
-
-  # Build the include path with duplicates removed.
-  if (FFMPEG_INCLUDE_DIRS)
-    list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
-  endif ()
-
-  # cache the vars.
-  set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFmpeg include directories." FORCE)
-  set(FFMPEG_LIBRARIES    ${FFMPEG_LIBRARIES}    CACHE STRING "The FFmpeg libraries." FORCE)
-  set(FFMPEG_DEFINITIONS  ${FFMPEG_DEFINITIONS}  CACHE STRING "The FFmpeg cflags." FORCE)
-
-  mark_as_advanced(FFMPEG_INCLUDE_DIRS
-                   FFMPEG_LIBRARIES
-                   FFMPEG_DEFINITIONS)
-
-endif ()
-
-# Now set the noncached _FOUND vars for the components.
-foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE)
-  set_component_found(${_component})
-endforeach ()
-
-# Compile the list of required vars
-set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
-foreach (_component ${FFmpeg_FIND_COMPONENTS})
-  list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
-endforeach ()
-
-# Give a nice error message if some of the required vars are missing.
-find_package_handle_standard_args(FFmpeg DEFAULT_MSG ${_FFmpeg_REQUIRED_VARS})


Improve Linux FMI Library search

Improve Linux FMI Library search

This will search for FMI Library files using Linux naming conventions.

--- cmake/FindFMILIB.cmake
+++ cmake/FindFMILIB.cmake
@@ -32,7 +32,12 @@

 # Find static library, and use its path prefix to provide a HINTS option to the
 # other find_*() commands.
-find_library (FMILIB_LIBRARY "fmilib"
+if (UNIX)
+    set (_FMILIB_oldsuffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
+    set (CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+endif ()
+find_library (FMILIB_LIBRARY
+    NAMES "fmilib2" "fmilib"
     PATHS ${FMILIB_DIR} $ENV{FMILIB_DIR}
     PATH_SUFFIXES "lib")
 mark_as_advanced (FMILIB_LIBRARY)
@@ -45,7 +50,11 @@
 endif ()

 # Find shared/import library and append its path prefix to the HINTS option.
-find_library (FMILIB_SHARED_LIBRARY "fmilib_shared"
+if (UNIX)
+    set (CMAKE_FIND_LIBRARY_SUFFIXES ".so")
+endif ()
+find_library (FMILIB_SHARED_LIBRARY
+    NAMES "fmilib2" "fmilib"
     ${_FMILIB_hints}
     PATHS ${FMILIB_DIR} $ENV{FMILIB_DIR}
     PATH_SUFFIXES "lib")
@@ -58,6 +67,12 @@
     endif ()
     list (APPEND _FMILIB_hints "${_FMILIB_shared_prefix}")
     unset (_FMILIB_shared_prefix)
+endif ()
+
+# Reset CMAKE_FIND_LIBRARY_SUFFIXES
+if (UNIX)
+    set (CMAKE_FIND_LIBRARY_SUFFIXES ${_FMILIB_oldsuffixes})
+    unset (_FMILIB_oldsuffixes)
 endif ()

 # Find header files and, on Windows, the dynamic library


Fix computation of LUAJIT_INCLUDE_DIR

Fix computation of LUAJIT_INCLUDE_DIR

I don't think the current way cmake uses to locate the correct lua.h
works.  Entries like "include/foo.h" cause cmake to look for a file
like "/usr/include/include/foo.h".  I.e., the include/ prefix for
all the entries is wrong as is adding "include" at the end.

This patch removes the prefix.  With it bcc finally compiles on
Fedora.

If this change causes a problem there is something seriously wrong
with cmake.

--- cmake/FindLuaJIT.cmake
+++ cmake/FindLuaJIT.cmake
@@ -31,7 +31,7 @@
 FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
   HINTS
   $ENV{LUAJIT_DIR}
-  PATH_SUFFIXES include/luajit-2.0 include/luajit2.0 include/luajit include/luajit-2.1 include
+  PATH_SUFFIXES luajit-2.0 luajit2.0 luajit luajit-2.1
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks


Fix typo

Fix typo

--- cmake/FindPython.cmake
+++ cmake/FindPython.cmake
@@ -122,7 +122,7 @@
             ${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt @ONLY)
         set_target_properties(${name} PROPERTIES
             LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt")
-    ELSE
+    ELSE()
         add_library(${name} SHARED ${ARGN})
     ENDIF()
     set_target_properties(${name} PROPERTIES PREFIX "")


Add new service: appsync, guardduty & mq.

--- cmake/sdksCommon.cmake
+++ cmake/sdksCommon.cmake
@@ -24,6 +24,7 @@
 list(APPEND C2J_LIST "application-autoscaling:2016-02-06")
 list(APPEND C2J_LIST "AWSMigrationHub:2017-05-31")
 list(APPEND C2J_LIST "appstream:2016-12-01")
+list(APPEND C2J_LIST "appsync:2017-07-25")
 list(APPEND C2J_LIST "athena:2017-05-18")
 list(APPEND C2J_LIST "autoscaling:2011-01-01")
 list(APPEND C2J_LIST "batch:2016-08-10")
@@ -55,11 +56,6 @@
 list(APPEND C2J_LIST "ds:2015-04-16")
 list(APPEND C2J_LIST "dynamodb:2012-08-10")
 list(APPEND C2J_LIST "dynamodbstreams:2012-08-10")
-list(APPEND C2J_LIST "mediapackage:2017-10-12")
-list(APPEND C2J_LIST "medialive:2017-10-14")
-list(APPEND C2J_LIST "mediaconvert:2017-08-29")
-list(APPEND C2J_LIST "mediastore:2017-09-01")
-list(APPEND C2J_LIST "mediastore-data:2017-09-01")

 if(NOT PLATFORM_ANDROID OR NOT CMAKE_HOST_WIN32)  # ec2 isn't building for android on windows atm due to an internal compiler error, TODO: investigate further
     list(APPEND C2J_LIST "ec2:2016-11-15")
@@ -81,6 +77,7 @@
 list(APPEND C2J_LIST "glacier:2012-06-01")
 list(APPEND C2J_LIST "glue:2017-03-31")
 list(APPEND C2J_LIST "greengrass:2017-06-07")
+list(APPEND C2J_LIST "guardduty:2017-11-28")
 list(APPEND C2J_LIST "health:2016-08-04")
 list(APPEND C2J_LIST "iam:2010-05-08")
 list(APPEND C2J_LIST "importexport:2010-06-01")
@@ -98,9 +95,15 @@
 list(APPEND C2J_LIST "machinelearning:2014-12-12")
 list(APPEND C2J_LIST "marketplacecommerceanalytics:2015-07-01")
 list(APPEND C2J_LIST "marketplace-entitlement:2017-01-11")
+list(APPEND C2J_LIST "mediaconvert:2017-08-29")
+list(APPEND C2J_LIST "medialive:2017-10-14")
+list(APPEND C2J_LIST "mediapackage:2017-10-12")
+list(APPEND C2J_LIST "mediastore:2017-09-01")
+list(APPEND C2J_LIST "mediastore-data:2017-09-01")
 list(APPEND C2J_LIST "meteringmarketplace:2016-01-14")
 list(APPEND C2J_LIST "mobileanalytics:2014-06-05")
 list(APPEND C2J_LIST "monitoring:2010-08-01")
+list(APPEND C2J_LIST "mq:2017-11-27")
 list(APPEND C2J_LIST "mturk-requester:2017-01-17")
 list(APPEND C2J_LIST "opsworks:2013-02-18")
 list(APPEND C2J_LIST "opsworkscm:2016-11-01")


catkin_add_gtest: Drop explicit add_dependencies(), rely on CMake. (#917)

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -173,9 +173,6 @@

   assert(${type_upper}_LIBRARIES)
   target_link_libraries(${target} ${${type_upper}_LIBRARIES} ${THREADS_LIBRARY})
-
-  # make sure gtest/gmock is built before the target
-  add_dependencies(${target} ${${type_upper}_LIBRARIES})
 endfunction()

 # Internal function for finding gtest or gmock sources


Fix args

Fix args

--- ValgrindTest.cmake
+++ ValgrindTest.cmake
@@ -7,7 +7,7 @@

 function(add_valgrind_test)
 	set(options)
-	set(singleValueOpts TARGET EXECUTABLE ENABLE_MEMCHECK)
+	set(singleValueOpts TARGET EXECUTABLE MEMCHECK)
 	set(multiValueOpts VALGRIND_ARGS EXECUTABLE_ARGS)

 	cmake_parse_arguments(ADD_VALGRIND_TEST "${options}" "${singleValueOpts}" "${multiValueOpts}" ${ARGN})
@@ -20,7 +20,7 @@
 		set(ADD_VALGRIND_TEST_EXECUTABLE "${PROJECT_BINARY_DIR}/tests/${ADD_VALGRIND_TEST_TARGET}")
 	endif()

-	if (NOT ADD_VALGRIND_TEST_ENABLE_MEMCHECK OR NOT VALGRIND_COMMAND)
+	if (NOT ADD_VALGRIND_TEST_MEMCHECK OR NOT VALGRIND_COMMAND)
 		add_test(${ADD_VALGRIND_TEST_TARGET} ${ADD_VALGRIND_TEST_EXECUTABLE} ${ADD_VALGRIND_TEST_EXECUTABLE_ARGS})
 	else ()
 		add_test(${ADD_VALGRIND_TEST_TARGET} ${VALGRIND_COMMAND} --leak-check=full --error-exitcode=5 ${ADD_VALGRIND_TEST_VALGRIND_ARGS} --quiet ${ADD_VALGRIND_TEST_EXECUTABLE} ${ADD_VALGRIND_TEST_EXECUTABLE_ARGS})
@@ -30,7 +30,7 @@

 function(add_valgrind_profile)
 	set(options)
-	set(singleValueOpts TARGET EXECUTABLE ENABLE_PROFILING)
+	set(singleValueOpts TARGET EXECUTABLE PROFILING)
 	set(multiValueOpts VALGRIND_ARGS EXECUTABLE_ARGS)

 	cmake_parse_arguments(ADD_VALGRIND_PROFILE "${options}" "${singleValueOpts}" "${multiValueOpts}" ${ARGN})
@@ -43,7 +43,7 @@
 		set(ADD_VALGRIND_PROFILE_EXECUTABLE "${PROJECT_BINARY_DIR}/tests/${ADD_VALGRIND_PROFILE_TARGET}")
 	endif()

-	if (NOT ADD_VALGRIND_PROFILE_ENABLE_PROFILING OR NOT VALGRIND_COMMAND)
+	if (NOT ADD_VALGRIND_PROFILE_PROFILING OR NOT VALGRIND_COMMAND)
 		add_test(${ADD_VALGRIND_PROFILE_TARGET} ${ADD_VALGRIND_PROFILE_EXECUTABLE} ${ADD_VALGRIND_PROFILE_EXECUTABLE_ARGS})
 	else ()
 		add_test(${ADD_VALGRIND_PROFILE_TARGET} ${VALGRIND_COMMAND} --tool=callgrind --error-exitcode=5 ${ADD_VALGRIND_PROFILE_VALGRIND_ARGS} --quiet ${ADD_VALGRIND_PROFILE_EXECUTABLE} ${ADD_VALGRIND_PROFILE_EXECUTABLE_ARGS})
@@ -53,7 +53,7 @@

 function(add_valgrind_profile_test)
 	set(options)
-	set(singleValueOpts TARGET EXECUTABLE ENABLE_PROFILING ENABLE_MEMCHECK)
+	set(singleValueOpts TARGET EXECUTABLE PROFILING MEMCHECK)
 	set(multiValueOpts VALGRIND_ARGS EXECUTABLE_ARGS)

 	cmake_parse_arguments(ADD_VALGRIND_PROFILE_TEST "${options}" "${singleValueOpts}" "${multiValueOpts}" ${ARGN})
@@ -66,10 +66,10 @@
 		set(ADD_VALGRIND_PROFILE_TEST_EXECUTABLE "${PROJECT_BINARY_DIR}/tests/${ADD_VALGRIND_PROFILE_TEST_TARGET}")
 	endif()

-	if (ADD_VALGRIND_PROFILE_TEST_ENABLE_PROFILING)
-		add_valgrind_profile(ADD_VALGRIND_PROFILE_TEST_ENABLE_PROFILING TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
+	if (ADD_VALGRIND_PROFILE_TEST_PROFILING)
+		add_valgrind_profile(PROFILING ${ADD_VALGRIND_PROFILE_TEST_PROFILING} TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
 	else()
-		add_valgrind_test(ADD_VALGRIND_PROFILE_TEST_ENABLE_MEMCHECK TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
+		add_valgrind_test(MEMCHECK ${ADD_VALGRIND_PROFILE_TEST_MEMCHECK} TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
 	endif()

 endfunction()


Update xrootd to v4.12.8 (it contains critical patch fixing compilation on Debian/Arch)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -918,8 +918,8 @@
 endif()

 if(builtin_xrootd)
-  set(XROOTD_VERSION 4.12.3)
-  set(XROOTD_VERSIONNUM 400120003)
+  set(XROOTD_VERSION 4.12.8)
+  set(XROOTD_VERSIONNUM 400120008)
   set(XROOTD_SRC_URI ${lcgpackages}/xrootd-${XROOTD_VERSION}.tar.gz)
   set(XROOTD_DESTDIR ${CMAKE_BINARY_DIR})
   set(XROOTD_ROOTDIR ${XROOTD_DESTDIR})
@@ -938,7 +938,7 @@
   ExternalProject_Add(
     XROOTD
     URL ${XROOTD_SRC_URI}
-    URL_HASH SHA256=6f2ca1accc8d49d605706bb556777c753860bf46d845b1ee11393a5cb5987f15
+    URL_HASH SHA256=86d8e4bd7382fb3053002cf3d58b997623d1d26db93c8891080603827f01b4cd
     INSTALL_DIR ${XROOTD_ROOTDIR}
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
                -DCMAKE_BUILD_TYPE=Release


formatting

formatting

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1613,7 +1613,7 @@
                   -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
                   -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=""
                   -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=""
-                      # Disable install step
+    # Disable install step
     INSTALL_COMMAND ""
     BUILD_BYPRODUCTS ${_gtest_byproducts}
     # Wrap download, configure and build steps in a script to log output


More patterns for "flush cache" operation

--- cmake/modules/hunter_flush_cache_variables.cmake
+++ cmake/modules/hunter_flush_cache_variables.cmake
@@ -1,12 +1,73 @@
 # Copyright (c) 2015, Ruslan Baratov
 # All rights reserved.

+include(hunter_status_debug)
 include(hunter_test_string_not_empty)
 include(hunter_unsetvar)

 function(hunter_flush_cache_variables hunter_self)
   hunter_test_string_not_empty("${hunter_self}")

+  hunter_status_debug("Flushing cache")
+
+  # Read list of all cache variables and unset '*_{ROOT|Dir|DIR}' {
+  get_directory_property(cache_list CACHE_VARIABLES)
+
+  foreach(x ${cache_list})
+    set(cleanup FALSE)
+    if(x MATCHES "^.*_ROOT$")
+      set(cleanup TRUE)
+    endif()
+    if(x MATCHES "^.*_DIR$")
+      set(cleanup TRUE)
+    endif()
+    if(x MATCHES "^.*_Dir$")
+      set(cleanup TRUE)
+    endif()
+
+    # Exclude standard variables {
+    set(
+        std_variables_list
+        CMAKE_ROOT
+        CMAKE_INCLUDE_CURRENT_DIR
+        CMAKE_INSTALL_NAME_DIR
+        CMAKE_CACHEFILE_DIR
+        # Internal Hunter variables
+        HUNTER_ROOT
+        HUNTER_CACHED_ROOT
+    )
+    foreach(std_variable ${std_variables_list})
+      string(COMPARE EQUAL "${std_variable}" "${x}" is_std_var)
+      if(is_std_var)
+        set(cleanup FALSE)
+      endif()
+    endforeach()
+
+    set(
+        std_patterns_list
+        LIST_DIR
+        SOURCE_DIR
+        BINARY_DIR
+    )
+    foreach(std_pattern ${std_patterns_list})
+      if(x MATCHES "_${std_pattern}$")
+        set(cleanup FALSE)
+      endif()
+    endforeach()
+    # }
+
+    if(cleanup)
+      hunter_status_debug("Removing variable from cache:")
+      hunter_status_debug("  Name = '${x}'")
+      hunter_status_debug("  Value = '${${x}}'")
+      unset("${x}" CACHE)
+    endif()
+  endforeach()
+  # }
+
+  # Read list of all projects and unset regular, cache and environment variables
+  # with name '<package>_{ROOT|Dir|DIR}'
+  # {
   set(directory_with_projects "${hunter_self}/cmake/projects")
   file(
       GLOB projects
@@ -34,4 +95,5 @@
     hunter_unsetvar("${x}_Dir")
     hunter_unsetvar("${x}_DIR")
   endforeach()
+  # }
 endfunction()


esptool_py: fix passing arguments to cmake -P

Fixes WORKING_DIRECTORY argument being passed with spaces escaped `\ `
which causes failure in run_cmd.cmake, since the WORKING_DIRECTORY is
interpreted as having a literal backslash character in it.

--- components/esptool_py/project_include.cmake
+++ components/esptool_py/project_include.cmake
@@ -148,23 +148,25 @@

 add_custom_target(erase_flash
     COMMAND ${CMAKE_COMMAND}
-    -D IDF_PATH="${idf_path}"
-    -D SERIAL_TOOL="${ESPTOOLPY}"
-    -D SERIAL_TOOL_ARGS="erase_flash"
+    -D "IDF_PATH=${idf_path}"
+    -D "SERIAL_TOOL=${ESPTOOLPY}"
+    -D "SERIAL_TOOL_ARGS=erase_flash"
     -P run_serial_tool.cmake
     WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
     USES_TERMINAL
+    VERBATIM
     )

 add_custom_target(monitor
     COMMAND ${CMAKE_COMMAND}
-    -D IDF_PATH="${idf_path}"
-    -D SERIAL_TOOL="${ESPMONITOR}"
-    -D SERIAL_TOOL_ARGS="--target;${target};${monitor_rev_args};${elf_dir}/${elf}"
-    -D WORKING_DIRECTORY="${build_dir}"
+    -D "IDF_PATH=${idf_path}"
+    -D "SERIAL_TOOL=${ESPMONITOR}"
+    -D "SERIAL_TOOL_ARGS=--target;${target};${monitor_rev_args};${elf_dir}/${elf}"
+    -D "WORKING_DIRECTORY=${build_dir}"
     -P run_serial_tool.cmake
     WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
     USES_TERMINAL
+    VERBATIM
     )

 set(esptool_flash_main_args "--before=${CONFIG_ESPTOOLPY_BEFORE}")
@@ -347,13 +349,14 @@

     add_custom_target(${target_name}
         COMMAND ${CMAKE_COMMAND}
-        -D IDF_PATH="${idf_path}"
-        -D SERIAL_TOOL="${ESPTOOLPY}"
-        -D SERIAL_TOOL_ARGS="${main_args};write_flash;@${target_name}_args"
-        -D WORKING_DIRECTORY="${build_dir}"
+        -D "IDF_PATH=${idf_path}"
+        -D "SERIAL_TOOL=${ESPTOOLPY}"
+        -D "SERIAL_TOOL_ARGS=${main_args};write_flash;@${target_name}_args"
+        -D "WORKING_DIRECTORY=${build_dir}"
         -P ${esptool_py_dir}/run_serial_tool.cmake
         WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
         USES_TERMINAL
+        VERBATIM
         )

     set_target_properties(${target_name} PROPERTIES SUB_ARGS "${sub_args}")
@@ -388,13 +391,14 @@
     if(${encrypted})
         add_custom_target(encrypted-${target_name}
             COMMAND ${CMAKE_COMMAND}
-            -D IDF_PATH="${idf_path}"
-            -D SERIAL_TOOL="${ESPTOOLPY}"
-            -D SERIAL_TOOL_ARGS="${main_args};write_flash;@encrypted_${target_name}_args"
-            -D WORKING_DIRECTORY="${build_dir}"
+            -D "IDF_PATH=${idf_path}"
+            -D "SERIAL_TOOL=${ESPTOOLPY}"
+            -D "SERIAL_TOOL_ARGS=${main_args};write_flash;@encrypted_${target_name}_args"
+            -D "WORKING_DIRECTORY=${build_dir}"
             -P ${esptool_py_dir}/run_serial_tool.cmake
             WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
             USES_TERMINAL
+            VERBATIM
             )

         # Generate the parameters for esptool.py command


make CMAKE_FIND_ROOT_PATH_MODE variables configurable

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -408,9 +408,15 @@
   ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
   ${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks)
 # Only search the specified iOS SDK, not the remainder of the host filesystem.
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+if( NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM )
+  set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
+endif()
+if( NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY )
+  set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+endif()
+if( NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE )
+  set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+endif()
 # This little macro lets you set any XCode specific property.
 macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION)
   set(XCODE_RELVERSION_I "${XCODE_RELVERSION}")


no python for libxml2

no python for libxml2

--- libxml2.cmake
+++ libxml2.cmake
@@ -31,6 +31,7 @@
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ${libxml2_SRC_DIR}/configure
         --prefix=${BUILDEM_DIR}
         --enable-shared
+        --without-python
         LDFLAGS=${BUILDEM_LDFLAGS}
         CPPFLAGS=-I${BUILDEM_DIR}/include
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make


OpenEXR finding: Allow for custom library prefix and suffix

--- src/cmake/modules/FindOpenEXR.cmake
+++ src/cmake/modules/FindOpenEXR.cmake
@@ -7,6 +7,13 @@
 #   ILMBASE_LIBRARIES      libraries just IlmBase
 #   OPENEXR_VERSION        OpenEXR version (accurate for >= 2.0.0,
 #                              otherwise will just guess 1.6.1)
+#
+# Special inputs:
+#   OPENEXR_CUSTOM_INCLUDE_DIR - custom location of headers
+#   OPENEXR_CUSTOM_LIB_DIR - custom location of libraries
+#   OPENEXR_CUSTOM_LIB_PREFIX - special snowflake library prefix
+#   OPENEXR_CUSTOM_LIB_SUFFIX - special snowflake library suffix
+#

 # Other standarnd issue macros
 include (FindPackageHandleStandardArgs)
@@ -65,9 +72,10 @@
 set (_openexr_components IlmThread IlmImf Imath Iex Half)
 foreach (COMPONENT ${_openexr_components})
     string (TOUPPER ${COMPONENT} UPPERCOMPONENT)
-    find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${COMPONENT}
+    set (FULL_COMPONENT_NAME ${OPENEXR_CUSTOM_LIB_PREFIX}${COMPONENT}${OPENEXR_CUSTOM_LIB_SUFFIX})
+    find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME}
                   PATHS ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)
-    find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${COMPONENT})
+    find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME})
 endforeach ()

 # Set the FOUND, INCLUDE_DIR, and LIBRARIES variables.


fix handing of MANUALLY_ADDED_DEPENDENCIES

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -3121,6 +3121,7 @@
 			list (APPEND _unityTargetSources ${_unityFiles})
 		endif()
 	endforeach()
+	# handle object libraries which are part of the target's sources
 	get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)
 	if ("${_linkLibrariesStrategy}" MATCHES "^COPY_UNITY$")
 		cotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles})
@@ -3469,7 +3470,9 @@
 			get_target_property(_manualDependencies ${_target} MANUALLY_ADDED_DEPENDENCIES)
 			if (_manualDependencies)
 				cotire_map_libraries("${_linkLibrariesStrategy}" _unityManualDependencies ${_manualDependencies})
-				add_dependencies("${_unityTargetName}" _unityManualDependencies)
+				if (_unityManualDependencies)
+					add_dependencies("${_unityTargetName}" ${_unityManualDependencies})
+				endif()
 			endif()
 		endif()
 	endif()


Be consistent with colours/colors.

Be consistent with colours/colors.

--- cmake/Colors.cmake
+++ cmake/Colors.cmake
@@ -1,7 +1,7 @@
 IF(NOT WIN32)
   string(ASCII 27 Esc)
-  set(ColourReset "${Esc}[m")
-  set(ColourBold  "${Esc}[1m")
+  set(ColorReset "${Esc}[m")
+  set(ColorBold  "${Esc}[1m")
   set(Red         "${Esc}[31m")
   set(Green       "${Esc}[32m")
   set(Yellow      "${Esc}[33m")


cmake: Fixup cmake.python

cmake: Fixup cmake.python


CMake: allow python3.8 support

CMake: allow python3.8 support

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -39,7 +39,7 @@
 add_custom_target(Py${PROJECT_NAME}_proto DEPENDS ${PROTO_PYS} ortools::ortools)

 # Setup Python
-set(Python_ADDITIONAL_VERSIONS "3.7;3.6;3.5;2.7" CACHE STRING "Python to use for binding")
+set(Python_ADDITIONAL_VERSIONS "3.8;3.7;3.6;3.5;2.7" CACHE STRING "Python to use for binding")
 find_package(PythonInterp REQUIRED)
 # Force PythonLibs to find the same version than the python interpreter.
 set(Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_STRING}")


make BLAS3_MEM_ALLOC_THRESHOLD configurable on non-Windows

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -323,7 +323,13 @@
 set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
 endif ()
 endif ()
-
+if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (DEFINED BLAS3_MEM_ALLOC_THRESHOLD)
+if (NOT ${BLAS3_MEM_ALLOC_THRESHOLD} EQUAL 32)
+set(CCOMMON_OPT "${CCOMMON_OPT} -DBLAS3_MEM_ALLOC_THRESHOLD=${BLAS3_MEM_ALLOC_THRESHOLD}")
+endif()
+endif()
+endif()
 if (DEFINED LIBNAMESUFFIX)
   set(LIBPREFIX "libopenblas_${LIBNAMESUFFIX}")
 else ()


tooling-cmake-util: Only depend on source and generated sources

Previously, all checks would re-run if any source for a target
changed. This behaviour made little sense and inflated rebuild
times quite substantially. We now only depend on generated
source files to ensure that they get generated before checks
are run. We also don't run any additional checks which might
have been added by the same function.

--- PolysquareToolingUtil.cmake
+++ PolysquareToolingUtil.cmake
@@ -461,8 +461,9 @@

     # Get the basename of the file, used for the comment and stamp.
     get_filename_component (SRCNAME "${SOURCE}" NAME)
+    set (TOOLING_SIG "stamp")
     set (STAMPFILE
-         "${CMAKE_CURRENT_BINARY_DIR}/${SRCNAME}.${TOOL_NAME}.stamp")
+         "${CMAKE_CURRENT_BINARY_DIR}/${SRCNAME}.${TOOL_NAME}.${TOOLING_SIG}")
     set (COMMENT "Analyzing ${SRCNAME} with ${TOOL_NAME}")

     if (RUN_TOOL_ON_SOURCE_WORKING_DIRECTORY)
@@ -472,17 +473,39 @@

     endif ()

-    # Get all the sources on this target and make the new check depend on all
-    # of them. The reason why we depend on all of them instead of just the
-    # source that we are checking is that the source might include  a header
-    # file which is also generated. If the source includes that header file
+    # Get all the sources on this target and make the new check depend on the
+    # generated ones. The reason being that the source that we are checking
+    # might include a header file which is also generated and it will need to
+    # be generated first. If the source includes that header file
     # that header file doesn't exist, then the build will fail.
-    psq_strip_extraneous_sources (TARGET_SOURCES ${TARGET})
+    get_property (ALL_TARGET_SOURCES TARGET "${TARGET}" PROPERTY SOURCES)
+    set (TARGET_SOURCES_TO_GENERATE "${SOURCE}")
+    foreach (TARGET_SOURCE ${ALL_TARGET_SOURCES})
+        get_property (SOURCE_IS_GENERATED
+                      SOURCE "${TARGET_SOURCE}"
+                      PROPERTY GENERATED)
+        if (SOURCE_IS_GENERATED)
+            string (FIND "${TARGET_SOURCE}" "${TOOLING_SIG}" SIG_IDX REVERSE)
+            string (LENGTH "${TARGET_SOURCE}" TARGET_SOURCE_LEN)
+
+            if (NOT SIG_IDX EQUAL -1)
+                math (EXPR SIG_SIZE "${TARGET_SOURCE_LEN} - ${SIG_IDX}")
+            else ()
+                set (SIG_SIZE 0)
+            endif ()
+
+            # Exclude any
+            if (SIG_IDX EQUAL -1 OR NOT SIG_SIZE EQUAL 5)
+                list (APPEND TARGET_SOURCES_TO_GENERATE "${TARGET_SOURCE}")
+            endif ()
+        endif ()
+    endforeach ()

     add_custom_command (OUTPUT ${STAMPFILE}
                         COMMAND ${COMMAND}
                         COMMAND "${CMAKE_COMMAND}" -E touch "${STAMPFILE}"
-                        DEPENDS ${TARGET_SOURCES} ${RUN_TOOL_ON_SOURCE_DEPENDS}
+                        DEPENDS ${TARGET_SOURCES_TO_GENERATE}
+                                ${RUN_TOOL_ON_SOURCE_DEPENDS}
                         ${WORKING_DIRECTORY_OPTION}
                         COMMENT ${COMMENT}
                         VERBATIM)


[NOP] Comment in CMake build system.

[NOP] Comment in CMake build system.

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

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -438,6 +438,7 @@
         if (PYTHONINTERP_FOUND)
           add_test (NAME test_${EXECUTABLE}
                     COMMAND ${PYTHON_EXECUTABLE} ${CHECKER_PATH} ${ARGS})
+          #message(STATUS "add_test (NAME test_${EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE} ${CHECKER_PATH} ${ARGS})")
         endif (PYTHONINTERP_FOUND)
     endif ()
 endmacro (_seqan_setup_demo_test CPP_FILE)


ENH: Prefer https vs http for ctest submission.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
 set(CTEST_PROJECT_NAME "ITK")
 set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")

-set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_METHOD "https")
 set(CTEST_DROP_SITE "open.cdash.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=Insight")
 set(CTEST_DROP_SITE_CDASH TRUE)


Update android cmake toolchain with changes from original

See https://github.com/taka-no-me/android-cmake

--- toolchains/android.toolchain.cmake
+++ toolchains/android.toolchain.cmake
@@ -598,7 +598,7 @@
  endif()
  if( NOT __availableToolchains )
   file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK_TOOLCHAINS_PATH}" "${ANDROID_NDK_TOOLCHAINS_PATH}/*" )
-  if( __availableToolchains )
+  if( __availableToolchainsLst )
    list(SORT __availableToolchainsLst) # we need clang to go after gcc
   endif()
   __LIST_FILTER( __availableToolchainsLst "^[.]" )
@@ -989,7 +989,7 @@
   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" )
  elseif( ANDROID_STL MATCHES "gabi" )
   if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
-   message( FATAL_ERROR "gabi++ is not awailable in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.")
+   message( FATAL_ERROR "gabi++ is not available in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.")
   endif()
   set( ANDROID_RTTI             ON )
   set( ANDROID_EXCEPTIONS       OFF )
@@ -1119,6 +1119,12 @@
  set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "assembler" )
  set( CMAKE_STRIP        "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}"   CACHE PATH "strip" )
  set( CMAKE_AR           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}"      CACHE PATH "archive" )
+ if( EXISTS "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc-ar${TOOL_OS_SUFFIX}" )
+  # Use gcc-ar if we have it for better LTO support.
+  set( CMAKE_AR           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc-ar${TOOL_OS_SUFFIX}"      CACHE PATH "archive" )
+ else()
+  set( CMAKE_AR           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}"      CACHE PATH "archive" )
+ endif()
  set( CMAKE_LINKER       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}"      CACHE PATH "linker" )
  set( CMAKE_NM           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}"      CACHE PATH "nm" )
  set( CMAKE_OBJCOPY      "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" )


Add search for krb5 where libkrb5-dev puts it

--- lib/FindPGSQL.cmake
+++ lib/FindPGSQL.cmake
@@ -42,6 +42,7 @@
 	PATHS
 		/usr/lib
 		/usr/local/lib
+		/usr/lib/x86_64-linux-gnu/
 		/usr/lib/x86_64-linux-gnu/mit-krb5/
 		)


remove rpmmacros

remove rpmmacros

--- cmake/CreateRepo.cmake
+++ cmake/CreateRepo.cmake
@@ -8,6 +8,7 @@
 add_custom_target(packagerepo
   COMMAND mkdir -p ${REPO_PATH}
   COMMAND cp ${CMAKE_BINARY_DIR}/*.rpm ${REPO_PATH}
+  COMMAND rm -f ~/.rpmmacros
   COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/cmake/package/rpm/rpm_macros_gpg ~/.rpmmacros
   COMMAND rpm --addsign ${REPO_PATH}/*.rpm
   COMMAND createrepo ${REPO_PATH}


unbread FindRtMidi.cmake for linux also

unbread FindRtMidi.cmake for linux also

--- cmake/FindRtMidi.cmake
+++ cmake/FindRtMidi.cmake
@@ -4,7 +4,7 @@
 #  RTMIDI_INCLUDE_DIR - the RtMidi include directory
 #  RTMIDI_LIBRARIES - libraries to link against to use RtMidi

-find_path(RTMIDI_INCLUDE_DIR RtMidi.h HINTS ${RTMIDI_DIR})
+find_path(RTMIDI_INCLUDE_DIR RtMidi.h HINTS ${RTMIDI_DIR} PATH_SUFFIXES rtmidi)
 find_library(RTMIDI_LIBRARY NAMES librtmidi.a rtmidi HINTS ${RTMIDI_DIR})

 # On Mac OS we have to add framworks RtMidi depends on
@@ -16,7 +16,7 @@
 endif (RTMIDI_LIBRARY AND APPLE)

 set(RTMIDI_LIBRARIES ${RTMIDI_LIBRARY} ${RTMIDI_DEPENDENCIES})
-
+list(APPEND RTMIDI_INCLUDE_DIRS ${RTMIDI_INCLUDE_DIR})
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(RtMidi DEFAULT_MSG RTMIDI_LIBRARY RTMIDI_INCLUDE_DIR)


Remove .local suffix

Remove .local suffix

--- cmake/frc-deploy.cmake
+++ cmake/frc-deploy.cmake
@@ -25,7 +25,7 @@
 # Use FRC_PREFER_TARGET to try a specific target first
 # Can be "mdns", "usb", "static", or an address
 string(TOLOWER "${FRC_PREFER_TARGET}" FRC_PREFER_TARGET)
-set(target_mdns "roboRIO-${TEAM_NUMBER}-FRC.local")
+set(target_mdns "roboRIO-${TEAM_NUMBER}-FRC")
 set(target_usb "172.22.11.2")
 set(target_static "10.${TEAM_NUMBER_HIGH}.${TEAM_NUMBER_LOW}.2")
 set(_target_preferred "${target_${FRC_PREFER_TARGET}}")


Add new service: resource-groups

Add new service: resource-groups

--- cmake/sdksCommon.cmake
+++ cmake/sdksCommon.cmake
@@ -121,6 +121,7 @@
 list(APPEND C2J_LIST "rds:2014-10-31")
 list(APPEND C2J_LIST "redshift:2012-12-01")
 list(APPEND C2J_LIST "rekognition:2016-06-27")
+list(APPEND C2J_LIST "resource-groups:2017-11-27")
 list(APPEND C2J_LIST "resourcegroupstaggingapi:2017-01-26")
 list(APPEND C2J_LIST "route53:2013-04-01")
 list(APPEND C2J_LIST "route53domains:2014-05-15")


Fix to support higher number of arguments in variadic templates for visual c++

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -118,3 +118,9 @@
   set(GTEST_MAIN_LIBRARIES ${GTEST_MAIN_LIBRARIES} CACHE INTERNAL "")
   set(GTEST_BOTH_LIBRARIES ${GTEST_BOTH_LIBRARIES} CACHE INTERNAL "")
 endif()
+# For Visual C++, need to increase variadic template size to build gtest
+if(GTEST_FOUND)
+  if(MSVC)
+    add_definitions(/D _VARIADIC_MAX=10)
+  endif()
+endif()


Add default apps component

Add default apps component

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -30,9 +30,9 @@
 # Default component definition
 if(NOT CPACK_COMPONENTS_ALL)
   if(RELEASE_VERSION)
-    set(CPACK_COMPONENTS_ALL lib dev)
+    set(CPACK_COMPONENTS_ALL lib dev apps)
   else()
-    set(CPACK_COMPONENTS_ALL unspecified lib dev)
+    set(CPACK_COMPONENTS_ALL unspecified lib dev app)
   endif()

   set(CPACK_COMPONENT_UNSPECIFIED_DISPLAY_NAME "Unspecified")
@@ -47,6 +47,10 @@
   set(CPACK_COMPONENT_DEV_DESCRIPTION
     "Header and Library Files for ${CPACK_PROJECT_NAME} Development")
   set(CPACK_COMPONENT_DEV_DEPENDS lib)
+
+  set(CPACK_COMPONENT_APPS_DISPLAY_NAME "${CPACK_PROJECT_NAME} Applications")
+  set(CPACK_COMPONENT_APPS_DESCRIPTION "${CPACK_PROJECT_NAME} Applications")
+  set(CPACK_COMPONENT_APPS_DEPENDS lib)
 endif()

 # LSB system information


Squashed 'CMake/Basis/' changes from 8baba41..bec821b

bec821b fix: Setting of DEPENDS_<Pkg>_DIR from <Pkg>_EXECUTABLE

git-subtree-dir: CMake/Basis
git-subtree-split: bec821bfb8f206430409f78e3c91e7a6f3b4b15d

--- CommonTools.cmake
+++ CommonTools.cmake
@@ -468,7 +468,7 @@
                   if (${PKG}_EXECUTABLE MATCHES "^(.*)/bin/.*")
                     basis_update_value (DEPENDS_${PKG}_DIR "${CMAKE_MATCH_1}")
                   else ()
-                    get_filename_component (_BFP_EXECUTABLE_DIR "${${PKG}_EXECUTABLE}")
+                    get_filename_component (_BFP_EXECUTABLE_DIR "${${PKG}_EXECUTABLE}" PATH)
                     basis_update_value (DEPENDS_${PKG}_DIR "${_BFP_EXECUTABLE_DIR}")
                     unset (_BFP_EXECUTABLE_DIR)
                   endif ()
@@ -478,7 +478,7 @@
                     if (${PKG_U}_EXECUTABLE MATCHES "^(.*)/bin/.*")
                       basis_update_value (DEPENDS_${PKG}_DIR "${CMAKE_MATCH_1}")
                     else ()
-                      get_filename_component (_BFP_EXECUTABLE_DIR "${${PKG_U}_EXECUTABLE}")
+                      get_filename_component (_BFP_EXECUTABLE_DIR "${${PKG_U}_EXECUTABLE}" PATH)
                       basis_update_value (DEPENDS_${PKG}_DIR "${_BFP_EXECUTABLE_DIR}")
                       unset (_BFP_EXECUTABLE_DIR)
                     endif ()


Improve code to get library file name

Improve code to get library file name

--- Common.cmake
+++ Common.cmake
@@ -186,19 +186,14 @@
     set(THIS_DEFINITIONS) # clear THIS_DEFINITIONS-NOTFOUND
   endif()
   string(TOUPPER ${_target} _TARGET)
-  if(MSVC OR XCODE_VERSION)
-    list(APPEND THIS_DEFINITIONS
-      ${_TARGET}_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${_target}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
-  else()
-    if(APPLE)
-      list(APPEND THIS_DEFINITIONS
-        ${_TARGET}_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${_target}.${VERSION_ABI}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
-    else()
-      list(APPEND THIS_DEFINITIONS
-        ${_TARGET}_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${VERSION_ABI}\")
-    endif()
-  endif()
-  list(APPEND THIS_DEFINITIONS ${_TARGET}_SHARED)
+  get_target_property(_libraryname ${_target} OUTPUT_NAME)
+  if(NOT _libraryname)
+    get_target_property(_libraryname ${_target} LOCATION)
+  endif()
+  get_filename_component(_libraryname ${_libraryname} NAME)
+
+  list(APPEND THIS_DEFINITIONS
+    ${_TARGET}_SHARED ${_TARGET}_DSO_NAME=\"${_libraryname}\")

   set_target_properties(${_target} PROPERTIES
     COMPILE_DEFINITIONS "${THIS_DEFINITIONS}")


Made the resource compiler commands depend on the resource files so the get recompiled when they are changed.

--- sigma_setup.cmake
+++ sigma_setup.cmake
@@ -34,6 +34,7 @@
             OUTPUT ${texture_time_stamp}
             COMMAND ${TEXTURE_COMPILER} --output="${CMAKE_BINARY_DIR}/data" ${texture}
             COMMAND ${CMAKE_COMMAND} -E touch ${texture_time_stamp}
+            MAIN_DEPENDENCY "${texture}"
             WORKING_DIRECTORY ${package_root_path}
             COMMENT ""
             SOURCES ${texture}
@@ -52,6 +53,7 @@
             OUTPUT ${shader_time_stamp}
             COMMAND ${SHADER_COMPILER} --output="${CMAKE_BINARY_DIR}/data" ${shader}
             COMMAND ${CMAKE_COMMAND} -E touch ${shader_time_stamp}
+            MAIN_DEPENDENCY "${shader}"
             WORKING_DIRECTORY ${package_root_path}
             COMMENT ""
             SOURCES ${shader}
@@ -70,6 +72,7 @@
             OUTPUT ${material_time_stamp}
             COMMAND ${MATERIAL_COMPILER} --output="${CMAKE_BINARY_DIR}/data" ${material}
             COMMAND ${CMAKE_COMMAND} -E touch ${material_time_stamp}
+            MAIN_DEPENDENCY "${material}"
             WORKING_DIRECTORY ${package_root_path}
             COMMENT ""
             SOURCES ${material}
@@ -88,6 +91,7 @@
             OUTPUT ${model_time_stamp}
             COMMAND ${MODEL_COMPILER} --output="${CMAKE_BINARY_DIR}/data" ${model}
             COMMAND ${CMAKE_COMMAND} -E touch ${model_time_stamp}
+            MAIN_DEPENDENCY "${model}"
             WORKING_DIRECTORY ${package_root_path}
             COMMENT ""
             SOURCES ${model}