Target naming consistency

Target naming consistency

--- SubProject.cmake
+++ SubProject.cmake
@@ -16,9 +16,9 @@
 # sub directories. See also: cmake command 'add_subdirectory'.
 #
 # The following targets are created by SubProject.cmake:
-# - An 'update_git_subprojects_${PROJECT_NAME}' target to update the <gittag> of
+# - An '${PROJECT_NAME}-update-git-subprojects' target to update the <gittag> of
 #   all the .gitsubprojects entries to their latest respective origin/master ref
-# - A generic 'update' target to execute 'update_git_subrojects' recursively
+# - A generic 'update' target to execute 'update-git-subrojects' recursively
 # - A <project>-all target to build only the given sub project
 #
 # To be compatible with the SubProject feature, (sub)projects might need to
@@ -236,18 +236,18 @@
     list(REMOVE_DUPLICATES __subproject_paths)
     set_property(GLOBAL PROPERTY SUBPROJECT_PATHS ${__subproject_paths})

-    add_custom_target(update_git_subprojects_${PROJECT_NAME}
+    add_custom_target(${PROJECT_NAME}-update-git-subprojects
       COMMAND ${CMAKE_COMMAND} -P ${GIT_SUBPROJECTS_SCRIPT}
       COMMENT "Update ${PROJECT_NAME}/.gitsubprojects"
       WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
-    set_target_properties(update_git_subprojects_${PROJECT_NAME} PROPERTIES
+    set_target_properties(${PROJECT_NAME}-update-git-subprojects PROPERTIES
       EXCLUDE_FROM_DEFAULT_BUILD ON FOLDER ${PROJECT_NAME}/zzphony)

     if(NOT TARGET update)
       add_custom_target(update)
       set_target_properties(update PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON)
     endif()
-    add_dependencies(update update_git_subprojects_${PROJECT_NAME})
+    add_dependencies(update ${PROJECT_NAME}-update-git-subprojects)
   endif()
 endif()


STYLE: Add package rules for extension before ExternalProjectAdd

The rules must be set before, otherwise an error is printed in function _sb_append_to_cmake_args from file ExternalProjectDependency.cmake since the project will already be added

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -355,28 +355,6 @@
 set( DTI-RegTOOL DTI-Reg )
 set( DTI-Reg_INSTALL_DIRECTORY ${EXTERNAL_BINARY_DIRECTORY}/DTI-Reg-install )
 set(proj_build ${proj}-build)
-ExternalProject_Add(${proj}
-  DEPENDS ${${LOCAL_PROJECT_NAME}_DEPENDENCIES}
-  DOWNLOAD_COMMAND ""
-  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
-  BINARY_DIR ${proj}-build
-  CMAKE_GENERATOR ${gen}
-  CMAKE_ARGS
-    --no-warn-unused-cli # HACK Only expected variables should be passed down.
-    ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
-    ${COMMON_EXTERNAL_PROJECT_ARGS}
-    -D${LOCAL_PROJECT_NAME}_SUPERBUILD:BOOL=OFF
-    -DCMAKE_INSTALL_PREFIX:PATH=${DTI-Reg_INSTALL_DIRECTORY}
-  )
-
-# Force rebuilding of the main subproject every time building from super structure
-ExternalProject_Add_Step(${proj} forcebuild
-    COMMAND ${CMAKE_COMMAND} -E remove
-    ${CMAKE_CURRENT_BUILD_DIR}/${proj}-prefix/src/${proj}-stamp/${proj}-build
-    DEPENDEES configure
-    DEPENDERS build
-    ALWAYS 1
-  )

 if( DTI-Reg_BUILD_SLICER_EXTENSION )
   unsetForSlicer( NAMES SlicerExecutionModel_DIR DCMTK_DIR ITK_DIR CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS CMAKE_C_FLAGS zlib_DIR ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
@@ -404,4 +382,25 @@
   endforeach()
 endif()

-
+ExternalProject_Add(${proj}
+  DEPENDS ${${LOCAL_PROJECT_NAME}_DEPENDENCIES}
+  DOWNLOAD_COMMAND ""
+  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+  BINARY_DIR ${proj}-build
+  CMAKE_GENERATOR ${gen}
+  CMAKE_ARGS
+    --no-warn-unused-cli # HACK Only expected variables should be passed down.
+    ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
+    ${COMMON_EXTERNAL_PROJECT_ARGS}
+    -D${LOCAL_PROJECT_NAME}_SUPERBUILD:BOOL=OFF
+    -DCMAKE_INSTALL_PREFIX:PATH=${DTI-Reg_INSTALL_DIRECTORY}
+  )
+
+# Force rebuilding of the main subproject every time building from super structure
+ExternalProject_Add_Step(${proj} forcebuild
+    COMMAND ${CMAKE_COMMAND} -E remove
+    ${CMAKE_CURRENT_BUILD_DIR}/${proj}-prefix/src/${proj}-stamp/${proj}-build
+    DEPENDEES configure
+    DEPENDERS build
+    ALWAYS 1
+  )


[BUILD] reverse 920d338ac1ef9d294a34249de33b02fafeed57e7 partially

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -134,8 +134,6 @@
 # Create the payload binary ZIP file.
 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
   set (SEQAN_PLATFORM "lnx")
-elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSd")
-  set (SEQAN_PLATFORM "lnx")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
   set (SEQAN_PLATFORM "win")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")


Fix unknown CMake command lua_add_executable

Commit 99474236bdf89cb3450776a61a458d449708b9e1 replaced the macro
`luajit_add_executable` by `lua_add_executable` which breaks building
luvi with shared libs.

Replace the macro name in LuaJITAddExecutable.cmake too.

Closes: https://github.com/luvit/luvi/issues/147

--- cmake/Modules/LuaJITAddExecutable.cmake
+++ cmake/Modules/LuaJITAddExecutable.cmake
@@ -52,7 +52,7 @@
   ENDFOREACH(file)
 ENDMACRO()

-MACRO(LUAJIT_ADD_EXECUTABLE luajit_target)
+MACRO(LUA_ADD_EXECUTABLE luajit_target)
   LUAJIT_add_custom_commands(${luajit_target} ${ARGN})
   add_executable(${luajit_target} ${target_srcs})
-ENDMACRO(LUAJIT_ADD_EXECUTABLE luajit_target)
+ENDMACRO(LUA_ADD_EXECUTABLE luajit_target)


Commit 4a9ecb63b09f4b2e170bf79bac1873c37a832b54 reverted. This does nothing.

--- cmake/OpenMACoverallsCustomTarget.cmake
+++ cmake/OpenMACoverallsCustomTarget.cmake
@@ -11,7 +11,7 @@
     COMMAND ${CMAKE_COMMAND}
       -DCOVERAGE_SRC_PATH="${PROJECT_SOURCE_DIR}/modules"
       -DCOVERAGE_SRC_EXCLUDED=".*_p.h::.*test.*::.*bindings.*::.*plugins.*"
-      -DCOVERAGE_BIN_EXCLUDED=".*3rdparty.*::.*Xcode.*"
+      -DCOVERAGE_BIN_EXCLUDED=".*3rdparty.*"
       -DCOVERALLS_OUTPUT_FILE="${COVERALLS_FILE}"
       -DCOV_PATH="${PROJECT_BINARY_DIR}"
       -DPROJECT_ROOT="${PROJECT_SOURCE_DIR}"


ORC-1067: Upgrade ZSTD to 1.5.1 (#981)

ORC-1067: Upgrade ZSTD to 1.5.1 (#981)

### What changes were proposed in this pull request?

Upgrade zstd in the C++ library to version 1.5.1.

### Why are the changes needed?
This version is primarily a maintenance release that contains a variety of small bug fixes and improvements to the testing process. It also includes small performance improvements (~3-5%) at the fast compression levels. The release notes are here:

https://github.com/facebook/zstd/releases/tag/v1.5.1

### How was this patch tested?
Builds and passes CIs.

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -15,7 +15,7 @@
 set(ZLIB_VERSION "1.2.11")
 set(GTEST_VERSION "1.8.0")
 set(PROTOBUF_VERSION "3.5.1")
-set(ZSTD_VERSION "1.5.0")
+set(ZSTD_VERSION "1.5.1")

 option(ORC_PREFER_STATIC_PROTOBUF "Prefer static protobuf library, if available" ON)
 option(ORC_PREFER_STATIC_SNAPPY   "Prefer static snappy library, if available"   ON)


Update to latest AddSAMPPlugin.cmake from cmake-modules

--- cmake/AddSAMPPlugin.cmake
+++ cmake/AddSAMPPlugin.cmake
@@ -3,7 +3,7 @@

   set_target_properties(${name} PROPERTIES PREFIX "")

-  if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
     set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
   endif()
@@ -13,7 +13,7 @@
                  COMPILE_FLAGS " -Wno-attributes")
   endif()

-  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     set_property(TARGET ${name} APPEND_STRING PROPERTY
                  COMPILE_FLAGS " -Wno-ignored-attributes")
   endif()
@@ -23,7 +23,7 @@
                  LINK_FLAGS " -Wl,--enable-stdcall-fixup")
   endif()

-  if(UNIX AND NOT WIN32)
+  if(UNIX AND NOT WIN32 AND NOT APPLE)
     set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "LINUX")
   endif()
 endfunction()


add CMake option to *not* link with OpenGL libraries

Define could use a more fitting name though.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -182,6 +182,9 @@
 endif()

 # OpenGL
+if (USE_OPENGL AND HALLEY_NO_OPENGL)
+	set(USE_OPENGL 0)
+endif ()
 if (USE_OPENGL)
 	add_definitions(-DWITH_OPENGL)
 	find_package(OpenGL REQUIRED)


Disable a warning on MSVC.

Disable a warning on MSVC.

--- cmake/compile_flags.cmake
+++ cmake/compile_flags.cmake
@@ -5,7 +5,7 @@
 function(enable_strict_warnings target_name)
     if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
         set(release /Wall /wd4820 /wd4514 /wd4625 /wd4626 /wd4627 /wd5026
-                    /wd5027 /wd4710 /wd4668 /wd4711 /wd4548)
+                    /wd5027 /wd4710 /wd4668 /wd4711 /wd4548 /wd4868)
         set(debug /WX)
     elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
         set(release -Wall -Wextra -pedantic -Wshadow)


fix inference_lib deps error (#19632)

fix inference_lib deps error (#19632)

test=develop

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -159,7 +159,7 @@
 set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid")
 set(dst_dir "${FLUID_INSTALL_DIR}/paddle/fluid")
 set(module "framework")
-set(framework_lib_deps framework_py_proto)
+set(framework_lib_deps framework_proto)

 copy(framework_lib DEPS ${framework_lib_deps}
         SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/framework.pb.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/data_feed.pb.h ${src_dir}/${module}/ir/memory_optimize_pass/*.h


Silent output

Silent output

--- cmake/omni_compiler.cmake
+++ cmake/omni_compiler.cmake
@@ -31,10 +31,10 @@
     add_custom_command(
       TARGET ${omni_generate_xmod_TARGET}
       COMMAND ${CMAKE_Fortran_COMPILER} ${FPP_ARG_LIST}
-        ${CMAKE_CURRENT_SOURCE_DIR}/${omni_generate_xmod_SOURCE}
+        ${CMAKE_CURRENT_SOURCE_DIR}/${omni_generate_xmod_SOURCE} > /dev/null
       COMMAND
         ${OMNI_F_FRONT} -M${CMAKE_CURRENT_BINARY_DIR}
-        ${CMAKE_CURRENT_BINARY_DIR}/"${CRAY_PP_OUTPUT}.i"
+        ${CMAKE_CURRENT_BINARY_DIR}/"${CRAY_PP_OUTPUT}.i" > /dev/null
       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${omni_generate_xmod_SOURCE}
       COMMENT "Generating .xmod file for ${omni_generate_xmod_SOURCE}"
     )


boost.cmake: Add config option to enable default locations

--- cmake_scripts/boost.cmake
+++ cmake_scripts/boost.cmake
@@ -6,14 +6,14 @@
     # In stead, we will require BOOST_ROOT and BOOST_LIBRARYDIR
     # to be set manually.

-    if (NOT DEFINED BOOST_ROOT)
+    if (RESTC_CPP_USE_WIN32_DEFAULTS AND NOT DEFINED BOOST_ROOT)
             set (BOOST_ROOT C:/devel/boost_1_63_0)
             message(STATUS "Warning. No BOOST_ROOT defined. Defaulting to ${BOOST_ROOT}")
     else()
             message(STATUS "Using BOOST from ${BOOST_ROOT}")
     endif()

-    if (NOT DEFINED BOOST_LIBRARYDIR)
+    if (RESTC_CPP_USE_WIN32_DEFAULTS AND NOT DEFINED BOOST_LIBRARYDIR)
             set (BOOST_LIBRARYDIR ${BOOST_ROOT}/stage/x64/lib)
             message(STATUS "Warning. No BOOST_ROOT defined. Defaulting to ${BOOST_ROOT}")
     endif()
@@ -33,10 +33,11 @@
 # Msvc and possible some other Windows-compilers will link
 # to the correct libraries trough #pragma directives in boost headers.
 #SET(BOOST_UNIT_TEST_FRAMEWORK libboost_test_exec_monitor-vc140-mt-sgd-1_57)
+
 endif()

-if (UNIX)
+if (UNIX OR (WIN32 AND NOT RESTC_CPP_USE_WIN32_DEFAULTS))
     set(Boost_USE_MULTITHREADED ON)
     find_package(Boost REQUIRED COMPONENTS
         system
@@ -54,7 +55,9 @@
         )

     include_directories(${Boost_INCLUDE_DIRS})
+endif()

+if (UNIX)
     set(LIB_BOOST_PROGRAM_OPTIONS boost_program_options)
     set(LIB_BOOST_SERIALIZATION boost_serialization)
     set(LIB_BOOST_FILESYSTEM boost_filesystem)


Look for the nddscpp CMake module

Look for the nddscpp CMake module

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -217,14 +217,14 @@
   set(Connext_FOUND TRUE)
 else()
   # try to find_package() it
-  find_package(ndds_cpp)
-  if(ndds_cpp_FOUND)
-    message(STATUS "Found RTI Connext: ${ndds_cpp_DIR}")
-    set(Connext_INCLUDE_DIRS ${ndds_cpp_INCLUDE_DIRS})
-    set(Connext_LIBRARIES ${ndds_cpp_LIBRARIES})
+  find_package(nddscpp)
+  if(nddscpp_FOUND)
+    message(STATUS "Found RTI Connext: ${nddscpp_DIR}")
+    set(Connext_INCLUDE_DIRS ${nddscpp_INCLUDE_DIRS})
+    set(Connext_LIBRARIES ${nddscpp_LIBRARIES})
     set(Connext_LIBRARY_DIRS "")
     set(Connext_LIBRARY_DIR "")
-    set(Connext_DEFINITIONS ${ndds_cpp_DEFINITIONS})
+    set(Connext_DEFINITIONS ${nddscpp_DEFINITIONS})
     set(Connext_DDSGEN2 "/usr/bin/rtiddsgen2")
     set(Connext_FOUND TRUE)


[Config] Added other versions of Boost.Python

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -606,7 +606,7 @@
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system
-	locale python27 python34 regex)
+	locale python python27 python34 python37 regex)
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
   set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
   set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}


Set default branch to master branch

Set default branch to master branch

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -130,6 +130,10 @@
   endif()
 endmacro()

+if(NOT GIT_BRANCH)
+  set(GIT_BRANCH "master")
+endif()
+
 #
 # Download and include setup script
 #


SuperBuild: geos: removed unsed variable

--- SuperBuild/CMake/External_geos.cmake
+++ SuperBuild/CMake/External_geos.cmake
@@ -33,7 +33,6 @@
    CMAKE_CACHE_ARGS
    ${SB_CMAKE_CACHE_ARGS}
    -DGEOS_ENABLE_TESTS:BOOL=OFF
-   PATCH_COMMAND ${GEOS_PATCH_COMMAND}
    CMAKE_COMMAND ${GEOS_CMAKE_COMMAND}
    LOG_DOWNLOAD 1
    LOG_CONFIGURE 1


SuperBuild: use alternative lib names for HDF4 (as in debian)

--- SuperBuild/CMake/External_hdf4.cmake
+++ SuperBuild/CMake/External_hdf4.cmake
@@ -61,6 +61,8 @@
     -DHDF4_ENABLE_Z_LIB_SUPPORT:BOOL=ON
     -DHDF4_PACKAGE_EXTLIBS:BOOL=OFF
     -DHDF_ENABLE_LARGE_FILE:BOOL=ON
+    -DHDF4_SRC_LIB_CORENAME:STRING=dfalt
+    -DHDF4_MF_LIB_CORENAME:STRING=mfhdfalt
     ${HDF4_SB_CONFIG}
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   LOG_DOWNLOAD 1
@@ -69,11 +71,13 @@
   LOG_INSTALL 1
   )

+SUPERBUILD_PATCH_SOURCE(HDF4)
+
 set(_SB_MFHDF_H_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
 if(WIN32)
-  set(_SB_HDF4_DF_LIB ${SB_INSTALL_PREFIX}/lib/hdf_i.lib)
-  set(_SB_HDF4_MFHDF_LIB ${SB_INSTALL_PREFIX}/lib/mfhdf_i.lib)
+  set(_SB_HDF4_DF_LIB ${SB_INSTALL_PREFIX}/lib/dfalt_i.lib)
+  set(_SB_HDF4_MFHDF_LIB ${SB_INSTALL_PREFIX}/lib/mfhdfalt_i.lib)
 elseif(UNIX)
-  set(_SB_HDF4_DF_LIB ${SB_INSTALL_PREFIX}/lib/libhdf${CMAKE_SHARED_LIBRARY_SUFFIX})
-  set(_SB_HDF4_MFHDF_LIB ${SB_INSTALL_PREFIX}/lib/libmfhdf${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(_SB_HDF4_DF_LIB ${SB_INSTALL_PREFIX}/lib/libdfalt${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(_SB_HDF4_MFHDF_LIB ${SB_INSTALL_PREFIX}/lib/libmfhdfalt${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif()


PKG: switch name of input pkgsetup.in for osx and linux

--- SuperBuild/CMake/Package_Macro.cmake
+++ SuperBuild/CMake/Package_Macro.cmake
@@ -34,12 +34,18 @@
     "#!/bin/sh\n")

   set(PKG_PEFILES)
-  set(PKG_BINARY_FILES)
+  #NOTE: VAR_IN_PKGSETUP_CONFIGURE is copied to linux_pkgsetup.in during configure_file
+  set(VAR_IN_PKGSETUP_CONFIGURE)
   set(PKG_SO_FILES)
   configure_package()

   ############# install client configure script ################
-  configure_file(${PACKAGE_SUPPORT_FILES_DIR}/pkgsetup.in
+
+  set(PKGSETUP_IN_FILENAME linux_pkgsetup.in)
+  if(APPLE)
+    set(PKGSETUP_IN_FILENAME osx_pkgsetup.in)
+  endif()
+  configure_file(${PACKAGE_SUPPORT_FILES_DIR}/${PKGSETUP_IN_FILENAME}
     ${CMAKE_BINARY_DIR}/pkgsetup @ONLY)

   install(FILES
@@ -101,8 +107,8 @@
                 get_filename_component(basename_of_sofile ${sofile} NAME)
                 is_file_a_symbolic_link("${sofile}" is_symlink linked_to_file)
                 if(is_symlink)
-                  ##NOTE: $OUT_DIR is set actually in pkgsetup.in. So don't try
-                  #any pre-mature optimization on that variable names
+                  # NOTE: $OUT_DIR is set actually in pkgsetup.in. So don't try
+                  # any pre-mature optimization on that variable names
                   file(APPEND
                     ${CMAKE_BINARY_DIR}/make_symlinks
                     "ln -sf $OUT_DIR/lib/${linked_to_file} $OUT_DIR/lib/${basename_of_sofile}\n"


Add function for installing configdefinitions from directory

--- functions.cmake
+++ functions.cmake
@@ -641,6 +641,10 @@
     else()
         install(FILES ${ARGV0} DESTINATION  share/vespa/configdefinitions)
     endif()
+endfunction()
+
+function(install_config_definitions)
+    install(DIRECTORY ${ARGV0} DESTINATION share/vespa/configdefinitions)
 endfunction()

 function(install_java_artifact NAME)


iOS: enable C++14 support by default.

iOS: enable C++14 support by default.

--- toolchains/ios.toolchain.cmake
+++ toolchains/ios.toolchain.cmake
@@ -51,6 +51,10 @@
 set( CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH NO                  )
 set( CMAKE_XCODE_ATTRIBUTE_SDKROOT          iphoneos            ) # iphoneos == "Latest iOS"

+set( CMAKE_XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD     gnu11   )
+set( CMAKE_XCODE_ATTRIBUTE_GCC_CXX_LANGUAGE_STANDARD   gnu++14 )
+set( CMAKE_XCODE_ATTRIBUTE_GCC_C++_LANGUAGE_STANDARD   gnu++14 )
+set( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD gnu++14 )

 # set_xcode_property( TARGET XCODE_PROPERTY XCODE_VALUE )
 #  A convenience macro for setting xcode specific properties on targets


COMP: Update KWStyle version.

COMP: Update KWStyle version.

Addresses some warnings from KWStyle's KWSys.

Change-Id: I7c40956d73d5212864f384f8dcde5994a75a1a40

--- Utilities/KWStyle/BuildKWStyle.cmake
+++ Utilities/KWStyle/BuildKWStyle.cmake
@@ -22,7 +22,7 @@
 if(NOT TARGET KWStyle)
 ExternalProject_add(KWStyle
   GIT_REPOSITORY "${git_protocol}://github.com/Kitware/KWStyle.git"
-  GIT_TAG ef373a1ece313e9d096948e639bfb575f052f581
+  GIT_TAG 3b868a6ba0b204f8af608140b5009101f66cfda6
   UPDATE_COMMAND ""
   DOWNLOAD_DIR ${KWStyle_SOURCE_DIR}
   SOURCE_DIR ${KWStyle_SOURCE_DIR}


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2008)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 01)
+SET(KWSYS_DATE_STAMP_MONTH 02)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


Build 32-bit ios with -fno-aligned-new

Build 32-bit ios with -fno-aligned-new

--- tools/cmake/ios.toolchain.cmake
+++ tools/cmake/ios.toolchain.cmake
@@ -25,5 +25,8 @@
 set(CMAKE_XCODE_ATTRIBUTE_ARCHS_iphoneos_MinSizeRel "armv7 arm64")

 set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE[sdk=iphone*] "YES")
+set(CMAKE_XCODE_ATTRIBUTE_REALM_ALIGN_FLAG "")
+set(CMAKE_XCODE_ATTRIBUTE_REALM_ALIGN_FLAG[arch=armv7] "-fno-aligned-new")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $(REALM_ALIGN_FLAG)")

 set_bitcode_attributes()


build: drop default enabled options

build: drop default enabled options

--- cmake/modules/DispatchCompilerWarnings.cmake
+++ cmake/modules/DispatchCompilerWarnings.cmake
@@ -13,14 +13,9 @@
     add_compile_options(-Wunreachable-code)
     add_compile_options(-Wshadow)
     add_compile_options(-Wconversion)
-    add_compile_options(-Wconstant-conversion)
-    add_compile_options(-Wint-conversion)
-    add_compile_options(-Wbool-conversion)
-    add_compile_options(-Wenum-conversion)
     add_compile_options(-Wassign-enum)
     add_compile_options(-Wshorten-64-to-32)
     add_compile_options(-Wnewline-eof)
-    add_compile_options(-Wdeprecated-declarations)
     add_compile_options(-Wsign-conversion)
     add_compile_options(-Winfinite-recursion)
     add_compile_options(-Warray-bounds-pointer-arithmetic)


COMP: Incorrect warning presented for cppcheck

The format of the cppcheck warnings is related to
the IDE not the compiler.  For non-vs compilers
assume that the IDE can support gcc style warning
messages.  This is backwards compatible, and it removes
an incorrect warning message.

Change-Id: Ic5af0a915638d78bfd26e4c16456fe5cf4ec3b60

--- CMake/Findcppcheck.cmake
+++ CMake/Findcppcheck.cmake
@@ -91,13 +91,9 @@
       set(CPPCHECK_TEMPLATE_ARG --template vs)
       set(CPPCHECK_FAIL_REGULAR_EXPRESSION "[(]error[)]")
       set(CPPCHECK_WARN_REGULAR_EXPRESSION "[(]style[)]")
-    elseif(CMAKE_COMPILER_IS_GNUCXX)
-      set(CPPCHECK_TEMPLATE_ARG --template gcc)
-      set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ")
-      set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ")
     else()
-      message(STATUS
-        "Warning: FindCppcheck doesn't know how to format error messages for your compiler!")
+      ## This is about the IDE, not the compiler for formatting support.  Many IDE's
+      ## support the gcc style error messages.
       set(CPPCHECK_TEMPLATE_ARG --template gcc)
       set(CPPCHECK_FAIL_REGULAR_EXPRESSION " error: ")
       set(CPPCHECK_WARN_REGULAR_EXPRESSION " style: ")


COMP: ELASTIX-1 Add support for big build objects on Windows

--- CMake/elxWinConfig.cmake
+++ CMake/elxWinConfig.cmake
@@ -1,19 +1,23 @@
 # Visual Studio complains if paths are too long

-string( LENGTH "${CMAKE_CURRENT_SOURCE_DIR}" n )
-if( n GREATER 50 )
-message(
-  FATAL_ERROR
-  "ITK source code directory path length is too long (${n} > 50)."
-  "Please move the ITK source code directory to a directory with a shorter path."
-  )
+if( MSVC )
+  string( LENGTH "${CMAKE_CURRENT_SOURCE_DIR}" n )
+  if( n GREATER 50 )
+  message(
+    FATAL_ERROR
+    "ITK source code directory path length is too long for MSVC (${n} > 50)."
+    )
+  endif()
+
+  string( LENGTH "${CMAKE_CURRENT_BINARY_DIR}" n )
+  if( n GREATER 50 )
+  message(
+    FATAL_ERROR
+    "ITK build directory path length is too long for MSVC (${n} > 50)."
+    )
+  endif()
+
+  set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj" )
+  set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /bigobj" )
+  set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /bigobj" )
 endif()
-
-string( LENGTH "${CMAKE_CURRENT_BINARY_DIR}" n )
-if( n GREATER 50 )
-message(
-  FATAL_ERROR
-  "ITK build directory path length is too long (${n} > 50)."
-  "Please set the ITK build directory to a directory with a shorter path."
-  )
-endif()


Updated CTK

Updated CTK

# Conflicts:
#	CMakeExternals/CTK.cmake

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 4d12a3b8)
+    set(revision_tag 1e3470e7)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -79,9 +79,9 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 135910e407bd1f5de29d2a0a9efe5f80
       #GIT_REPOSITORY https://github.com/commontk/CTK.git
       #GIT_TAG origin/master
+      URL_MD5 4cd017f7b4ac5ee9b396f4e7d0ed5024
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
@@ -104,7 +104,7 @@
         -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_DCMTK_085525e6.tar.gz
-        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_5f3a03b1.tar.gz
+        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_4293694a.tar.gz
         # See bug 19073
         -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_36ab9c7c.tar.gz
       CMAKE_CACHE_ARGS


Update MD5 hash

Update MD5 hash

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -52,7 +52,7 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 e66c37c2a9fe2a5873d8348ae73f3dfa
+      URL_MD5 49e1652cc505bdf3f77210976df97d63
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


FIX: check the presence of colorized output for gcc

--- CMakeLists.default.cmake
+++ CMakeLists.default.cmake
@@ -18,16 +18,25 @@
 	)
 endif(NOT CMAKE_BUILD_TYPE)

+include(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("-fdiagnostics-color=auto" HAS_COMPILER_COLORS)
+
 if (CMAKE_COMPILER_IS_GNUCXX)
         if (BUILD_WITH_EXTRA_DEBUG)
 			add_definitions(-DMPT_DEBUG=2)
 	endif (BUILD_WITH_EXTRA_DEBUG)

-	set(CMAKE_C_FLAGS "-Wall -Wshadow -Wconversion -Wno-sign-conversion -pedantic-errors -fstrict-aliasing -fstack-protector-all -std=c99 ${CMAKE_USER_C_FLAGS}" CACHE STRING
+	if (HAS_COMPILER_COLORS)
+		set(COMPILER_COLOR_FLAGS_OPTS "-fdiagnostics-color=auto")
+	else (HAS_COMPILER_COLORS)
+		set(COMPILER_COLOR_FLAGS_OPTS "")
+	endif (HAS_COMPILER_COLORS)
+
+	set(CMAKE_C_FLAGS "-Wall -Wshadow -Wconversion -Wno-sign-conversion -pedantic-errors -fstrict-aliasing -fstack-protector-all -std=c99 ${COMPILER_COLOR_FLAGS_OPTS} ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during all build types." FORCE
 	)

-	set(CMAKE_C_FLAGS_DEBUG "-fdiagnostics-color=auto -g ${CMAKE_USER_C_FLAGS}"  CACHE STRING
+	set(CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_USER_C_FLAGS}"  CACHE STRING
 		"Flags used by the compiler during debug build." FORCE
 	)


- add option for disabling LTCG

- add option for disabling LTCG

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -17,6 +17,9 @@
     set(FIPS_WINDOWS 1)
     set(FIPS_WINDOWS_PLATFORM_NAME "x86")
 endif()
+
+# Optionally disable link-time code generation
+option(FIPS_MSVC_LTCG "Enable/Disable link-time code generation in release builds" ON)

 # define configuration types
 set(CMAKE_CONFIGURATION_TYPES Debug Release)
@@ -68,25 +71,32 @@

 set(CMAKE_CXX_FLAGS "${FIPS_VS_EXCEPTION_FLAGS} /MP /WX /TP /DWIN32")
 set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od /Oy- /D_DEBUG /DFIPS_DEBUG=1")
-set(CMAKE_CXX_FLAGS_RELEASE "/GL /Ox /DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "/Ox /DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")

 set(CMAKE_C_FLAGS "/MP /WX /TC /errorReport:queue /DWIN32")
 set(CMAKE_C_FLAGS_DEBUG "/Zi /Od /Oy- /D_DEBUG /DFIPS_DEBUG=1")
-set(CMAKE_C_FLAGS_RELEASE "/GL /Ox /DNDEBUG ")
+set(CMAKE_C_FLAGS_RELEASE "/Ox /DNDEBUG ")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FIPS_VS_CRT_FLAGS}d")
 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${FIPS_VS_CRT_FLAGS}")

-# define exe linker flags
+# define exe linker/librarian flags
 set(CMAKE_EXE_LINKER_FLAGS "/STACK:5000000 /machine:${FIPS_WINDOWS_PLATFORM_NAME}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO /LTCG")

 # librarian flags
 # 4221: warning on empty object files
 set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
-set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "/LTCG")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
+
+# add LTCG options
+if (FIPS_WINDOWS_LTCG)
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
+    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL")
+    set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /INCREMENTAL:NO /LTCG")
+    set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS} /LTCG")
+endif()

 # update cache variables for cmake gui
 set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Config Type" FORCE)


[tests] fix missing library path for C-language tests (non-rpath build)

--- cmake/CMakeListsForTests.cmake
+++ cmake/CMakeListsForTests.cmake
@@ -210,7 +210,7 @@

     if (LDLIBPATH)
       SET_TARGET_PROPERTIES(${_EXE} PROPERTIES ENVIRONMENT "${LDLIBPATH}")
-      set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT "${ENV_PPTY}")
+      set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT "${LDLIBPATH}")
     endif()

     IF(USE_SANITIZER MATCHES "asan")


Disable libxml2 on Windows for now.

Disable libxml2 on Windows for now.

Newer versions of CMake include a "smarter" FindLibxml2 package.
In theory this is a good thing, but on Windows it's now smart
enough to find the version that comes with Gnuwin32, which doesn't
appear to be a valid libxml2 distribution.  Or at the very least,
LLDB currently uses some header files from libxml2 that are not
part of this distribution.

Nobody on Windows is using any of this functionality right now
anyway, so just disable it.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@250709 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -281,7 +281,11 @@
     )
 endif()

-if (NOT LIBXML2_FOUND)
+if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows"))
+  # Skip Libxml2 on Windows.  In CMake 3.4 and higher, the algorithm for
+  # finding libxml2 got "smarter", and it can now locate the version which is
+  # in gnuwin32, even though that version does not contain the headers that
+  # LLDB uses.
   find_package(LibXml2)
 endif()

@@ -301,7 +305,6 @@
   ${DEBUG_SYMBOLS_LIBRARY})

 else()
-
   if (LIBXML2_FOUND)
     add_definitions( -DLIBXML2_DEFINED )
     list(APPEND system_libs ${LIBXML2_LIBRARIES})


Added cmake function that calles the meta cimpiler.

--- sigma_setup.cmake
+++ sigma_setup.cmake
@@ -10,6 +10,35 @@
         set(REFLECTION_COMPILER "${CONAN_BIN_DIRS_SIGMA-ENGINE}/${REFLECTION_COMPILER}")
     endif()
 endmacro()
+
+function(generate_meta_data generated_header_files)
+    set(gen_list)
+    foreach(header_file ${ARGN})
+        file(RELATIVE_PATH header_file "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${header_file}")
+
+        set(generated_header_file "${CMAKE_BINARY_DIR}/${header_file}")
+        get_filename_component(dir "${generated_header_file}" DIRECTORY)
+        get_filename_component(name "${generated_header_file}" NAME_WE)
+        get_filename_component(ext "${generated_header_file}" EXT)
+        set(generated_header_file "${dir}/${name}.generated${ext}")
+
+        file(READ "${CMAKE_SOURCE_DIR}/${header_file}" file_text)
+        string(FIND "${file_text}" "${name}.generated${EXT}" match)
+
+        if(NOT ${match} EQUAL -1)
+            add_custom_command(
+                OUTPUT "${generated_header_file}"
+                COMMAND python2 ARGS "${CMAKE_SOURCE_DIR}/tools/sreflect/sreflect.py" --template-file="${CMAKE_SOURCE_DIR}/tools/sreflect/generated.j2" --source-directory "${CMAKE_SOURCE_DIR}" --build-directory "${CMAKE_BINARY_DIR}" --file "${CMAKE_SOURCE_DIR}/${header_file}"
+                MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/${header_file}"
+                DEPENDS "${CMAKE_SOURCE_DIR}/tools/sreflect/generated.j2" "${CMAKE_SOURCE_DIR}/tools/sreflect/sreflect.py"
+                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+            )
+            list(APPEND gen_list "${generated_header_file}")
+        endif()
+    endforeach()
+
+    set(${generated_header_files} ${gen_list} PARENT_SCOPE)
+endfunction()

 function(add_resources target)
     # https://cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html


cmake: Fix glop install

cmake: Fix glop install

--- cmake/glop.cmake
+++ cmake/glop.cmake
@@ -269,7 +269,7 @@
   ortools/base/file.h
   ortools/base/hash.h
   ortools/base/int_type.h
-  ortools/base/int_type_indexed_vector.h
+  ortools/base/strong_vector.h
   ortools/base/integral_types.h
   ortools/base/log_severity.h
   ortools/base/logging.h


Remove cuda.

Remove cuda.

--- cmake/util.cmake
+++ cmake/util.cmake
@@ -83,7 +83,6 @@
             paddle_utils
             paddle_parameter
             paddle_proto
-            paddle_cuda
             paddle_optimizer
             ${EXTERNAL_LIBS}
             ${CMAKE_THREAD_LIBS_INIT}


Use cmake TIMESTAMP function

Use cmake TIMESTAMP function

because it is not only platform independent
but also allows to override the build date

Also adds UTC flag, to be independent of timezone
and uses ISO-8601 date format
to avoid the possibility of locale-dependent month names.

This PR was done while working on reproducible builds for openSUSE.

--- build/cmake/macros/GetTimeDate.cmake
+++ build/cmake/macros/GetTimeDate.cmake
@@ -18,64 +18,9 @@
 ##**************************************************************

 MACRO( GET_TIMEDATE _TIMEDATE )
-    if(NOT WINDOWS)
-        execute_process( COMMAND date "+%Y%m%d_%H%M%S" OUTPUT_VARIABLE ${_TIMEDATE} OUTPUT_STRIP_TRAILING_WHITESPACE )
-    else()
-        execute_process( COMMAND date "/T" OUTPUT_VARIABLE _date OUTPUT_STRIP_TRAILING_WHITESPACE )
-        execute_process( COMMAND time "/T" OUTPUT_VARIABLE _time OUTPUT_STRIP_TRAILING_WHITESPACE )
-        if( ${_date} AND ${_time} )
-            string(REGEX MATCH "([0-9]+)/([0-9]+)/([0-9]+)" DATE_MATCH "${_date}" )
-            set( _date "${CMAKE_MATCH_3}${CMAKE_MATCH_1}${CMAKE_MATCH_2}" )
-            string( REGEX MATCH "([0-9]+):([0-9]+) ([AP]M)" TIME_MATCH "${_time}" )
-            if( ${CMAKE_MATCH_3} STREQUAL "PM" )
-                MATH(EXPR HOUR "${CMAKE_MATCH_1} + 12")
-            else()
-                set( HOUR "${CMAKE_MATCH_1}" )
-            endif()
-            set( _time "${HOUR}${CMAKE_MATCH_2}" )
-            set( ${_TIMEDATE} "${_date}_${HOUR}${CMAKE_MATCH_2}" )
-        else()
-            set( ${_TIMEDATE} "" )
-        endif()
-    endif()
+    string(TIMESTAMP ${_TIMEDATE} "%Y%m%d_%H%M%S" UTC)
 ENDMACRO( GET_TIMEDATE )

 MACRO( GET_DATE _DATE )
-    if(NOT WINDOWS)
-        execute_process( COMMAND date "+%b %d %Y" OUTPUT_VARIABLE ${_DATE} OUTPUT_STRIP_TRAILING_WHITESPACE )
-    else()
-	# date output format: Thu 02/03/2011 (mm/dd/yyyy)
-        execute_process( COMMAND date "/T" OUTPUT_VARIABLE _date OUTPUT_STRIP_TRAILING_WHITESPACE )
-        if( "${_date}" STREQUAL "" )
-            set( ${_DATE} "" )
-        else()
-            string(REGEX MATCH "([0-9]+)/([0-9]+)/([0-9]+)" DATE_MATCH "${_date}" )
-            if (     ${CMAKE_MATCH_1} STREQUAL "01" )
-                set( _month "Jan" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "02" )
-                set( _month "Feb" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "03" )
-                set( _month "Mar" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "04" )
-                set( _month "Apr" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "05" )
-                set( _month "May" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "06" )
-                set( _month "Jun" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "07" )
-                set( _month "Jul" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "08" )
-                set( _month "Aug" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "09" )
-                set( _month "Sep" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "10" )
-                set( _month "Oct" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "11" )
-                set( _month "Nov" )
-            elseif ( ${CMAKE_MATCH_1} STREQUAL "12" )
-                set( _month "Dec" )
-            endif ( )
-            set( ${_DATE} "${_month} ${CMAKE_MATCH_2} ${CMAKE_MATCH_3}" )
-        endif()
-    endif()
+    string(TIMESTAMP ${_DATE} "%Y-%m-%d" UTC) # ISO-8601 for global readability
 ENDMACRO( GET_DATE )


Begin post-0.3 development

Begin post-0.3 development

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


Give cmake some other places to look for apr

--- indra/cmake/FindAPR.cmake
+++ indra/cmake/FindAPR.cmake
@@ -20,6 +20,9 @@
 FIND_PATH(APR_INCLUDE_DIR apr.h
 /Developer/SDKs/MacOSX10.5.sdk/usr/include/apr-1
 /Developer/SDKs/MacOSX10.6.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.7.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.8.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.9.sdk/usr/include/apr-1
 /usr/local/include/apr-1
 /usr/local/include/apr-1.0
 /usr/include/apr-1
@@ -35,6 +38,9 @@
   NAMES ${APR_NAMES}
   PATHS /Developer/SDKs/MacOSX10.5.sdk/usr/lib
         /Developer/SDKs/MacOSX10.6.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.7.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.8.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.9.sdk/usr/lib
         /usr/lib /usr/local/lib
   NO_DEFAULT_PATH
   )
@@ -77,6 +83,9 @@
 FIND_PATH(APRUTIL_INCLUDE_DIR apu.h
 /Developer/SDKs/MacOSX10.5.sdk/usr/include/apr-1
 /Developer/SDKs/MacOSX10.6.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.7.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.8.sdk/usr/include/apr-1
+/Developer/SDKs/MacOSX10.9.sdk/usr/include/apr-1
 /usr/local/include/apr-1
 /usr/local/include/apr-1.0
 /usr/include/apr-1
@@ -88,6 +97,9 @@
   NAMES ${APRUTIL_NAMES}
   PATHS /Developer/SDKs/MacOSX10.5.sdk/usr/lib
         /Developer/SDKs/MacOSX10.6.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.7.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.8.sdk/usr/lib
+        /Developer/SDKs/MacOSX10.9.sdk/usr/lib
         /usr/lib /usr/local/lib
   NO_DEFAULT_PATH
   )


fix missing quote

fix missing quote

--- features/FindQxt.cmake
+++ features/FindQxt.cmake
@@ -68,7 +68,7 @@
         /opt/local/
         /opt/csw
         /opt
-        "C:\\
+        "C:\\"
         "C:\\Program Files\\"
         "C:\\Program Files(x86)\\"
         NO_DEFAULT_PATH


Enabling detection of -mkl=cluster

Enabling detection of -mkl=cluster

--- cmake/external_projects/ElMath.cmake
+++ cmake/external_projects/ElMath.cmake
@@ -68,7 +68,10 @@
 else()
   set(MKL_LIBS "-mkl=cluster")
   message(STATUS "Attempting to link MKL using ${MKL_LIBS}")
-  set(CMAKE_REQUIRED_FLAGS ${MKL_LIBS})
+  set(CMAKE_REQUIRED_FLAGS "${MKL_LIBS} ${MPI_C_COMPILE_FLAGS}")
+  set(CMAKE_REQUIRED_LINKER_FLAGS "${MPI_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
+  set(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})
+  set(CMAKE_REQUIRED_LIBRARIES ${MPI_C_LIBRARIES})
   El_check_function_exists(dpotrf  EL_HAVE_DPOTRF_MKL_CLUSTER)
   El_check_function_exists(dpotrf_ EL_HAVE_DPOTRF_POST_MKL_CLUSTER)
   El_check_function_exists(mkl_dcsrmv EL_HAVE_MKL_DCSRMV_CLUSTER)
@@ -77,6 +80,9 @@
     set(EL_HAVE_MKL TRUE)
   endif()
   unset(CMAKE_REQUIRED_FLAGS)
+  unset(CMAKE_REQUIRED_LINKER_FLAGS)
+  unset(CMAKE_REQUIRED_INCLUDES)
+  unset(CMAKE_REQUIRED_LIBRARIES)

   if(NOT EL_HAVE_MKL)
     # NOTE: There is a bug in MKL such that, if the following line is used,


Disable tests for ValidationLayers on Windows (#20)

These tests currently fail to build on windows, disable for now.

--- cmake/vulkan-validation-layers.cmake
+++ cmake/vulkan-validation-layers.cmake
@@ -14,7 +14,12 @@

 message(STATUS "VKB Vulkan-Layers: ${VKB_VULKAN_VALIDATION_LAYERS_SOURCE_DIR}")

-set(BUILD_TESTS ON)
+# TODO(dsinclair): Investigate why the validation layer tests fail to build on windows.
+if(MSVC)
+  set(BUILD_TESTS OFF)
+else()
+  set(BUILD_TESTS ON)
+endif()

 set(VulkanHeaders_INCLUDE_DIRS ${VKB_VULKAN_HEADERS_SOURCE_DIR})
 set(GLSLANG_INSTALL_DIR ${VKB_GLSLANG_SOURCE_DIR})


Fix FLP reentrance wrt transient package version parsing, add warning

--- FindLibraryPackage.cmake
+++ FindLibraryPackage.cmake
@@ -134,34 +134,34 @@
     endif()

     if(EXISTS "${_flp_Version_file}")
-      file(READ "${_flp_Version_file}" _flp_Version_contents)
+      file(READ "${_flp_Version_file}" _flp_${name}_Version_contents)
     else()
-      set(_flp_Version_contents "unknown")
+      set(_flp_${name}_Version_contents "unknown")
     endif()

     # parse version out of version.h
     string(REGEX MATCH "define[ \t]+${_flp_${name}_UC}_VERSION_MAJOR[ \t]+[0-9]+"
-      ${_flp_${name}_UC}_VERSION_MAJOR ${_flp_Version_contents})
+      ${_flp_${name}_UC}_VERSION_MAJOR ${_flp_${name}_Version_contents})
     string(REGEX MATCH "define[ \t]+${_flp_${name}_UC}_VERSION_MINOR[ \t]+[0-9]+"
-      ${_flp_${name}_UC}_VERSION_MINOR ${_flp_Version_contents})
+      ${_flp_${name}_UC}_VERSION_MINOR ${_flp_${name}_Version_contents})
     string(REGEX MATCH "define[ \t]+${_flp_${name}_UC}_VERSION_PATCH[ \t]+[0-9]+"
-      ${_flp_${name}_UC}_VERSION_PATCH ${_flp_Version_contents})
+      ${_flp_${name}_UC}_VERSION_PATCH ${_flp_${name}_Version_contents})
     string(REGEX MATCH "define[ \t]+${_flp_${name}_UC}_VERSION_ABI[ \t]+[0-9]+"
-      ${_flp_${name}_UC}_VERSION_ABI ${_flp_Version_contents})
+      ${_flp_${name}_UC}_VERSION_ABI ${_flp_${name}_Version_contents})

     if("${${_flp_${name}_UC}_VERSION_MAJOR}" STREQUAL "") # Try 'include' naming
       string(REGEX MATCH
         "define[ \t]+${_flp_${name}_INCLUDE_UC}_VERSION_MAJOR[ \t]+[0-9]+"
-        ${_flp_${name}_UC}_VERSION_MAJOR ${_flp_Version_contents})
+        ${_flp_${name}_UC}_VERSION_MAJOR ${_flp_${name}_Version_contents})
       string(REGEX MATCH
         "define[ \t]+${_flp_${name}_INCLUDE_UC}_VERSION_MINOR[ \t]+[0-9]+"
-        ${_flp_${name}_UC}_VERSION_MINOR ${_flp_Version_contents})
+        ${_flp_${name}_UC}_VERSION_MINOR ${_flp_${name}_Version_contents})
       string(REGEX MATCH
         "define[ \t]+${_flp_${name}_INCLUDE_UC}_VERSION_PATCH[ \t]+[0-9]+"
-        ${_flp_${name}_UC}_VERSION_PATCH ${_flp_Version_contents})
+        ${_flp_${name}_UC}_VERSION_PATCH ${_flp_${name}_Version_contents})
       string(REGEX MATCH
         "define[ \t]+${_flp_${name}_INCLUDE_UC}_VERSION_ABI[ \t]+[0-9]+"
-        ${_flp_${name}_UC}_VERSION_ABI ${_flp_Version_contents})
+        ${_flp_${name}_UC}_VERSION_ABI ${_flp_${name}_Version_contents})
     endif()

     if("${${_flp_${name}_UC}_VERSION_MAJOR}" STREQUAL "")
@@ -203,14 +203,14 @@
       string(REGEX MATCH
         "define[ \t]+${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION[ \t]+[0-9.]+"
         ${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION
-        ${_flp_Version_contents})
+        ${_flp_${name}_Version_contents})

       # not found -> search 'CO_LUNCHBOX_VERSION'
       if("${${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION}" STREQUAL "")
         string(REGEX MATCH
           "define[ \t]+${_flp_${name}_INCLUDE_UC}_${_flp_${name}_TRANS}_VERSION[ \t]+[0-9.]+"
           ${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION
-          ${_flp_Version_contents})
+          ${_flp_${name}_Version_contents})
       endif()

       # not found -> use _Collage_Lunchbox_version_${CO_VERSION}
@@ -218,7 +218,7 @@
         set(${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION
           ${_${name}_${_flp_trans}_version_${${_flp_${name}_UC}_VERSION}})
       endif()
-
+
       if(${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION)
         string(REGEX REPLACE ".*[ \t]([0-9.]+)" "\\1"
           ${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION
@@ -229,7 +229,11 @@
         if(NOT ${_flp_${name}_TRANS}_FOUND)
           set(_flp_${name}_FAIL TRUE)
         endif()
-      # else() no version, don't search for package
+      else()
+        message(WARNING
+          "Can't figure out version of dependent package ${_flp_trans}, "
+          "add ${_flp_${name}_UC}_${_flp_${name}_TRANS}_VERSION to "
+          "${_flp_${name}_INCLUDE}/version.h.")
       endif()
     endforeach()
   else()


- добавлен префикс

 - добавлен префикс

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12445 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/build.version.cmake
+++ rdo/packages/cmake/trunk/build.version.cmake
@@ -6,6 +6,6 @@
 #ifndef _RDO_BUILD_VERSION_H_
 #define _RDO_BUILD_VERSION_H_

-static const std::string g_buildVersion("${CMAKE_SVN_VERSION}");
+static const std::string g_buildVersion("svn-${CMAKE_SVN_VERSION}");

 #endif // _RDO_BUILD_VERSION_H_


remove SystemConfiguration framework from INTERFACE_LINK_LIBRARIES

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -35,27 +35,22 @@
 if(APPLE)
     find_library(FOUNDATION_FRAMEWORK Foundation)
     find_library(SECURITY_FRAMEWORK Security)
-    find_library(SYSTEM_CONFIGURATION_FRAMEWORK SystemConfiguration)

     set(CRYPTO_LIBRARIES "")
     set(SSL_LIBRARIES ${FOUNDATION_FRAMEWORK} ${SECURITY_FRAMEWORK})
-    set(REACHABILITY_LIBRARIES ${SYSTEM_CONFIGURATION_FRAMEWORK})
 elseif(REALM_PLATFORM STREQUAL "Android")
     # The Android core and sync libraries include the necessary portions of OpenSSL.
     set(CRYPTO_LIBRARIES "")
     set(SSL_LIBRARIES "")
-    set(REACHABILITY_LIBRARIES "")
 elseif(CMAKE_SYSTEM_NAME MATCHES "^Windows")
     # Windows doesn't do crypto right now, but that is subject to change
     set(CRYPTO_LIBRARIES "")
     set(SSL_LIBRARIES "")
-    set(REACHABILITY_LIBRARIES "")
 else()
     find_package(OpenSSL REQUIRED)

     set(CRYPTO_LIBRARIES OpenSSL::Crypto)
     set(SSL_LIBRARIES OpenSSL::SSL)
-    set(REACHABILITY_LIBRARIES "")
 endif()

@@ -374,7 +369,7 @@
     set_property(TARGET realm-sync PROPERTY IMPORTED_LOCATION_RELEASE ${sync_library_release})
     set_property(TARGET realm-sync PROPERTY IMPORTED_LOCATION ${sync_library_release})

-    set_property(TARGET realm-sync PROPERTY INTERFACE_LINK_LIBRARIES ${SSL_LIBRARIES} ${REACHABILITY_LIBRARIES})
+    set_property(TARGET realm-sync PROPERTY INTERFACE_LINK_LIBRARIES ${SSL_LIBRARIES})

     # Sync server library is built as part of the sync library build
     set(sync_server_library_debug ${sync_library_directory}/librealm-server${platform}-dbg.a)


Fix

Fix

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

--- deal.II/cmake/scripts/run_test.cmake
+++ deal.II/cmake/scripts/run_test.cmake
@@ -29,11 +29,11 @@
   "Build successful" "BUILD FAILED"
   )

-CALLBACK(${TEST} ".run"
+CALLBACK(${TEST} ".run${TEST_SUFFIX}"
   "Run successful" "RUN FAILED"
   )

-CALLBACK(${TEST} ".diff"
+CALLBACK(${TEST} ".diff${TEST_SUFFIX}"
   "Diff successful" "DIFF FAILED"
   )


Fixing Documentation installation bug

Fixing Documentation installation bug

--- Resources/CMake/MXAInstall.cmake
+++ Resources/CMake/MXAInstall.cmake
@@ -77,7 +77,7 @@

 #-- Install the generated Doxygen documentation
 if (MXA_BUILD_API_DOCS)
-    INSTALL(DIRECTORY ${MXADataModel_BINARY_DIR}/API-Docs
+    INSTALL(DIRECTORY ${MXADataModel_BINARY_DIR}/Documentation
             DESTINATION doc/MXADataModel/Documentation
             COMPONENT Documentation )
 endif()


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -1,7 +1,9 @@
 [Desktop Entry]
 Name=Instant Messaging
+Name[ca]=Missatgeria instantània
 Name[cs]=Instant Messaging
 Name[da]=Instant messaging
+Name[de]=Instant-Messaging
 Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
@@ -19,6 +21,7 @@
 Name[uk]=Миттєвий обмін повідомленнями
 Name[x-test]=xxInstant Messagingxx
 Comment=Start a chat with any of your IM contacts or change your IM status
+Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
 Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI


--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -9,6 +9,7 @@
 Name[kk]=Лезде хабарласу
 Name[nl]=Instant Messaging
 Name[pt_BR]=Mensagens instantâneas
+Name[ru]=Система обмена сообщениями
 Name[sk]=Priama komunikácia
 Name[sv]=Direktmeddelanden
 Name[uk]=Миттєвий обмін повідомленнями
@@ -23,6 +24,7 @@
 Comment[kk]=Кез-келген лезде хабарласу контактыңызбен чат-әңгімені бастау не күй-жайын өзгерту
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
 Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
+Comment[ru]=Начать общение с любым вашим контактом или изменить ваш статус в системе обмена сообщениями
 Comment[sk]=Spustiť rozhovor s nejakým z vašich IM kontaktov alebo zmeniť váš IM stav
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями


Indentation and header.

Indentation and header.

	* build-aux/cmake/modules/GostaiInfo.cmake: Do that.

--- build-aux/cmake/modules/GostaiInfo.cmake
+++ build-aux/cmake/modules/GostaiInfo.cmake
@@ -1,26 +1,14 @@
-##
-## GostaiInfo.cmake: This file is part of libport.
-## Copyright (C) Gostai S.A.S., 2006-2008.
-##
-## This software is provided "as is" without warranty of any kind,
-## either expressed or implied, including but not limited to the
-## implied warranties of fitness for a particular purpose.
-##
-## See the LICENSE file for more information.
-## For comments, bug reports and feedback: http://www.urbiforge.com
-##
-
-# Set variables about Gostai.
+# - Set variables about Gostai.

 if(NOT DEFINED GOSTAI_INFO_CMAKE)
-set(GOSTAI_INFO_CMAKE TRUE)
+  set(GOSTAI_INFO_CMAKE TRUE)

-set(GOSTAI "Gostai")
-set(URBI_NAME "Urbi")
-set(URBI_STUDIO_NAME "Urbi Studio")
-set(URBI_SCRIPT_NAME "urbiScript")
-set(GOSTAI_HOMEPAGE "http://www.gostai.com")
-set(GOSTAI_COMMUNITY_URL "http://www.urbiforge.com")
-set(GOSTAI_FORUM_URL "http://forum.gostai.com")
+  set(GOSTAI "Gostai")
+  set(URBI_NAME "Urbi")
+  set(URBI_STUDIO_NAME "Urbi Studio")
+  set(URBI_SCRIPT_NAME "urbiScript")
+  set(GOSTAI_HOMEPAGE "http://www.gostai.com")
+  set(GOSTAI_COMMUNITY_URL "http://www.urbiforge.com")
+  set(GOSTAI_FORUM_URL "http://forum.gostai.com")

 endif(NOT DEFINED GOSTAI_INFO_CMAKE)


Make cmake a lot less spammy.

Make cmake a lot less spammy.

--- indra/cmake/Linking.cmake
+++ indra/cmake/Linking.cmake
@@ -43,13 +43,16 @@
   # packages/lib/release directory to deal with autobuild packages that don't
   # provide (e.g.) lib/debug libraries.
   list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
-  message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}, extending AUTOBUILD_LIBS_INSTALL_DIRS")
+
+#  message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}, extending AUTOBUILD_LIBS_INSTALL_DIRS")
+
 # <FS:Ansariel> Changed for Firestorm
 #endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
 endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS_open")
 # </FS:Ansariel> Changed for Firestorm

-message(STATUS "For ${CMAKE_BUILD_TYPE}, AUTOBUILD_LIBS_INSTALL_DIRS: ${AUTOBUILD_LIBS_INSTALL_DIRS}")
+#message(STATUS "For ${CMAKE_BUILD_TYPE}, AUTOBUILD_LIBS_INSTALL_DIRS: ${AUTOBUILD_LIBS_INSTALL_DIRS}")
+
 link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})

 endif( NOT STANDALONE ) # <FS:ND/> Don't add any autobuild dirs when building standalone


cmake: Update LAPACK external project to always log configuration and build

Since LAPACK is using CMake, the error and warning messages are clearly
distinguished, this allows CTest and CDash to properly parse the output
and avoid false postive to be reported.

At the same time, we are now sure to have all meaningful messages to be
reported on the dashboard.

--- SuperBuild/External_LAPACK.cmake
+++ SuperBuild/External_LAPACK.cmake
@@ -54,11 +54,6 @@

   set(EP_SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj})
   set(EP_BINARY_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
-
-  set(log_command_output "0")
-  if(NOT "$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")
-    set(log_command_output "1")
-  endif()

   if(MSVC)
     # Generator
@@ -133,9 +128,6 @@
       ${EXTERNAL_PROJECT_CONFIGURE_COMMAND}
       ${EXTERNAL_PROJECT_BUILD_COMMAND}
       INSTALL_COMMAND ""
-      # Wrap commands to ignore log output from dashboards
-      LOG_CONFIGURE ${log_command_output}
-      LOG_BUILD     ${log_command_output}
       DEPENDS
         ${${proj}_DEPENDS}
       )
@@ -195,9 +187,6 @@
         -DCBLAS:BOOL=OFF
         -DLAPACKE:BOOL=ON
       INSTALL_COMMAND ""
-      # Wrap commands to ignore log output from dashboards
-      LOG_CONFIGURE ${log_command_output}
-      LOG_BUILD     ${log_command_output}
       DEPENDS
         ${${proj}_DEPENDS}
       )


Fix for finding versioned TBB libraries as of TBB 2021.5

Signed-off-by: Nick Avramoussis <ce9ae7fb000f2865db247e53b12753caeda92c74@users.noreply.github.com>

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -204,24 +204,21 @@

 if(EXISTS ${_tbb_version_file})
-  file(STRINGS ${_tbb_version_file}
-    _tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR "
-  )
-  string(REGEX REPLACE "#define TBB_VERSION_MAJOR" ""
-    _tbb_version_major_string "${_tbb_version_major_string}"
-  )
+  file(STRINGS ${_tbb_version_file} _tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR " )
+  string(REGEX REPLACE "#define TBB_VERSION_MAJOR" "" _tbb_version_major_string "${_tbb_version_major_string}")
   string(STRIP "${_tbb_version_major_string}" Tbb_VERSION_MAJOR)

-  file(STRINGS ${_tbb_version_file}
-     _tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR "
-  )
-  string(REGEX REPLACE "#define TBB_VERSION_MINOR" ""
-    _tbb_version_minor_string "${_tbb_version_minor_string}"
-  )
+  file(STRINGS ${_tbb_version_file} _tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR ")
+  string(REGEX REPLACE "#define TBB_VERSION_MINOR" "" _tbb_version_minor_string "${_tbb_version_minor_string}")
   string(STRIP "${_tbb_version_minor_string}" Tbb_VERSION_MINOR)
+
+  file(STRINGS ${_tbb_version_file} _tbb_binary_version_string REGEX "#define __TBB_BINARY_VERSION ")
+  string(REGEX REPLACE "#define __TBB_BINARY_VERSION" "" _tbb_binary_version_string "${_tbb_binary_version_string}")
+  string(STRIP "${_tbb_binary_version_string}" Tbb_BINARY_VERSION)

   unset(_tbb_version_major_string)
   unset(_tbb_version_minor_string)
+  unset(_tbb_binary_version_string)

   set(Tbb_VERSION ${Tbb_VERSION_MAJOR}.${Tbb_VERSION_MINOR})
 endif()
@@ -277,8 +274,22 @@
     find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${_TBB_LIB_NAME}
       ${_FIND_TBB_ADDITIONAL_OPTIONS}
       PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
-      PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib
-    )
+      PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
+
+    # If we didn't find the library, prepend Tbb_BINARY_VERSION to each possible
+    # component name and try again. As of TBB 2021, TBB decides to version some
+    # of its libraries on some of its platforms...
+    if(NOT Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} AND Tbb_BINARY_VERSION)
+      set(_TBB_LIB_NAME "${COMPONENT}${Tbb_BINARY_VERSION}")
+      if(BUILD_TYPE STREQUAL DEBUG)
+        set(_TBB_LIB_NAME "${_TBB_LIB_NAME}${TBB_DEBUG_SUFFIX}")
+      endif()
+
+      find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${_TBB_LIB_NAME}
+        ${_FIND_TBB_ADDITIONAL_OPTIONS}
+        PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
+        PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
+    endif()

     # On Unix, TBB sometimes uses linker scripts instead of symlinks, so parse the linker script
     # and correct the library name if so


Fix windows compilation issues

Fix windows compilation issues

Current problem: When using the most recent version of oneTBB on windows with MSVC(2019), linking results in an LNK1104 "cannot open file tbb12.lib" error.
Cause: the target e.g. openvdb_shared references tbb.lib. This on the other hand is just a reference to tbb12.lib, but the directory containing that file is not included in additional library directories. Therefore the linker can't find it.
This pull request includes the directory into the additional link directories and therefore lets the linker find the missing library files.

Signed-off-by: Michael Lackner <3a83a63e09617a92abe7cff25cd96c60be2ff4aa@student.tugraz.at>

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -418,6 +418,8 @@
     set_target_properties(TBB::${COMPONENT} PROPERTIES
       IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
       IMPORTED_LOCATION "${Tbb_${COMPONENT}_LIBRARY}")
+
+    target_link_directories(TBB::${COMPONENT} INTERFACE "${Tbb_LIBRARY_DIRS}")

     # Release location
     if(EXISTS "${Tbb_${COMPONENT}_LIBRARY_RELEASE}")


Revert "test removal of redundant line"

Revert "test removal of redundant line"

This reverts commit d4f49355309f257f33ce08c4d680c712ee5cf2a0.

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -587,6 +587,7 @@
   get_filename_component(PROTO_WE ${grpc_library_PROTO} NAME_WE)
   get_filename_component(PROTO_PATH ${ABS_PROTO} PATH)

+  protobuf_generate_cpp(grpc_proto_srcs grpc_proto_hdrs "${ABS_PROTO}")
   set(grpc_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/${PROTO_WE}.grpc.pb.cc")
   set(grpc_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/${PROTO_WE}.grpc.pb.h")
   cc_library("${TARGET_NAME}_proto" SRCS "${grpc_proto_srcs}")


repair broken install (benchmark.py was removed)


Fixed cobertura coverage (3).

Fixed cobertura coverage (3).

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -215,7 +215,7 @@
             string(REGEX REPLACE ${OCC_TEST} "" OCC_TESTS ${OCC_TESTS})
             string(REGEX MATCH "#[0-9]+: " OCC_TEMP ${OCC_TEST})
             string(REGEX REPLACE ${OCC_TEMP} "" OCC_TEST ${OCC_TEST})
-            exec_program(${CTEST_COVERAGE_COMMAND} ${CTEST_BINARY_DIRECTORY}/Debug ARGS --sources ${CTEST_SOURCE_DIRECTORY}\\source --modules *libKD* --cover_children --export_type=cobertura -- ${OCC_TEST}.exe)
+            exec_program(${CTEST_COVERAGE_COMMAND} ${CTEST_BINARY_DIRECTORY}/Debug ARGS --sources ${CTEST_SOURCE_DIRECTORY}\\source --modules *${CI_BUILD_UUID}* --cover_children --export_type=cobertura -- ${OCC_TEST}.exe)
             file(READ ${CTEST_BINARY_DIRECTORY}/Debug/${OCC_TEST}Coverage.xml OCC_TESTXML)
             string(REGEX REPLACE "package name=[^ ]+\"" "package name=\"libKD\"" OCC_TESTXML ${OCC_TESTXML})
             string(REGEX REPLACE "filename=[^ ]+\\source." "filename=\"source/" OCC_TESTXML ${OCC_TESTXML})


BUG #15132: Fix incorrect flag check.

BUG #15132: Fix incorrect flag check.

The code was checking for CMAKE_CROSS_COMPILING instead of
CMAKE_CROSSCOMPILING. This was causing the module to never enable the
vtkoggtheora module.

Change-Id: I72d1ddc4a4600060a68d0e1e5ef702e5c3d11691

--- IO/Movie/module.cmake
+++ IO/Movie/module.cmake
@@ -1,5 +1,5 @@
 if(NOT CMAKE_C_COMPILER_ID STREQUAL "XL")
-  if(NOT ${CMAKE_CROSS_COMPILING})
+  if(NOT ${CMAKE_CROSSCOMPILING})
     set(vtkIOMovie_vtkoggtheora vtkoggtheora)
   endif()
 endif()


fix building of FLTK widget opcodes with VS

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -57,7 +57,7 @@
 set(USE_COMPILER_OPTIMIZATIONS 1)
 set(USE_COREMIDI 0) # N/A
 set(USE_DOUBLE 1)
-set(USE_FLTK 0)
+set(USE_FLTK 1)
 set(USE_GETTEXT	0)
 set(USE_IPMIDI 1)
 set(USE_JACK 0) # N/A


[TRAVIS] Use Boost 1.68.0 on OSX for DEVEL_BUILD

Fixes #170 (problem with Boost 1.65 and recent CLang)

--- version_config.cmake
+++ version_config.cmake
@@ -96,10 +96,19 @@
 if (DEVEL_BUILD)

   # Gadgetron needs 1.65
-  set(Boost_VERSION 1.65.1)
-  set(Boost_REQUIRED_VERSION 1.65.1)
-  set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.zip)
-  set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c)
+  if (APPLE) # really should be checking for CLang
+      # Boost 1.65 contains a bug for recent Clang https://github.com/CCPPETMR/SIRF-SuperBuild/issues/170
+      set(Boost_VERSION 1.68.0)
+      set(Boost_REQUIRED_VERSION 1.66.0)
+      set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/${Boost_VERSION}/boost_1_68_0.zip)
+      set(Boost_MD5 f4096c4583947b0eb103c8539f1623a3)
+  else()
+       # Use version in Ubuntu 18.04
+       set(Boost_VERSION 1.65.1)
+       set(Boost_REQUIRED_VERSION 1.65.1)
+       set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/${Boost_VERSION}/boost_1_65_1.zip)
+       set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c)
+  endif()

   set (DEFAULT_SIRF_TAG origin/master)
   ## STIR


fecpp comment about boost requirement (test code)

--- projects/fecpp.cmake
+++ projects/fecpp.cmake
@@ -24,7 +24,7 @@
     return()
   endif()
   if(NOT (XP_DEFAULT OR XP_PRO_BOOST))
-    message(STATUS "fecpp.cmake: requires boost")
+    message(STATUS "fecpp.cmake: requires boost (test code)")
     set(XP_PRO_BOOST ON CACHE BOOL "include boost" FORCE)
     xpPatchProject(${PRO_BOOST})
   endif()


Added extra DCMTK libraries to search and link line to enable build against new DCMTK-3.6.0 release

--- CMakeModules/FindOurDCMTK.cmake
+++ CMakeModules/FindOurDCMTK.cmake
@@ -134,6 +134,29 @@
     /usr/local/dicom/lib
 )

+FIND_LIBRARY(DCMTK_oflog_LIBRARY oflog
+    ${DCMTK_DIR}/dcmnet/libsrc/Release
+    ${DCMTK_DIR}/dcmnet/libsrc/Debug
+    ${DCMTK_DIR}/dcmnet/libsrc/
+    /usr/local/dicom/lib
+    /usr/local/lib64
+    /usr/lib64
+    /usr/local/lib
+    /usr/lib
+    /usr/local/dicom/lib
+)
+
+FIND_LIBRARY(DCMTK_ofstd_LIBRARY ofstd
+    ${DCMTK_DIR}/dcmnet/libsrc/Release
+    ${DCMTK_DIR}/dcmnet/libsrc/Debug
+    ${DCMTK_DIR}/dcmnet/libsrc/
+    /usr/local/dicom/lib
+    /usr/local/lib64
+    /usr/lib64
+    /usr/local/lib
+    /usr/lib
+    /usr/local/dicom/lib
+)

 IF( DCMTK_config_INCLUDE_DIR
     AND DCMTK_ofstd_INCLUDE_DIR
@@ -172,6 +195,20 @@
    )
   ENDIF(DCMTK_dcmnet_LIBRARY)

+  IF(DCMTK_oflog_LIBRARY)
+   SET( DCMTK_LIBRARIES
+   ${DCMTK_LIBRARIES}
+   ${DCMTK_oflog_LIBRARY}
+   )
+  ENDIF(DCMTK_oflog_LIBRARY)
+
+  IF(DCMTK_ofstd_LIBRARY)
+   SET( DCMTK_LIBRARIES
+   ${DCMTK_LIBRARIES}
+   ${DCMTK_ofstd_LIBRARY}
+   )
+  ENDIF(DCMTK_ofstd_LIBRARY)
+
   IF( WIN32 )
     SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
   ENDIF( WIN32 )


Update CDash drop site to use https

Update CDash drop site to use https

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

-set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_METHOD "https")
 set(CTEST_DROP_SITE "ci.arrayfire.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=ArrayFire")
 set(CTEST_DROP_SITE_CDASH TRUE)


Refs #6476.  Don't do drd/helgrind on open_injection_6476

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -9,6 +9,7 @@
  file_hash_table_tests
  ftruncate
  multiple_backups
+ open_injection_6476
  open_write_close
  read_and_seek
  test6128


Remove broken lex files from lcov report

--- CommonCTest.cmake
+++ CommonCTest.cmake
@@ -88,7 +88,7 @@
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     DEPENDS runtests)
   add_custom_target(lcov-remove
-    COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '/usr/*' '/opt/*' --output-file lcov2.info
+    COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '/usr/*' '/opt/*' '*.l' --output-file lcov2.info
     COMMENT "Cleaning up code coverage counters"
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     DEPENDS lcov-gather)


Fix typo

Fix typo

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -41,7 +41,7 @@

 if(NOT COMMON_ORGANIZATION_NAME)
   set(COMMON_ORGANIZATION_NAME Unknown)
-  message(STATUS "Using ${COMMON_ORGANIZATION_NAME} as origanization")
+  message(STATUS "Using ${COMMON_ORGANIZATION_NAME} as organization")
 endif()

 if(NOT DOXYGEN_CONFIG_FILE)


ENH: centralized locaiton of CMakeFiles setting

--- kwsysPlatformCxxTests.cmake
+++ kwsysPlatformCxxTests.cmake
@@ -7,10 +7,12 @@
       COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
       OUTPUT_VARIABLE OUTPUT)
     IF(${var}_COMPILED)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+      FILE(APPEND
+        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "${description} compiled with the following output:\n${OUTPUT}\n\n")
     ELSE(${var}_COMPILED)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log
+      FILE(APPEND
+        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
     ENDIF(${var}_COMPILED)
     IF(${invert} MATCHES INVERT)


COMP: disable randomly failing test

COMP: disable randomly failing test

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -22,7 +22,8 @@
    mitkTrackingVolumeGeneratorTest.cpp
    mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp
-   mitkVirtualTrackingDeviceTest.cpp
+# This test fails randomly, see bug #8033
+#   mitkVirtualTrackingDeviceTest.cpp
    mitkNavigationDataPlayerTest.cpp
    mitkTrackingDeviceSourceTest.cpp
    mitkTrackingDeviceSourceConfiguratorTest.cpp
@@ -44,4 +45,4 @@
   mitkNDIAuroraHardwareTest.cpp
   mitkNDIPolarisHardwareTest.cpp
   mitkClaronTrackingDeviceHardwareTest.cpp
-)+)


Add DYNAMIC_CORE list for ARM64

Add DYNAMIC_CORE list for ARM64

cf #1908

--- cmake/arch.cmake
+++ cmake/arch.cmake
@@ -44,6 +44,10 @@

 if (DYNAMIC_ARCH)
+  if (ARM64)
+    set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99)
+  endif ()
+
   if (X86)
     set(DYNAMIC_CORE KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS CORE2 PENRYN DUNNINGTON NEHALEM ATHLON OPTERON OPTERON_SSE3 BARCELONA BOBCAT ATOM NANO)
   endif ()


the escape quote must be recursively escaped since it gets re-parsed later.

--- standard/CombinedInstaller.cmake
+++ standard/CombinedInstaller.cmake
@@ -113,13 +113,13 @@
       list(
         APPEND
         CPACK_INSTALL_COMMANDS
-        "${CMAKE_COMMAND} --build \"${CMAKE_BINARY_DIR}\" --config ${ONE_CONFIG}"
+        "${CMAKE_COMMAND} --build \\\"${CMAKE_BINARY_DIR}\\\" --config ${ONE_CONFIG}"
         "${CMAKE_COMMAND} -DBUILD_TYPE=${ONE_CONFIG} -P \\\"${SELF}/cmake_package.cmake\\\""
       )
     endforeach()
   else()
     set(CPACK_INSTALL_COMMANDS
-      "${CMAKE_COMMAND} --build \"${CMAKE_BINARY_DIR}\""
+      "${CMAKE_COMMAND} --build \\\"${CMAKE_BINARY_DIR}\\\""
       "${CMAKE_COMMAND} -P \\\"${SELF}/cmake_package.cmake\\\""
     )
   endif()


build: correct the resource layout for Windows

Windows uses the NeXT-ish layout with a different resource dir
(`<TARGET>.resources`) rather than `Resources`.  Account for that in the
build.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -177,6 +177,11 @@
   endif()

   if(AST_RESOURCES)
+    if(CMAKE_SYSTEM_NAME STREQUAL Windows)
+      set(resources_dir ${target}.resources)
+    else()
+      set(resources_dir Resources)
+    endif()
     add_custom_command(TARGET
                          ${target}
                        POST_BUILD
@@ -185,13 +190,13 @@
                        COMMAND
                          ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${target}
                        COMMAND
-                         ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources)
+                         ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${target}/${resources_dir})
     foreach(resource ${AST_RESOURCES})
       add_custom_command(TARGET
                            ${target}
                          POST_BUILD
                          COMMAND
-                           ${CMAKE_COMMAND} -E copy ${resource} ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources/)
+                           ${CMAKE_COMMAND} -E copy ${resource} ${CMAKE_CURRENT_BINARY_DIR}/${target}/${resources_dir}/)
     endforeach()
   else()
     add_custom_command(TARGET


adds error checking to gtest macro

adds error checking to gtest macro

Signed-off-by: Tobias Olausson <8ce91aefe24c8d194408283a3289b56e24b026bb@gmail.com>

--- cmake_modules/AddGTestTest.cmake
+++ cmake_modules/AddGTestTest.cmake
@@ -1,34 +1,28 @@
 macro(add_gtest_test testName files libraries)

-        if(NOT DEFINED TESTS_INSTALLATION_PATH)
-                set(TESTS_INSTALLATION_PATH "lib/${PROJECT_NAME}/ptest")
-        endif()
+    if(NOT DEFINED TESTS_INSTALLATION_PATH)
+            set(TESTS_INSTALLATION_PATH "lib/${PROJECT_NAME}/ptest")
+    endif()

-        message(STATUS "Tests will be installed in : ${CMAKE_INSTALL_PREFIX}/${TESTS_INSTALLATION_PATH}")
+    message(STATUS "Tests will be installed in : ${CMAKE_INSTALL_PREFIX}/${TESTS_INSTALLATION_PATH}")

-        if (DEFINED $ENV{GTEST_DIR})
-                set(GTEST_DIR $ENV{GTEST_DIR})
-        endif()
+    add_executable(${testName}
+            ${files}
+    )

-        message(STATUS "Google test found in ${GTEST_DIR}")
-
-        include_directories(${GTEST_DIR}/include)
-        link_directories(${GTEST_DIR}/lib/.libs)
-
-        add_executable(${testName}
-                ${files}
-        )
-
+    if ((NOT TARGET gtest) OR (NOT TARGET gmock))
+        message(FATAL_ERROR "No gtest or gmock targets found, can't add tests")
+    else()
         target_link_libraries(${testName}
-                ${libraries}
-                gtest
-                gtest_main
-                gmock
-                gmock_main
+            ${libraries}
+            gtest
+            gtest_main
+            gmock
+            gmock_main
         )

         INSTALL(TARGETS ${testName}
-          DESTINATION ${TESTS_INSTALLATION_PATH}
+            DESTINATION ${TESTS_INSTALLATION_PATH}
         )

         add_test(
@@ -56,5 +50,6 @@

         install(FILES "${CMAKE_CURRENT_BINARY_DIR}/run-ptest" DESTINATION ${TESTS_INSTALLATION_PATH}
                 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
+    endif()

 endmacro()


Automatically create log folder in cmake stage

--- cmake/paths.cmake
+++ cmake/paths.cmake
@@ -9,3 +9,6 @@
   set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/bin/" )
   set( VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin/" )
 endif()
+
+# Create log folder
+file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/log )


Fixed repositoriy urls

Fixed repositoriy urls

--- CMake/Hello.cmake
+++ CMake/Hello.cmake
@@ -1,14 +1,13 @@

-set(HELLO_REPO_URL https://github.com/BlueBrain/Hello.git)
-set(HELLO_DEPENDS bluebrain REQUIRED Boost)
+set(HELLO_REPO_URL https://github.com/kaust-vislab/scpp.git)
+set(HELLO_DEPENDS bluebrain REQUIRED Boost SuperCollider)
 set(HELLO_BOOST_COMPONENTS "unit_test_framework program_options")
 set(HELLO_DEB_DEPENDS libboost-test-dev libboost-program-options-dev)
-
 if(CI_BUILD_COMMIT)
   set(HELLO_REPO_TAG ${CI_BUILD_COMMIT})
 else()
   set(HELLO_REPO_TAG master)
 endif()
 set(HELLO_FORCE_BUILD ON)
-set(HELLO_SOURCE ${CMAKE_SOURCE_DIR})+set(HELLO_SOURCE ${CMAKE_SOURCE_DIR})


Delete CPackConfig.cmake

Delete CPackConfig.cmake

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -1,14 +0,0 @@
-include(InstallRequiredSystemLibraries)
-set(CPACK_PACKAGE_CONTACT koshkinauliana99@gmail.com)
-set(CPACK_PACKAGE_VERSION_MAJOR ${PRINT_VERSION_MAJOR})
-set(CPACK_PACKAGE_VERSION_MINOR ${PRINT_VERSION_MINOR})
-set(CPACK_PACKAGE_VERSION_PATCH ${PRINT_VERSION_PATCH})
-set(CPACK_PACKAGE_VERSION_TWEAK ${PRINT_VERSION_TWEAK})
-set(CPACK_PACKAGE_VERSION ${PRINT_VERSION})
-set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/DESCRIPTION)
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "static c++ library for printing")
-
-set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
-set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
-
-include(CPack)


Tweak CPackConfig

Tweak CPackConfig

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -63,8 +63,7 @@
 if(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
   set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Stefan Eilemann <eile@eyescale.ch>")
 endif()
-set(CPACK_DEBIAN_PACKAGE_SECTION "Development")
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-system, libx11-dev")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libstdc++6, libboost-system, libx11-dev")

 set(CPACK_OSX_PACKAGE_VERSION "10.5")


Hide more auto-generated files from the coverage analysis.

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -18,5 +18,5 @@
   "qhash.h.*increases required alignment of target type"
   )

-# No coverage for these files
-set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_" "/libs/tests" "/server/tests")
+# No coverage for these files (auto-generated, unit tests, etc)
+set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_" "/libs/tests" "/server/tests" "qrc_" "adaptor.h$" "adaptor.cpp$")


ENH: ban Shark dimensionality reduction header if OTB is built without the library

--- CMake/OTBModuleHeaderTest.cmake
+++ CMake/OTBModuleHeaderTest.cmake
@@ -46,7 +46,7 @@
 	SET(BANNED_HEADERS "${BANNED_HEADERS} otbDecisionTreeMachineLearningModelFactory.h otbDecisionTreeMachineLearningModel.h otbKNearestNeighborsMachineLearningModelFactory.h otbKNearestNeighborsMachineLearningModel.h otbRandomForestsMachineLearningModelFactory.h otbRandomForestsMachineLearningModel.h otbSVMMachineLearningModelFactory.h otbSVMMachineLearningModel.h otbGradientBoostedTreeMachineLearningModelFactory.h otbGradientBoostedTreeMachineLearningModel.h otbBoostMachineLearningModelFactory.h otbBoostMachineLearningModel.h otbNeuralNetworkMachineLearningModelFactory.h otbNeuralNetworkMachineLearningModel.h otbNormalBayesMachineLearningModelFactory.h otbNormalBayesMachineLearningModel.h otbRequiresOpenCVCheck.h otbOpenCVUtils.h otbCvRTreesWrapper.h")
 endif()
 if(NOT OTB_USE_SHARK)
-  SET(BANNED_HEADERS "${BANNED_HEADERS} otbSharkRandomForestsMachineLearningModel.h otbSharkRandomForestsMachineLearningModel.hxx otbSharkUtils.h otbRequiresSharkCheck.h otbSharkRandomForestsMachineLearningModelFactory.h  otbSharkKMeansMachineLearningModel.h otbSharkKMeansMachineLearningModel.hxx otbSharkKMeansMachineLearningModelFactory.h otbSharkKMeansMachineLearningModelFactory.hxx")
+  SET(BANNED_HEADERS "${BANNED_HEADERS} otbSharkRandomForestsMachineLearningModel.h otbSharkRandomForestsMachineLearningModel.hxx otbSharkUtils.h otbRequiresSharkCheck.h otbSharkRandomForestsMachineLearningModelFactory.h  otbSharkKMeansMachineLearningModel.h otbSharkKMeansMachineLearningModel.hxx otbSharkKMeansMachineLearningModelFactory.h otbSharkKMeansMachineLearningModelFactory.hxx otbPCAModel.h otbPCAModel.hxx otbPCAModelFactory.h otbPCAModelFactory.hxx otbAutoencoderModel.h otbAutoencoderModel.hxx otbAutoencoderModelFactory.h otbAutoencoderModelFactory.hxx")
 endif()
 if(NOT OTB_USE_LIBSVM)
 	SET(BANNED_HEADERS "${BANNED_HEADERS} otbLibSVMMachineLearningModel.h otbLibSVMMachineLearningModelFactory.h")


Cmake : also remove verbose warnings for gcc 5.4

--- CMakeModules/CompileFlags.cmake
+++ CMakeModules/CompileFlags.cmake
@@ -39,7 +39,7 @@

     # Prevent Eigen from spitting thousands of warnings with gcc 6+
     add_definitions(-Wno-deprecated-declarations)
-    if( ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 6)
+    if( NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.4))
         add_definitions(-Wno-ignored-attributes -Wno-misleading-indentation)
     endif()


Change to use GoogleTest for github repo with update

The 1.8.0 release has issues with MSVC 2017. The usage of tr1 produces
a warning, and flags are enable so that warnings are enabled. The
selected version of GoogleTest is the same one that ITK is using has a
fix for the issue.

google/googletest#1111

--- SuperBuild/External_GTest.cmake
+++ SuperBuild/External_GTest.cmake
@@ -7,17 +7,19 @@

 set(proj GTest)

-set(GTEST_TARGET_VERSION 1.8.0)
-set(GTEST_DOWNLOAD_SOURCE_HASH "16877098823401d1bf2ed7891d7dce36")
+set(GTEST_GIT_REPOSITORY "${git_protocol}://github.com/google/googletest.git" CACHE  STRING "Google Test repository")
+mark_as_advanced(GTEST_GIT_REPOSITORY)
+
+set(GTEST_GIT_TAG "0fe96607d85cf3a25ac40da369db62bbee2939a5" CACHE STRING "Tag or hash for GTtest git repo")
+mark_as_advanced(GTEST_GIT_TAG)
+set(GTEST_TAG_COMMAND GIT_TAG "${GTEST_GIT_TAG}")

 # follow the standard EP_PREFIX locations
 set(GTEST_source_dir ${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj})

-sitkSourceDownload(GTEST_URL "googletest-release-${GTEST_TARGET_VERSION}.tar.gz" ${GTEST_DOWNLOAD_SOURCE_HASH})
-
 ExternalProject_Add(${proj}
-  URL "${GTEST_URL}"
-  URL_MD5 ${GTEST_DOWNLOAD_SOURCE_HASH}
+  GIT_REPOSITORY ${GTEST_GIT_REPOSITORY}
+  ${GTEST_TAG_COMMAND}
   CONFIGURE_COMMAND ""
   BUILD_COMMAND     ""
   INSTALL_COMMAND   ""


Update OsprayExternal.cmake

Update OsprayExternal.cmake

--- Superbuild/OsprayExternal.cmake
+++ Superbuild/OsprayExternal.cmake
@@ -40,7 +40,7 @@
     -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-    -DENABLE_SUPERBUILD:BOOL=ON
+    -DENABLE_OSPRAY_SUPERBUILD:BOOL=ON
 )

 ExternalProject_Get_Property(Ospray_external BINARY_DIR)


CMake: added warning message when the reference variable passed to the macro SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() is not defined or empty.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -377,6 +377,13 @@
     ## 3. Set the root dir which was finally retained by going up "upDir" times
     ## from the given reference path. The variable "referenceVariable" may be a list.
     ## In this case we take its first element.
+
+    # First test if the variable exists and is not empty:
+    IF((NOT DEFINED ${referenceVariable}) OR ("${${referenceVariable}}" STREQUAL ""))
+      MESSAGE(WARNING "${pkg}: the reference variable '${referenceVariable}' used when calling the macro "
+      "SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() does not exist or is empty.")
+    ENDIF()
+
     LIST(LENGTH ${referenceVariable} _tmp_len)
     IF(_tmp_len)
        LIST(GET ${referenceVariable} 0 _tmp_ROOT_DIR)


Add -wd1572 to the icc configuration

Add -wd1572 to the icc configuration

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

--- deal.II/cmake/setup_compiler_flags_intel.cmake
+++ deal.II/cmake/setup_compiler_flags_intel.cmake
@@ -60,10 +60,12 @@
 #   -w175  subscript out of range
 #   -w177  declared but not referenced
 #   -w1478 deprecation warning
+#   -w1572 floating-point equality and inequality comparisons are unreliable
 #
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd175")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd177")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1478")
+ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1572")

 #############################


Note at top of CPackDeb.cmake which cmake version it was taken from. #2389

--- build/cmake/modules/CPackDeb.cmake
+++ build/cmake/modules/CPackDeb.cmake
@@ -1,3 +1,5 @@
+# Based on CMake 2.8.3, modified for use building Condor
+#
 # - The builtin (binary) CPack Deb generator (Unix only)
 # CPackDeb may be used to create Deb package using CPack.
 # CPackDeb is a CPack generator thus it uses the CPACK_XXX variables


MINOR: [C++] Fix foreach usage in Usevcpkg.cmake (#13253)

`foreach(out IN LISTS list1 list2 "item")` will not iterate "item".
Should be `foreach(out IN LISTS list1 list2 IN ITEMS "item")`,
or simpler `foreach(out ${list1} ${list2} "item")`.

Authored-by: Yibo Cai <aff252d85b9734ee2aef1cd0a5d7663a8cae9f5a@apache.org>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/Usevcpkg.cmake
+++ cpp/cmake_modules/Usevcpkg.cmake
@@ -121,7 +121,7 @@
 set(_INST_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg_installed") # try here second
 set(_INST_VCPKG_ROOT "${VCPKG_ROOT}/installed")
 # Iterate over the places
-foreach(_INST_DIR IN LISTS _INST_BUILD_DIR _INST_SOURCE_DIR _INST_VCPKG_ROOT "notfound")
+foreach(_INST_DIR ${_INST_BUILD_DIR} ${_INST_SOURCE_DIR} ${_INST_VCPKG_ROOT} "notfound")
   if(_INST_DIR STREQUAL "notfound")
     message(FATAL_ERROR "vcpkg installed libraries directory not found. "
                         "Install packages with vcpkg before executing cmake.")


templates: set -Wno-unused-local-typedefs when the compiler supports it

This is a new flag introduced by gcc 4.8 and it currently triggers
a LOT of warnings. Since they are really really harmless, just
disable the check for now

--- lib/orogen/templates/config/Base.cmake
+++ lib/orogen/templates/config/Base.cmake
@@ -25,8 +25,12 @@
 include(CheckCXXCompilerFlag)
 CHECK_CXX_COMPILER_FLAG("-Wall" CXX_SUPPORTS_WALL)
 if (CXX_SUPPORTS_WALL)
-    add_definitions (" -Wall")
-endif (CXX_SUPPORTS_WALL)
+    add_definitions ("-Wall")
+endif()
+CHECK_CXX_COMPILER_FLAG("-Wno-unused-local-typedefs" CXX_SUPPORTS_WUNUSED_LOCAL_TYPEDEFS)
+if (CXX_SUPPORTS_WUNUSED_LOCAL_TYPEDEFS)
+    add_definitions ("-Wno-unused-local-typedefs")
+endif()

 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     message(STATUS "running on Linux, implementing the __orogen_getTID() operation on all tasks")


show CMAKE_CXX_COMPILER if it is not recognized

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -98,7 +98,7 @@
             endif()
          endif()
       else()
-         message(WARNING "Untested/-supported Compiler for use with Vc.\nPlease fill out the missing parts in the CMake scripts and submit a patch to http://code.compeng.uni-frankfurt.de/projects/vc")
+         message(WARNING "Untested/-supported Compiler (${CMAKE_CXX_COMPILER}) for use with Vc.\nPlease fill out the missing parts in the CMake scripts and submit a patch to http://code.compeng.uni-frankfurt.de/projects/vc")
       endif()
    endif()
 endmacro()


Add inconsistent-missing-destructor-override to the list of annoying warnings

--- cmake/Warnings.cmake
+++ cmake/Warnings.cmake
@@ -102,7 +102,7 @@
       elseif(WGCC OR WCLANG)
         list(APPEND WarningFlags -Wno-switch-enum)
         if(WCLANG)
-          list(APPEND WarningFlags -Wno-unknown-warning-option -Wno-padded -Wno-undef -Wno-reserved-id-macro -fcomment-block-commands=test,retval)
+          list(APPEND WarningFlags -Wno-unknown-warning-option -Wno-padded -Wno-undef -Wno-reserved-id-macro -Wno-inconsistent-missing-destructor-override -fcomment-block-commands=test,retval)
           if(NOT CMAKE_CXX_STANDARD EQUAL 98)
               list(APPEND WarningFlags -Wno-c++98-compat -Wno-c++98-compat-pedantic)
           endif()


compiler flags

compiler flags

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@5956 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -138,9 +138,13 @@
   endif()
 endif()

+if (CMAKE_COMPILER_IS_GNUCXX)
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--no-allow-shlib-undefined -Wl,-z,defs")
+endif()
+
 if (MINGW)
   # export explicit template instantiations
-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")
+  #set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")

   # large files can overflow pe/coff sections, so use the pe+ format
   include(CheckCXXCompilerFlag)


Setting target architecture for openblas

Former-commit-id: eb86b446f1405b50bd41c8b1dcf6f62a76211d91

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -42,14 +42,13 @@
             list(APPEND FOUND_TARGETS mkl::mkl)
         endif()
     else()
-        list(APPEND DMRG_CONAN_OPTIONS OPTIONS openblas:dynamic_arch=False)
-#        cmake_host_system_information(RESULT _host_name   QUERY HOSTNAME)
-#        if(${_host_name} MATCHES "travis|TRAVIS|Travis|fv-")
-#            message(STATUS "Setting dynamic arch=False for openblas")
-#            list(APPEND DMRG_CONAN_OPTIONS
-#                    OPTIONS openblas:dynamic_arch=False
-#                    OPTIONS openblas:arch=HASWELL)
-#        endif()
+        cmake_host_system_information(RESULT _host_name   QUERY HOSTNAME)
+        if(${_host_name} MATCHES "travis|TRAVIS|Travis|fv-")
+            message(STATUS "Setting dynamic arch=False for openblas")
+            list(APPEND DMRG_CONAN_OPTIONS OPTIONS openblas:dynamic_arch=False)
+        else()
+            list(APPEND DMRG_CONAN_OPTIONS OPTIONS openblas:dynamic_arch=True)
+        endif()
         find_package(Fortran REQUIRED)
         list(APPEND FOUND_TARGETS gfortran::gfortran)
     endif()


Fixed eagle_default build

Fixed eagle_default build

Was missing topics to send and receive vis RTPS

Signed-off-by: Mark Charlebois <f1891e7fc976ae1bd489627e2954fb730751d728@gmail.com>

--- cmake/configs/posix_sdflight_default.cmake
+++ cmake/configs/posix_sdflight_default.cmake
@@ -87,3 +87,11 @@
 	platforms/posix/px4_layer
 	platforms/posix/work_queue
 	)
+
+set(config_rtps_send_topics
+        sensor_baro
+        )
+
+set(config_rtps_receive_topics
+        sensor_combined
+        )


Also ensure that we have ML as part of Trilinos.

--- cmake/configure/configure_2_trilinos.cmake
+++ cmake/configure/configure_2_trilinos.cmake
@@ -42,7 +42,7 @@
       )

     FOREACH(_module
-      Amesos Epetra Ifpack AztecOO Sacado Teuchos
+      Amesos Epetra Ifpack AztecOO Sacado Teuchos ML
       )
       ITEM_MATCHES(_module_found ${_module} ${Trilinos_PACKAGE_LIST})
       IF(_module_found)


Update PythonExternal.cmake

Update PythonExternal.cmake

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -28,14 +28,10 @@

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})

-SET(DEFAULT_PYTHON_VERSION "3.8.7")
-# TODO: check for Apple Silicon/arm64
-#IF(APPLE)
-#  SET(DEFAULT_PYTHON_VERSION "3.8.7")
-#ENDIF()
+SET(DEFAULT_PYTHON_VERSION "3.8.12")

 set(USER_PYTHON_VERSION ${DEFAULT_PYTHON_VERSION} CACHE STRING "Branch name corresponding to Python version number")
-set_property(CACHE USER_PYTHON_VERSION PROPERTY STRINGS 3.6.7 3.7.9 3.8.7 3.9.1)
+set_property(CACHE USER_PYTHON_VERSION PROPERTY STRINGS 3.6.7 3.7.9 3.8.12 3.9.7)

 string(REPLACE "." ";" USER_PYTHON_VERSION_LIST ${USER_PYTHON_VERSION})
 list(GET USER_PYTHON_VERSION_LIST 0 USER_PYTHON_VERSION_MAJOR)


set up LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES correctly for unity target

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -3192,21 +3192,21 @@
 			message (STATUS "unity target ${_unityTargetName} link strategy: ${_linkLibrariesStrategy}")
 		endif()
 		if ("${_linkLibrariesStrategy}" MATCHES "^(COPY|COPY_UNITY)$")
-			set (_unityLinkLibraries "")
 			get_target_property(_linkLibraries ${_target} LINK_LIBRARIES)
 			if (_linkLibraries)
-				list (APPEND _unityLinkLibraries ${_linkLibraries})
+				cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_linkLibraries})
+				set_target_properties(${_unityTargetName} PROPERTIES LINK_LIBRARIES "${_unityLinkLibraries}")
+				if (COTIRE_DEBUG)
+					message (STATUS "unity target ${_unityTargetName} link libraries: ${_unityLinkLibraries}")
+				endif()
 			endif()
 			get_target_property(_interfaceLinkLibraries ${_target} INTERFACE_LINK_LIBRARIES)
 			if (_interfaceLinkLibraries)
-				list (APPEND _unityLinkLibraries ${_interfaceLinkLibraries})
-			endif()
-			cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_unityLinkLibraries})
-			if (COTIRE_DEBUG)
-				message (STATUS "unity target ${_unityTargetName} libraries: ${_unityLinkLibraries}")
-			endif()
-			if (_unityLinkLibraries)
-				target_link_libraries(${_unityTargetName} ${_unityLinkLibraries})
+				cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkInterfaceLibraries ${_interfaceLinkLibraries})
+				set_target_properties(${_unityTargetName} PROPERTIES INTERFACE_LINK_LIBRARIES "${_unityLinkInterfaceLibraries}")
+				if (COTIRE_DEBUG)
+					message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}")
+				endif()
 			endif()
 		endif()
 	endif()