Revert "compiler: gcc: Add warning option to spot poblematic switches"

This reverts commit 680f401ef25af30fe33127db0269f3a060f705cf.

3rd party code in modules is failing due to this enforcment. We need a
away to exclude module code to support such options.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/compiler/gcc/target_warnings.cmake
+++ cmake/compiler/gcc/target_warnings.cmake
@@ -11,12 +11,6 @@
     -Wno-format-zero-length
     -Wno-main
   )
-
-if(CMAKE_C_COMPILER_VERSION VERSION_GREATER "7.1.0")
-  zephyr_compile_options(
-    -Wimplicit-fallthrough=2
-    )
-endif()

 if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9.1.0")
   zephyr_compile_options(


Also activate navigator for 32f4discovery board

--- boards/stm/32f4discovery/default.cmake
+++ boards/stm/32f4discovery/default.cmake
@@ -56,7 +56,7 @@
 		mavlink
 		#mc_att_control
 		mc_pos_control
-		#navigator
+		navigator
 		position_estimator_inav
 		#sensors
 		#vmount


fix findgurobi.cmake

fix findgurobi.cmake

--- cmake/modules/FindGUROBI.cmake
+++ cmake/modules/FindGUROBI.cmake
@@ -28,7 +28,7 @@
         gurobi50
         gurobi51
         gurobi52
-        gurobi53
+        gurobi55
         gurobi60
               PATHS "$ENV{GUROBI_HOME}/lib"
                     "/Library/gurobi502/mac64/lib"


Set -fvisibility-inlines-hidden throughout ROOT.

Avoids "different visibility settings" warning.

--- cmake/modules/SetUpMacOS.cmake
+++ cmake/modules/SetUpMacOS.cmake
@@ -63,7 +63,7 @@
   if (CMAKE_COMPILER_IS_GNUCXX)
      message(STATUS "Found GNU compiler collection")

-     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common")
+     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common -fvisibility-inlines-hidden")
      SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -W -Wall -fsigned-char -fno-common")
      SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy")
      SET(CINT_CXX_DEFINITIONS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION")
@@ -99,7 +99,7 @@

      message(STATUS "Found LLVM compiler collection")

-     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments")
+     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -fvisibility-inlines-hidden")
      SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments")
      SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy")
      SET(CINT_CXX_DEFINITIONS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION")


tweak paths

tweak paths

--- CMakeModules/FindlibSquish.cmake
+++ CMakeModules/FindlibSquish.cmake
@@ -3,8 +3,8 @@
 #  LIBSQUISH_INCLUDE_DIR
 #  LIBSQUISH_LIBRARIES

-FIND_PATH(LIBSQUISH_INCLUDE_DIR squish.h PATHS . .. DOC "Directory containing libSquish headers")
-FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . .. DOC "Path to libSquish library")
+FIND_PATH(LIBSQUISH_INCLUDE_DIR squish.h PATHS . .. squish ../squish DOC "Directory containing libSquish headers")
+FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . .. squish ../squish DOC "Path to libSquish library")

 SET(LIBSQUISH_LIBRARIES ${LIBSQUISH_LIBRARY})


fix for visual studio trying to link "debug.lib" and "release.lib"

--- CMakeModules/OsgMacroUtils.cmake
+++ CMakeModules/OsgMacroUtils.cmake
@@ -44,7 +44,7 @@
                 TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
             ENDIF(${varname}_RELEASE)
         ELSE(${varname}_DEBUG)
-            TARGET_LINK_LIBRARIES(${TRGTNAME} "${${varname}}" )
+            TARGET_LINK_LIBRARIES(${TRGTNAME} ${${varname}} )
         ENDIF(${varname}_DEBUG)
     ENDFOREACH(varname)
 ENDMACRO(LINK_WITH_VARIABLES TRGTNAME)


ARROW-684: [Python] More helpful error message if libparquet_arrow not built

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #443 from wesm/ARROW-684 and squashes the following commits:

c18ca81 [Wes McKinney] More helpful error message if libparquet_arrow not built

--- python/cmake_modules/FindParquet.cmake
+++ python/cmake_modules/FindParquet.cmake
@@ -68,13 +68,21 @@
   set(PARQUET_ARROW_FOUND FALSE)
 endif ()

-if (PARQUET_FOUND)
+if (PARQUET_FOUND AND PARQUET_ARROW_FOUND)
   if (NOT Parquet_FIND_QUIETLY)
     message(STATUS "Found the Parquet library: ${PARQUET_LIBRARIES}")
+    message(STATUS "Found the Parquet Arrow library: ${PARQUET_ARROW_LIBS}")
   endif ()
 else ()
   if (NOT Parquet_FIND_QUIETLY)
-    set(PARQUET_ERR_MSG "Could not find the Parquet library. Looked in ")
+    if (NOT PARQUET_FOUND)
+      set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} Could not find the parquet library.")
+    endif()
+
+    if (NOT PARQUET_ARROW_FOUND)
+      set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} Could not find the parquet_arrow library. Did you build with -DPARQUET_ARROW=on?")
+    endif()
+    set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} Looked in ")
     if ( _parquet_roots )
       set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} in ${_parquet_roots}.")
     else ()
@@ -87,12 +95,6 @@
     endif (Parquet_FIND_REQUIRED)
   endif ()
 endif ()
-
-if (PARQUET_ARROW_FOUND)
-  if (NOT Parquet_FIND_QUIETLY)
-    message(STATUS "Found the Parquet Arrow library: ${PARQUET_ARROW_LIBS}")
-  endif()
-endif()

 mark_as_advanced(
   PARQUET_FOUND


Refactoring TbagData2String cmake script.

--- cmake/TbagScript/TbagData2String.cmake
+++ cmake/TbagScript/TbagData2String.cmake
@@ -31,10 +31,15 @@
         "\n#endif /* __INCLUDE__DATA_TO_STRING__${NAME}_H__ */"
         "\n")

+get_filename_component (OUTPUT_DIR ${OUTPUT_PATH} DIRECTORY)
+if (NOT IS_DIRECTORY "${OUTPUT_DIR}")
+    file (MAKE_DIRECTORY "${OUTPUT_DIR}")
+endif ()
+
 file (WRITE ${OUTPUT_PATH} ${__header_prefix})
 while (${__index} LESS ${__content_length})
     string (SUBSTRING "${__content}" ${__index} ${__substring_size} __content_cursor)
-    file (APPEND ${OUTPUT_PATH} "\n        R\"_${NAME}_(${__content_cursor})_${NAME}_\",")
+    file (APPEND ${OUTPUT_PATH} "\n        R\"__(${__content_cursor})__\",")
     math (EXPR __index "${__index} + ${__substring_size}")
 endwhile ()
 file (APPEND ${OUTPUT_PATH} ${__header_suffix})


Added -fPIC for imguizmoquat

Added -fPIC for imguizmoquat

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -366,6 +366,8 @@
       CMAKE_ARGS
         -DIMGUI_LIBRARY:PATH=${INSTALL_DIR}/${IMGUI_LIB}
         -DIMGUI_INCLUDE_DIR:PATH=${INSTALL_DIR}/include
+        -DCMAKE_C_FLAGS=-fPIC
+        -DCMAKE_CXX_FLAGS=-fPIC
       PATCH_COMMAND ${CMAKE_COMMAND} -E copy
           "${CMAKE_SOURCE_DIR}/externals/imguizmoquat/CMakeLists.txt"
           "<SOURCE_DIR>/CMakeLists.txt")


Improve comments

Improve comments

--- cmake/modules/hunter_read_http_credentials.cmake
+++ cmake/modules/hunter_read_http_credentials.cmake
@@ -1,10 +1,10 @@
 # Copyright (c) 2016, Ruslan Baratov
 # All rights reserved.

-include(hunter_http_password) # for included module
 include(hunter_get_passwords_path)
+include(hunter_http_password)
 include(hunter_status_debug)
-include(hunter_user_error)
+include(hunter_upload_password)

 # Read credentials for package HUNTER_PACKAGE_NAME and
 # save them in parent scope variables:
@@ -18,6 +18,10 @@
   hunter_get_passwords_path(pass_path)

   hunter_status_debug("Including file '${pass_path}'")
+
+  # May use:
+  # * hunter_http_password
+  # * hunter_upload_password
   include("${pass_path}")

   set(


cmake 3.23

cmake 3.23

on archlinux at least this file was moved in 3.23

--- thirdparty/cmake_modules/koreader_thirdparty_git.cmake
+++ thirdparty/cmake_modules/koreader_thirdparty_git.cmake
@@ -176,8 +176,13 @@
     endif()

     # create new gitinfo file if needed
+    if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.23.0")
+        set(gitinfo_configure "${CMAKE_ROOT}/Modules/ExternalProject/RepositoryInfo.txt.in")
+    else()
+        set(gitinfo_configure "${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in")
+    endif()
     configure_file(
-      "${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
+      "${gitinfo_configure}"
       "${gitinfo_file}"
       @ONLY
     )


[Build] Added a CMake support file for weak linking

--- config/targetLinkLibrariesWithDynamicLookup.cmake
+++ config/targetLinkLibrariesWithDynamicLookup.cmake
@@ -1,4 +1,7 @@
 #.rst:
+#
+# Original source:
+#  https://raw.githubusercontent.com/scikit-build/scikit-build/master/skbuild/resources/cmake/targetLinkLibrariesWithDynamicLookup.cmake
 #
 # Public Functions
 # ^^^^^^^^^^^^^^^^


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Debugging omp

Debugging omp

Former-commit-id: a1b4523d7b38292d36c04c39986183da190ef119

--- cmake-modules/Fetch_Eigen3.cmake
+++ cmake-modules/Fetch_Eigen3.cmake
@@ -46,7 +46,7 @@
         target_compile_definitions    (Eigen3::Eigen INTERFACE -DEIGEN_USE_LAPACKE_STRICT)
     endif()

-    target_compile_definitions(Eigen3::Eigen INTERFACE -DEIGEN_DONT_ALIGN_STATICALLY)
+#    target_compile_definitions(Eigen3::Eigen INTERFACE -DEIGEN_DONT_ALIGN_STATICALLY)
 #    target_compile_definitions(Eigen3::Eigen INTERFACE -DEIGEN_DONT_VECTORIZE)
 endif()


Made FreeBSD default to non-GNU ld.

Made FreeBSD default to non-GNU ld.

This patch fixes linking on FreeBSD (when building with Clang) by
adding the necessary linker flags to use either LLD or GOLD (whichever
is found first) instead of GNU LD (BFD), which is incompatible.

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

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -357,6 +357,34 @@
 ######################
 string(COMPARE EQUAL ${CMAKE_SYSTEM_NAME} "FreeBSD" FREEBSD)

+# There is a problem linking with BFD linkers when using Clang on
+# FreeBSD (MESOS-8761). CMake uses the compiler to link, and the
+# compiler uses `/usr/bin/ld` by default. On FreeBSD the default
+# compiler is Clang but the default linker is GNU ld (BFD). Since LLD
+# is available in the base system, and GOLD is available from
+# `devel/binutils`, we look for a more modern linker and tell Clang to
+# use that instead.
+#
+# TODO(dforsyth): Understand why this is failing and add a check to
+# make sure we have a compatible linker (MESOS-8765), or wait until
+# FreeBSD makes lld the default linker.
+if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD
+    AND CMAKE_CXX_COMPILER_ID MATCHES Clang)
+
+  find_program(LD_PROGRAM
+    NAMES ld.lld ld.gold)
+
+  if (NOT LD_PROGRAM)
+    message(FATAL_ERROR
+      "Please set LD_PROGRAM to a working (non-BFD) linker (MESOS-8761) to \
+      build on FreeBSD.")
+  endif ()
+
+  foreach (type EXE SHARED STATIC MODULE)
+    string(APPEND CMAKE_${type}_LINKER_FLAGS " -fuse-ld=${LD_PROGRAM}")
+  endforeach ()
+endif ()
+
 # WINDOWS CONFIGURATION.
 ########################
 if (WIN32)


build: add DT_SONAME for ELF libraries

build: add DT_SONAME for ELF libraries

ELF libraries should have DT_SONAME set so that they can be loaded
properly. This is needed currently since we do not use proper CMake
support for Swift and that requires that we pass along the -soname
flag to the linker ourselves. Account for that.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -133,7 +133,11 @@
   endif()

   if(AST_LIBRARY)
-    set(emit_library -emit-library)
+    if(CMAKE_SYSTEM_NAME STREQUAL Windows OR CMAKE_SYSTEM_NAME STREQUAL Darwin)
+      set(emit_library -emit-library)
+    else()
+      set(emit_library -emit-library -Xlinker -soname -Xlinker ${AST_OUTPUT})
+    endif()
   endif()
   if(NOT AST_LIBRARY OR library_kind STREQUAL SHARED)
     add_custom_command(OUTPUT


Enabling /bigobj builds by default for MSVC builds. Needed by the AWS S3 module and Ogre

--- projects/CMake/ConfigureBuild.cmake
+++ projects/CMake/ConfigureBuild.cmake
@@ -95,5 +95,7 @@
   # Enable intrinsics on MSVC in debug mode
   # Not actually necessary in release mode since /O2 implies /Oi but can't easily add this per build type?
   add_definitions(/Oi)
+
+  add_compile_options(-bigobj)
 endif (MSVC)


BUG: fall back to previous version of SlicerExecutionModel Linux does not compile with latest

--- SuperBuild/External_SlicerExecutionModel.cmake
+++ SuperBuild/External_SlicerExecutionModel.cmake
@@ -35,21 +35,10 @@
   ### --- Project specific additions here
   set(${proj}_CMAKE_OPTIONS
       -DITK_DIR:PATH=${ITK_DIR}
-      -DSlicerExecutionModel_DEFAULT_CLI_RUNTIME_OUTPUT_DIRECTORY:PATH=${BRAINSTools_CLI_RUNTIME_OUTPUT_DIRECTORY}
-      -DSlicerExecutionModel_DEFAULT_CLI_LIBRARY_OUTPUT_DIRECTORY:PATH=${BRAINSTools_CLI_LIBRARY_OUTPUT_DIRECTORY}
-      -DSlicerExecutionModel_DEFAULT_CLI_ARCHIVE_OUTPUT_DIRECTORY:PATH=${BRAINSTools_CLI_ARCHIVE_OUTPUT_DIRECTORY}
-      -DSlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION:STRING=${BRAINSTools_CLI_INSTALL_RUNTIME_DESTINATION}
-      -DSlicerExecutionModel_DEFAULT_CLI_INSTALL_LIBRARY_DESTINATION:STRING=${BRAINSTools_CLI_INSTALL_LIBRARY_DESTINATION}
-      -DSlicerExecutionModel_DEFAULT_CLI_INSTALL_ARCHIVE_DESTINATION:STRING=${BRAINSTools_CLI_INSTALL_ARCHIVE_DESTINATION}
-      #-DSlicerExecutionModel_LIBRARY_PROPERTIES:STRING=${Slicer_LIBRARY_PROPERTIES}
-      #-DSlicerExecutionModel_INSTALL_BIN_DIR:PATH=bin
-      #-DSlicerExecutionModel_INSTALL_LIB_DIR:PATH=lib
-      #-DSlicerExecutionModel_INSTALL_SHARE_DIR:PATH=${Slicer_INSTALL_ROOT}share/${SlicerExecutionModel}
-      #-DSlicerExecutionModel_INSTALL_NO_DEVELOPMENT:BOOL=${Slicer_INSTALL_NO_DEVELOPMENT}
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY "${git_protocol}://github.com/Slicer/SlicerExecutionModel.git")
-  set(${proj}_GIT_TAG 0dee798848bacf26d6d4c0fc5f5397d72c1a202b)
+  set(${proj}_GIT_TAG f43af5be9d460aca762fcbd1e1b3fc26fd8f6cc6)
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -62,7 +51,6 @@
     ${cmakeversion_external_update} "${cmakeversion_external_update_value}"
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
-      ${COMMON_EXTERNAL_PROJECT_ARGS}
       -DBUILD_EXAMPLES:BOOL=OFF
       -DBUILD_TESTING:BOOL=OFF
       ${${proj}_CMAKE_OPTIONS}


KWSys: Remove unused CheckCXXSourceRuns cmake module

This file has not been used in KWSys since commit "Moved test for large
file support into kwsysPlatformCxxTests.cxx", 2006-08-25.  CMake 2.6.0
and above come with a copy of this module anyway, and KWSys has required
CMake 2.6.3 since commit "KWSys: Require at least CMake 2.6.3",
2011-03-01.

--- Modules/ThirdParty/KWSys/src/KWSys/CheckCXXSourceRuns.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/CheckCXXSourceRuns.cmake
@@ -1,62 +0,0 @@
-# - Check if the source code provided in the SOURCE argument compiles.
-# CHECK_CXX_SOURCE_COMPILES(SOURCE VAR)
-# - macro which checks if the source code compiles\
-#  SOURCE - source code to try to compile
-#  VAR    - variable to store size if the type exists.
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
-#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-#  CMAKE_REQUIRED_INCLUDES = list of include directories
-#  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
-
-MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR COMMENT)
-  IF("HAVE_${VAR}" MATCHES "^HAVE_${VAR}$")
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
-      "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
-    IF(CMAKE_REQUIRED_LIBRARIES)
-      SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
-    ELSE(CMAKE_REQUIRED_LIBRARIES)
-      SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
-    ENDIF(CMAKE_REQUIRED_LIBRARIES)
-    IF(CMAKE_REQUIRED_INCLUDES)
-      SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
-        "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
-    ELSE(CMAKE_REQUIRED_INCLUDES)
-      SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
-    ENDIF(CMAKE_REQUIRED_INCLUDES)
-    SET(CMAKE_EMPTY_INPUT_FILE_CONTENT "${SOURCE}")
-    CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMakeEmptyInputFile.in"
-      "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx" IMMEDIATE)
-
-    MESSAGE(STATUS "Performing Test ${COMMENT}")
-    TRY_RUN(${VAR} HAVE_${VAR}
-      ${CMAKE_BINARY_DIR}
-      ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx
-      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-      CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-      "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
-      "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
-      OUTPUT_VARIABLE OUTPUT)
-    IF(HAVE_${VAR})
-      SET(${VAR} 1 CACHE INTERNAL "Test ${COMMENT}")
-      MESSAGE(STATUS "Performing Test ${COMMENT} - Success")
-      FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
-        "Performing C++ SOURCE FILE Test ${COMMENT} succeded with the following output:\n"
-        "${OUTPUT}\n"
-        "Source file was:\n${SOURCE}\n")
-    ELSE(HAVE_${VAR})
-      MESSAGE(STATUS "Performing Test ${COMMENT} - Failed")
-      SET(${VAR} "" CACHE INTERNAL "Test ${COMMENT}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
-        "Performing C++ SOURCE FILE Test ${COMMENT} failed with the following output:\n"
-        "${OUTPUT}\n"
-        "Source file was:\n${SOURCE}\n")
-    ENDIF(HAVE_${VAR})
-  ENDIF("HAVE_${VAR}" MATCHES "^HAVE_${VAR}$")
-ENDMACRO(CHECK_CXX_SOURCE_RUNS)
-
-


Modify svn command.

Modify svn command.

--- CPM.cmake
+++ CPM.cmake
@@ -883,8 +883,8 @@

   if (NOT EXISTS "${dir}/")
     message(STATUS "SVN checking out repo (${repo} @ revision ${revision})")
-    set(cmd "${Subversion_SVN_EXECUTABLE} co ${repo} -r ${revision}
-      --non-interactive ${trustCert} ${svn_user_pw_args} ${dir}")
+    set(cmd ${Subversion_SVN_EXECUTABLE} co ${repo} -r ${revision}
+      --non-interactive ${trustCert} ${svn_user_pw_args} ${dir})
     execute_process(
       COMMAND ${cmd}
       RESULT_VARIABLE result
@@ -898,8 +898,8 @@
   endif()

   # Update the SVN repo.
-  set(cmd "${Subversion_SVN_EXECUTABLE} up -r ${revision}
-    --non-interactive ${trustCert} ${svn_user_pw_args}")
+  set(cmd ${Subversion_SVN_EXECUTABLE} up -r ${revision}
+    --non-interactive ${trustCert} ${svn_user_pw_args})
   execute_process(
     COMMAND ${cmd}
     RESULT_VARIABLE result


Remove check for existence of target.

Remove check for existence of target.

--- CPM.cmake
+++ CPM.cmake
@@ -870,9 +870,7 @@
   endif()

   # Append target to pre-existing libraries.
-  if(TARGET ${CPM_TARGET_NAME})
-    set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
-  endif()
+  set(CPM_LIBRARIES ${CPM_LIBRARIES} "${CPM_TARGET_NAME}" PARENT_SCOPE)
   set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}")
   set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} "${__CPM_MODULE_SOURCE_DIR}/3rdParty" PARENT_SCOPE)


Add EOL

Add EOL

--- scripts/create-toolchain-info.cmake
+++ scripts/create-toolchain-info.cmake
@@ -34,7 +34,7 @@
 file(
     WRITE
     "${TOOLCHAIN_INFO_FILE}"
-    "Cache version: 2"
+    "Cache version: 2\n"
     "Polly toolchains:\n"
     "    IPHONEOS_ARCHS: ${IPHONEOS_ARCHS}\n"
     "    IPHONESIMULATOR_ARCHS: ${IPHONESIMULATOR_ARCHS}\n"


Suppress warning

Suppress warning

--- cmake_compiler_settings/cmake/msvc_flags.cmake
+++ cmake_compiler_settings/cmake/msvc_flags.cmake
@@ -31,6 +31,7 @@
 	add_compile_options(/wd5026 /wd5027)         # move constructor/operator= deleted
 	add_compile_options(/wd4514)                 # unreferenced inline function has been removed
 	add_compile_options(/wd4625 /wd4626)         # copy constructor deleted
+	add_compile_options(/wd4623)                 # default constructor deleted
 	add_compile_options(/wd4710)                 # function not inlined
 	add_compile_options(/wd4711)                 # function will be inlined
 	add_compile_options(/wd4820)                 # X bytes padding added
@@ -103,7 +104,10 @@
 add_compile_options("$<$<CONFIG:RELEASE>:/Qpar>")      # automatic parallelization of loops
 add_compile_options("$<$<CONFIG:RELEASE>:/Gw>")        # optimize Global Data
 add_compile_options("$<$<CONFIG:RELEASE>:/GL>")        # Whole Program Optimization
-add_compile_options("$<$<CONFIG:RELEASE>:/OPT:REF>")   # eliminates functions or data that is never used
+set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:REF")
+set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF")
+set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /OPT:REF")
+set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF")

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


SuperBuild: update macro to use patch_dir from macro args (case for FFTW)

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -133,11 +133,22 @@
 endmacro(ADD_SUPERBUILD_CONFIGURE_VAR)

 macro(SUPERBUILD_PATCH_SOURCE project external_project_step_name)
+  set (extra_args ${ARGN})
+  # Did we get any optional args?
+  list(LENGTH extra_args num_extra_args)
+  if (${num_extra_args} GREATER 0)
+    list(GET extra_args 0 patch_dir_arg)
+    #if there is third argument set is as ${project}_PATCH_DIR
+    set(${project}_PATCH_DIR ${patch_dir_arg})
+  else()
+    #default value
+    set(${project}_PATCH_DIR ${CMAKE_SOURCE_DIR}/patches/${project})
+  endif()
   ExternalProject_Add_Step(${project} ${external_project_step_name}
     COMMAND
     ${CMAKE_COMMAND}
     -DSOURCE_DIR=${${project}_SB_SRC}
-    -DPATCH_DIR=${CMAKE_SOURCE_DIR}/patches/${project}
+    -DPATCH_DIR=${${project}_PATCH_DIR}
     -P ${CMAKE_SOURCE_DIR}/CMake/patch.cmake
     DEPENDEES patch update
     DEPENDERS configure


cmake: Fix error with earlier cmake version.

This fixes the build on SLES11.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -28,7 +28,7 @@

         if (CMAKE_BUILD_TYPE)
             string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
-            if (CMAKE_BUILD_TYPE_LOWER MATCHES (release|relwithdebinfo|minsizerel))
+            if (CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)")
                 check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
                 if (WITH_FORTIFY_SOURCE)
                     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")


Update BuildGoogleBreakpad.cmake

Update BuildGoogleBreakpad.cmake

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -1,7 +1,7 @@
 set(BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR ${CMAKE_EXTERNAL_BINARY_DIR}/breakpad)

 if(WIN32 AND NOT MINGW)
-  if(DEBUG or Debug)
+  if(DEBUG OR Debug)
     set(CONFIGURATION_TYPE Debug)
   else()
     set(CONFIGURATION_TYPE Release)


fbcode_builder: ThriftCppLibrary: the output depends on the thrift templates

Summary:
Update ThriftCppLibrary.cmake to record that the output depends on the thrift
`cpp2` template files.  The `THRIFT_TEMPLATE_FILES` variable was defined in
D16062657 but doesn't appear to be used anywhere.  This uses it, and also
updates it to only match the C++ template files.

Reviewed By: wez

Differential Revision: D16738442

fbshipit-source-id: aa4097e9ec1d009ef1e3ee2efd03ffa19a82ed12

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -77,7 +77,7 @@

   file(
     GLOB_RECURSE THRIFT_TEMPLATE_FILES
-    FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/*.mustache"
+    FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/cpp2/*.mustache"
   )

   # Emit the rule to run the thrift compiler
@@ -101,6 +101,7 @@
       "${THRIFT_FILE}"
     DEPENDS
       ${ARG_DEPENDS}
+      ${THRIFT_TEMPLATE_FILES}
   )

   # Now emit the library rule to compile the sources


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Bump version

Bump version

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 3)
 set (VV_VERSION_MINOR 0)
-set (VV_VERSION_PATCH 0)
+set (VV_VERSION_PATCH 1)


bug fixing

bug fixing

--- android-ndk-r10e-api-16-armeabi-v7a-neon-clang-35.cmake
+++ android-ndk-r10e-api-16-armeabi-v7a-neon-clang-35.cmake
@@ -15,7 +15,7 @@
 set(ANDROID_NDK_VERSION "r10e")
 set(ANDROID_NATIVE_API_LEVEL "16")
 set(ANDROID_ABI "armeabi-v7a with NEON")
-set(ANDROIR_TOOLCHAIN_NAME "arm-linux-androideabi-clang3.5")
+set(ANDROID_TOOLCHAIN_NAME "arm-linux-androideabi-clang3.5")

 polly_init(
     "Android NDK ${ANDROID_NDK_VERSION} / \


Use OTB_WRAP_PYTHON instead of PYTHON_EXECUTABLE

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -109,9 +109,10 @@

   # For now gdal is built if Superbuild has find python... And only on UNIX
   # That might be a problem
-  if ( PYTHON_EXECUTABLE )
+  if ( OTB_WRAP_PYTHON )
     list(APPEND GDAL_CONFIGURE_COMMAND "--with-python=${PYTHON_EXECUTABLE}")
   endif()
+

 else(MSVC)
   configure_file(


SuperBuild: toggle FIND_QUIETLY to stop warning

--- SuperBuild/CMake/SystemCheckup.cmake
+++ SuperBuild/CMake/SystemCheckup.cmake
@@ -134,8 +134,9 @@
 endif()

 # GeoTIFF
+set(GEOTIFF_FIND_QUIETLY TRUE)
 SB_CHECKUP_FIND_PACKAGE(GeoTIFF)
-
+set(GEOTIFF_FIND_QUIETLY FALSE)
 # ITK
 SB_CHECKUP_FIND_PACKAGE(ITK)

@@ -174,8 +175,9 @@
 endif()

 # OpenThreads
+set(OPENTHREADS_FIND_QUIETLY TRUE)
 SB_CHECKUP_FIND_PACKAGE(OpenThreads)
-
+set(OPENTHREADS_FIND_QUIETLY FALSE)
 # OSSIM
 SB_CHECKUP_FIND_PACKAGE(Ossim)

@@ -188,7 +190,9 @@
 endif()

 # TinyXML
+set(TINYXML_FIND_QUIETLY TRUE)
 SB_CHECKUP_FIND_PACKAGE(TinyXML)
+set(tTINYXML_FIND_QUIETLY FALSE)

 message(STATUS "|----------------------------------------------------------")
 # restore real install prefix


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 12)

 # 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 10)

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


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   16)
+SET(KWSYS_DATE_STAMP_DAY   17)


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 09)

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


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 12)

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


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 04)

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


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   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


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 12)

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


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 09)

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


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -15,6 +15,7 @@
 Name[it]=Messaggistica istantanea
 Name[kk]=Лезде хабарласу
 Name[ko]=인스턴트 메시지
+Name[lt]=Tikralaikiai pokalbiai
 Name[nb]=Lynmelding
 Name[nl]=Instant Messaging
 Name[pl]=Komunikator internetowy
@@ -50,6 +51,7 @@
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI
 Comment[kk]=Кез-келген лезде хабарласу контактыңызбен чат-әңгімені бастау не күй-жайын өзгерту
 Comment[ko]=IM 대화 상대와 대화를 시작하거나 상태 바꾸기
+Comment[lt]=Pradėti pokalbį su bet kuriuo TP kontaktu arba pakeiskite savo TP būseną
 Comment[nb]=Start en prat med en av dine LM-kontakter eller endre din LM-status
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
 Comment[pl]=Rozpocznij rozmowę z którymkolwiek z twoich kontaktów lub zmień swoja dostępność


--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -7,6 +7,7 @@
 Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
+Name[hu]=Azonnali üzenetküldés
 Name[ia]=Messageria instantanee
 Name[it]=Messaggistica istantanea
 Name[kk]=Лезде хабарласу
@@ -36,6 +37,7 @@
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
+Comment[hu]=Csevegés indítása az azonnali üzenetküldési partnerei valamelyikével vagy az azonnali üzenetküldési állapotának módosítása
 Comment[ia]=Initia conversation con qualcunque de tu contactos de IM o modifica tu status de IM
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI
 Comment[kk]=Кез-келген лезде хабарласу контактыңызбен чат-әңгімені бастау не күй-жайын өзгерту


Fix the catalyst build (#3647)

Fix the catalyst build (#3647)

The target flag was only added to CXX flags and not C flags, so the bid C files
were being built for the wrong platform.

--- tools/cmake/maccatalyst.toolchain.cmake
+++ tools/cmake/maccatalyst.toolchain.cmake
@@ -5,5 +5,6 @@
 set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx")
 set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst")
 set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15")
+set(CMAKE_C_FLAGS "-target x86_64-apple-ios13.0-macabi -Wno-overriding-t-option")
 set(CMAKE_CXX_FLAGS "-target x86_64-apple-ios13.0-macabi -Wno-overriding-t-option")
 set(CPACK_SYSTEM_NAME "maccatalyst")


Update FindPlatform.cmake

Update FindPlatform.cmake

--- project/cmake/FindPlatform.cmake
+++ project/cmake/FindPlatform.cmake
@@ -25,3 +25,11 @@
         #MESSAGE(STATUS "Detected 32-bit platform.")
     ENDIF()
 endif ()
+
+if (ANDROID_ABI)
+    string(TOLOWER "${CMAKE_SYSTEM_NAME}-${ANDROID_ABI}" PROJECT_PREBUILT_PLATFORM_NAME)
+elseif (CMAKE_OSX_ARCHITECTURES)
+    string(TOLOWER "${CMAKE_SYSTEM_NAME}-${CMAKE_OSX_ARCHITECTURES}" PROJECT_PREBUILT_PLATFORM_NAME)
+else ()
+    string(TOLOWER "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" PROJECT_PREBUILT_PLATFORM_NAME)
+endif ()


Link against MPI Cxx libraries, if available.

If HDF5 is using MPI, for certain implementations the mpi.h that gets
included in Cxx files requires linking against Cxx libraries. This
addresses that issue.

--- CMake/FindHDF5.cmake
+++ CMake/FindHDF5.cmake
@@ -13,4 +13,7 @@
   if(MPI_C_LIBRARIES)
     list(APPEND HDF5_LIBRARIES ${MPI_C_LIBRARIES})
   endif()
+  if(MPI_CXX_LIBRARIES)
+    list(APPEND HDF5_LIBRARIES ${MPI_CXX_LIBRARIES})
+  endif()
 endif()


Small update in the mask (for now).

Small update in the mask (for now).

--- SixTrack/masks.cmake
+++ SixTrack/masks.cmake
@@ -11,5 +11,6 @@
 FILE(READ ${FILE_NAME} INPUT_STRING)
 STRING(REPLACE ",${OPT}," "," TEMP_A ${INPUT_STRING} )
 STRING(REPLACE ",${OPT}\n" "\n" TEMP_B ${TEMP_A} )
-STRING(REPLACE " ${OPT}," " " OUTPUT_STRING ${TEMP_B} )
+STRING(REPLACE "df ${OPT}," "df " TEMP_C ${TEMP_B} )
+STRING(REPLACE "df ${OPT}\n" "df\n" OUTPUT_STRING ${TEMP_C} )
 FILE(WRITE ${FILE_NAME} "${OUTPUT_STRING}")


Create KWSYS_PLATFORM_INFO_TEST macro

Create KWSYS_PLATFORM_INFO_TEST macro

This macro helps KWSys perform try-compile tests that extract 'INFO'
strings out of compiled binaries.  It works for CMake 2.6 and above.
On CMake 2.4 it always returns an empty list of information values,
so this should be used only as an optimization until 2.6 is required.

--- Utilities/kwsys/kwsysPlatformTests.cmake
+++ Utilities/kwsys/kwsysPlatformTests.cmake
@@ -162,3 +162,55 @@
   SET(KWSYS_PLATFORM_TEST_DEFINES)
   SET(KWSYS_PLATFORM_TEST_EXTRA_FLAGS)
 ENDMACRO(KWSYS_PLATFORM_CXX_TEST_RUN)
+
+#-----------------------------------------------------------------------------
+# KWSYS_PLATFORM_INFO_TEST(lang var description)
+#
+# Compile test named by ${var} and store INFO strings extracted from binary.
+MACRO(KWSYS_PLATFORM_INFO_TEST lang var description)
+  # We can implement this macro on CMake 2.6 and above.
+  IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6)
+    SET(${var} "")
+  ELSE()
+    # Choose a location for the result binary.
+    SET(KWSYS_PLATFORM_INFO_FILE
+      ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${var}.bin)
+
+    # Compile the test binary.
+    IF(NOT DEFINED ${var}_COMPILED)
+      MESSAGE(STATUS "${description}")
+      TRY_COMPILE(${var}_COMPILED
+        ${CMAKE_CURRENT_BINARY_DIR}
+        ${CMAKE_CURRENT_SOURCE_DIR}/${KWSYS_PLATFORM_TEST_FILE_${lang}}
+        COMPILE_DEFINITIONS -DTEST_${var}
+          ${KWSYS_PLATFORM_${lang}_TEST_DEFINES}
+          ${KWSYS_PLATFORM_${lang}_TEST_EXTRA_FLAGS}
+        OUTPUT_VARIABLE OUTPUT
+        COPY_FILE ${KWSYS_PLATFORM_INFO_FILE}
+        )
+      IF(${var}_COMPILED)
+        FILE(APPEND
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+          "${description} compiled with the following output:\n${OUTPUT}\n\n")
+      ELSE()
+        FILE(APPEND
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+          "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+      ENDIF()
+      IF(${var}_COMPILED)
+        MESSAGE(STATUS "${description} - compiled")
+      ELSE()
+        MESSAGE(STATUS "${description} - failed")
+      ENDIF()
+    ENDIF()
+
+    # Parse info strings out of the compiled binary.
+    IF(${var}_COMPILED)
+      FILE(STRINGS ${KWSYS_PLATFORM_INFO_FILE} ${var} REGEX "INFO:[A-Za-z0-9]+\\[[^]]*\\]")
+    ELSE()
+      SET(${var} "")
+    ENDIF()
+
+    SET(KWSYS_PLATFORM_INFO_FILE)
+  ENDIF()
+ENDMACRO()


Fixing some typos

Fixing some typos

--- Resources/CMake/CMakeMacros.cmake
+++ Resources/CMake/CMakeMacros.cmake
@@ -227,7 +227,7 @@
           STRING(TOUPPER ${BTYPE} TYPE)
           get_filename_component(lib_path ${${upperlib}_LIBRARY_${TYPE}} PATH)
           get_filename_component(lib_name ${${upperlib}_LIBRARY_${TYPE}} NAME_WE)
-          message(STATUS "Looking for DLL Version of ${lib_name}")
+          #message(STATUS "Looking for DLL Version of ${lib_name}")
           find_path(${upperlib}_LIBRARY_DLL_${TYPE}
                 NAMES ${lib_name}.dll
                 PATHS ${lib_path}/ ${lib_path}/../bin ${lib_path}/..
@@ -241,7 +241,7 @@

           #SET(${upperlib}_LIBRARY_DLL_${TYPE} "${${upperlib}_LIBRARY_DLL_${TYPE}}/${lib_name}.dll" CACHE FILEPATH "The path to the DLL Portion of the library" FORCE)
           # message(STATUS "${upperlib}_LIBRARY_DLL_${TYPE}: ${${upperlib}_LIBRARY_DLL_${TYPE}}")
-          message(STATUS "  Copy: ${${upperlib}_LIBRARY_DLL_${TYPE}}/${lib_name}.dll\n    To: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BTYPE}/")
+          # message(STATUS "  Copy: ${${upperlib}_LIBRARY_DLL_${TYPE}}/${lib_name}.dll\n    To: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BTYPE}/")
           ADD_CUSTOM_TARGET(ZZ_${upperlib}_DLL_${TYPE}-Copy ALL
                       COMMAND ${CMAKE_COMMAND} -E copy_if_different ${${upperlib}_LIBRARY_DLL_${TYPE}}/${lib_name}.dll
                       ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BTYPE}/


ENH: Update Elastix to revision 5299

ENH: Update Elastix to revision 5299

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -2,7 +2,7 @@

 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )
 set( ELASTIX_REPOSITORY http://github.com/kaspermarstal/elastix )
-set( ELASTIX_TAG 18b00fab2328670da448e593362ba9f3091b8cc8 )
+set( ELASTIX_TAG 7c22c995afa86b15e9379db29152a7c84f88dfff )

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_REPOSITORY}


Use the HDF5 release libs always, even when building debug OIIO. Patch proposed by Richard Shaw.

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -285,6 +285,10 @@
         # variables HDF5_INCLUDE_DIRS and HDF5_LIBRARIES.
     else ()
         find_package (HDF5 COMPONENTS CXX)
+        set (HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE})
+        # The above line forces use of the release version of HDF5
+        # libraries; even when we compile OIIO in debug mode, we don't
+        # want the debug versions of HDF5 (which may not even be installed).
     endif ()
     if (VERBOSE)
         message (STATUS "HDF5_FOUND=${HDF5_FOUND}")


Apply AsanFlags to all build components

Apply AsanFlags to all build components

Previously we wouldn't get full coverage because only the 'core' objects
were compiled with the proper flags. This makes the flags apply
universally.

Change-Id: I9a2fa1c44b5e3340469c85d36915082b0e030ea2
Reviewed-on: http://review.couchbase.org/42698
Tested-by: Mark Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetLibcouchbaseFlags.cmake
+++ cmake/Modules/GetLibcouchbaseFlags.cmake
@@ -30,7 +30,8 @@
 ENDIF()

 IF(LCB_USE_ASAN)
-    LIST(APPEND LCB_GNUC_CPP_WARNINGS -fno-omit-frame-pointer -fsanitize=address)
+    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fsanitize=address")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address")
     SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup -fsanitize=address")
     SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
 ENDIF()


Set PETSc language bindings to CXX for mac

--- cmake/modules/DuneMultiscaleMacros.cmake
+++ cmake/modules/DuneMultiscaleMacros.cmake
@@ -1,3 +1,7 @@
 message(AUTHOR_WARNING "TODO: Implement module test.")

-find_package(PETSc REQUIRED)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+  find_package(PETSc COMPONENTS CXX REQUIRED)
+else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+  find_package(PETSc REQUIRED)
+endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")


nicer fix for the --templates bug in nepomuk_rcgen: only add the option if there are templates specified. Not sure if that will ever be needed again though, but it doesn't hurt for now.

svn path=/trunk/KDE/kdepim/; revision=993738

--- akonadi/cmake/modules/MacroAddOntologyClasses.cmake
+++ akonadi/cmake/modules/MacroAddOntologyClasses.cmake
@@ -59,9 +59,14 @@
     if(NOT ${rcgen_result} EQUAL 0)
       message(SEND_ERROR "Failed to generate Nepomuk resource classes list.")
     endif(NOT ${rcgen_result} EQUAL 0)
+
+    list(LENGTH _templates _template_count)
+    if(${_template_count} GREATER 0)
+      list(INSERT _templates 0 --templates)
+    endif(${_template_count} GREATER 0)

     add_custom_command(OUTPUT ${_out_headers} ${_out_sources}
-      COMMAND ${RCGEN} ${_fastmode} --writeall --target ${_targetdir}/ --ontologies ${_ontologies}
+      COMMAND ${RCGEN} ${_fastmode} --writeall ${_templates} --target ${_targetdir}/ --ontologies ${_ontologies}
       DEPENDS ${_ontologies}
       COMMENT "Generating ontology source files from ${_ontofilenames}"
       )


Revert debug option.

Revert debug option.

--- build_settings.cmake
+++ build_settings.cmake
@@ -24,7 +24,7 @@
 set(CXX_SPECIFIC_WARN_OPTS "-Wsuggest-override -Wnon-virtual-dtor -Wformat-security")

 # C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Og -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} -mtune=intel ${EXTRA_C_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} -mtune=intel ${EXTRA_C_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${CXX_SPECIFIC_WARN_OPTS} -std=c++1z -fvisibility-inlines-hidden -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")

 # Linker flags


HTCONDOR-1014: dlopen voms libraries even without GSI present

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -1049,7 +1049,7 @@
 ###########################################
 # order of the below elements is important, do not touch unless you know what you are doing.
 # otherwise you will break due to stub collisions.
-if (DLOPEN_GSI_LIBS)
+if (DLOPEN_GSI_LIBS OR DLOPEN_VOMS_LIBS)
 	set (SECURITY_LIBS "")
 	set (SECURITY_LIBS_STATIC "")
 else()


Add -lnsl to solaris link lines.

Add -lnsl to solaris link lines.

Without this, builds fail when using the vendor linker.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -217,7 +217,7 @@
 	endif()
 	add_definitions(-D_STRUCTURED_PROC)
 	set(HAS_INET_NTOA ON)
-	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lkstat -lelf -lsocket")
+	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lkstat -lelf -lnsl -lsocket")

 	#update for solaris builds to use pre-reqs namely binutils in this case
 	#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -B$ENV{PATH}")


Do not require UUID as a separate library on Darwin.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -441,7 +441,8 @@
     find_multiple( "z" ZLIB_FOUND)
 	find_multiple( "expat" EXPAT_FOUND )
 	find_multiple( "uuid" LIBUUID_FOUND )
-	if (NOT LIBUUID_FOUND)
+		# UUID appears to be available in the C runtime on Darwin.
+	if (NOT LIBUUID_FOUND AND NOT (${OS_NAME} STREQUAL "DARWIN") )
 		message(FATAL_ERROR "Could not find libuuid")
 	endif()
 	find_path(HAVE_UUID_UUID_H "uuid/uuid.h")


Revert "Check new GCC ABI in configure step and eventually fail configuration"

GCC5 ABI patch is in.
This reverts commit 9c2b6c38566283e573f500974a9b3e64787e2f13.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -1,7 +1,6 @@
 #---------------------------------------------------------------------------------------------------
 #  CheckCompiler.cmake
 #---------------------------------------------------------------------------------------------------
-include (CheckCXXSourceCompiles)

 #---Enable FORTRAN (unfortunatelly is not not possible in all cases)-------------------------------
 if(fortran)
@@ -53,15 +52,6 @@
   endif()
   message(STATUS "Found GCC. Major version ${GCC_MAJOR}, minor version ${GCC_MINOR}")
   set(COMPILER_VERSION gcc${GCC_MAJOR}${GCC_MINOR}${GCC_PATCH})
-  CHECK_CXX_SOURCE_COMPILES("
-    #include <string>
-    #if _GLIBCXX_USE_CXX11_ABI
-    #error \"cling does not support GCC 5 ABI.\"
-    #endif
-    int main() {}" CXX_SUPPORTS_OLD_ABI)
-  if(NOT CXX_SUPPORTS_OLD_ABI)
-     message(FATAL_ERROR "Found GCC compiler with new ABI. Cling does not support the GCC 5 ABI yet")
-  endif()
 else()
   set(GCC_MAJOR 0)
   set(GCC_MINOR 0)


- Improve FindPantheios to work with ArchLinux package

--- cmake_modules/FindPantheios.cmake
+++ cmake_modules/FindPantheios.cmake
@@ -35,15 +35,21 @@
     STRING(REGEX REPLACE ".*#define[ ]+PANTHEIOS_VER_MINOR[ ]+([0-9]+).*" "\\1" PANTHEIOS_VER_MINOR "${_pantheios_h_CONTENT}")
     STRING(REGEX REPLACE ".*#define[ ]+PANTHEIOS_VER_REVISION[ ]+([0-9]+).*" "\\1" PANTHEIOS_VER_REVISION "${_pantheios_h_CONTENT}")

-    # ugly hack to get the library directory
-    SET(PANTHEIOS_LIBRARY_DIR ${PANTHEIOS_INCLUDE_DIR}/../lib)
+    # set common places to find pantheios libs
+    SET(PANTHEIOS_LIBRARY_SEARCH_DIR
+        ${PANTHEIOS_INCLUDE_DIR}/../lib # first place to look
+        /usr/local/lib/pantheios
+        /usr/lib/pantheios
+        /usr/local/lib
+        /usr/lib
+       )

     # Look for the libraries.
-    FIND_LIBRARY(PANTHEIOS_CORE_LIBRARY     NAMES pantheios.1.core.gcc44.mt.debug        PATHS ${PANTHEIOS_LIBRARY_DIR})
-    FIND_LIBRARY(PANTHEIOS_UTIL_LIBRARY     NAMES pantheios.1.util.gcc44.mt.debug        PATHS ${PANTHEIOS_LIBRARY_DIR})
-    FIND_LIBRARY(PANTHEIOS_FE_LIBRARY       NAMES pantheios.1.fe.all.gcc44.mt.debug      PATHS ${PANTHEIOS_LIBRARY_DIR})
-    FIND_LIBRARY(PANTHEIOS_BE_FILE_LIBRARY  NAMES pantheios.1.be.fprintf.gcc44.mt.debug  PATHS ${PANTHEIOS_LIBRARY_DIR})
-    FIND_LIBRARY(PANTHEIOS_BEC_FILE_LIBRARY NAMES pantheios.1.bec.fprintf.gcc44.mt.debug PATHS ${PANTHEIOS_LIBRARY_DIR})
+    FIND_LIBRARY(PANTHEIOS_CORE_LIBRARY     NAMES pantheios.1.core.gcc44.mt.debug        PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_UTIL_LIBRARY     NAMES pantheios.1.util.gcc44.mt.debug        PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_FE_LIBRARY       NAMES pantheios.1.fe.all.gcc44.mt.debug      PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_BE_FILE_LIBRARY  NAMES pantheios.1.be.fprintf.gcc44.mt.debug  PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})
+    FIND_LIBRARY(PANTHEIOS_BEC_FILE_LIBRARY NAMES pantheios.1.bec.fprintf.gcc44.mt.debug PATHS ${PANTHEIOS_LIBRARY_SEARCH_DIR})

     LIST(APPEND PANTHEIOS_LIBRARY ${PANTHEIOS_CORE_LIBRARY})
     LIST(APPEND PANTHEIOS_LIBRARY ${PANTHEIOS_UTIL_LIBRARY})


CMake build system: added individual doc pages to each library project for easy editing

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -38,6 +38,7 @@
 		"${CMAKE_SOURCE_DIR}/libs/${name}/src/*.h"
 		"${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}/*.h"
 		"${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}/*.hpp"
+		"${CMAKE_SOURCE_DIR}/doc/doxygen-pages/lib_mrpt_${name}.h"
 		)
 	LIST(APPEND ${name}_EXTRA_SRCS_NAME
 		"${name}"
@@ -46,6 +47,7 @@
 		"${name} Internal Headers"
 		"${name} Public Headers"
 		"${name} Public Headers"
+		"Documentation"
 		)
 	# Only add these ones for "normal" libraries:
 	IF (NOT ${headers_only})


Fix cmake for normal (nonDebian) builds

Fix cmake for normal (nonDebian) builds

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -238,7 +238,7 @@
 		IF(CMAKE_MRPT_USE_DEB_POSTFIXS)
 			SET(MRPT_PREFIX_INSTALL "${CMAKE_INSTALL_PREFIX}/libmrpt-${name}${CMAKE_MRPT_VERSION_NUMBER_MAJOR}.${CMAKE_MRPT_VERSION_NUMBER_MINOR}/usr/")
 		ELSE(CMAKE_MRPT_USE_DEB_POSTFIXS)
-			SET(MRPT_PREFIX_INSTALL "")
+			SET(MRPT_PREFIX_INSTALL "${CMAKE_INSTALL_PREFIX}")
 		ENDIF(CMAKE_MRPT_USE_DEB_POSTFIXS)

 		# make sure the library gets installed


Remove the trailing slash at the end of the 3rdparty path.

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

--- 3rdparty/libprocess/cmake/ProcessConfigure.cmake
+++ 3rdparty/libprocess/cmake/ProcessConfigure.cmake
@@ -46,8 +46,8 @@

 # DEFINE DIRECTORY STRUCTURE FOR THIRD-PARTY LIBS.
 ##################################################
-set(PROCESS_3RD_SRC ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/3rdparty/)
-set(PROCESS_3RD_BIN ${CMAKE_BINARY_DIR}/3rdparty/libprocess/3rdparty/)
+set(PROCESS_3RD_SRC ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/3rdparty)
+set(PROCESS_3RD_BIN ${CMAKE_BINARY_DIR}/3rdparty/libprocess/3rdparty)

 set(STOUT ${PROCESS_3RD_SRC}/stout)


Generated directory removed from test coverage (fixes #54).

--- cmake/Coverage.cmake
+++ cmake/Coverage.cmake
@@ -43,6 +43,7 @@

                                 COMMAND ${LCOV}
                                 --remove ${COV_FILE} "*/test/*"
+                                --remove ${COV_FILE} "*/generated/*"
                                 --output-file ${COV_FILE}

                                 COMMAND ${LCOV_GENHTML} --legend ${COV_FILE}


adjust cppcheck parameters

adjust cppcheck parameters

--- cmake/Cppcheck.cmake
+++ cmake/Cppcheck.cmake
@@ -2,27 +2,25 @@
 # Function to register a target for cppcheck
 function(perform_cppcheck check_target target)
     set(includes "$<TARGET_PROPERTY:${target},INCLUDE_DIRECTORIES>")
-
+
     add_custom_target(
         ${check_target}
         COMMAND
             ${cppcheck_EXECUTABLE}
                 "$<$<BOOL:${includes}>:-I$<JOIN:${includes},\t-I>>"
-                --check-config
-                --enable=warning,performance,portability,information,missingInclude
-                --quiet
+                --enable=all
                 --std=c++11
                 --verbose
                 --suppress=missingIncludeSystem
                 ${ARGN}
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     )
-
+
     set_target_properties(${check_target}
         PROPERTIES
         FOLDER "Maintenance"
         EXCLUDE_FROM_DEFAULT_BUILD 1
     )
-
+
     add_dependencies(${check_target} ${target})
 endfunction()


Fix glfw 3 Linux dependencies (add Xcursor and -lrt)

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -120,7 +120,11 @@
             message(FATAL_ERROR "xf86vmode library not found - required for GLFW")
         endif()

-        list(APPEND GLFW_x11_LIBRARY "${X11_Xrandr_LIB}" "${X11_Xxf86vm_LIB}")
+        if(NOT X11_Xcursor_FOUND)
+            message(FATAL_ERROR "Xcursor library not found - required for GLFW")
+        endif()
+
+        list(APPEND GLFW_x11_LIBRARY "${X11_Xrandr_LIB}" "${X11_Xxf86vm_LIB}" "${X11_Xcursor_LIB}" -lrt)

         find_library( GLFW_glfw_LIBRARY
             NAMES


Make the xine cmake module fail properly if it isnt found

--- cmake/FindXine.cmake
+++ cmake/FindXine.cmake
@@ -32,6 +32,7 @@
  PATHS ${PKG_XINE_LIBRARY_DIRS} )

 if (XINE_INCLUDE_DIR AND XINE_LIBRARY)
+   include(MacroEnsureVersion)
    macro_ensure_version(1.1.9 ${PKG_XINE_VERSION} XINE_VERSION_OK)
    if (XINE_VERSION_OK)
       set(XINE_FOUND TRUE)
@@ -54,4 +55,7 @@
    endif (NOT Xine_FIND_QUIETLY)
 endif (XINE_FOUND)

+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Xine  "Could NOT find XINE 1.1.9 or greater"  XINE_INCLUDE_DIR XINE_LIBRARY XINE_VERSION_OK)
+
 MARK_AS_ADVANCED(XINE_INCLUDE_DIR XINE_LIBRARY)


dial bach -march since some Athlons still live

--- cmake/defaults.cmake
+++ cmake/defaults.cmake
@@ -21,7 +21,8 @@

 if (NOT GCC_FLAGS)
     # general flags for any compilation with gcc/g++
-    set(GCC_FLAGS "-pthread -march=core2")
+    # someday use "-march=core2 -msse4.1" after retiring old Athlons still in use
+    set(GCC_FLAGS "-pthread -mtune=core2")
     set(GCC_FLAGS "${GCC_FLAGS} -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter")
     set(GCC_FLAGS "${GCC_FLAGS} -Wpointer-arith -Wcast-align -Wuninitialized -Wwrite-strings")
     #set(GCC_FLAGS "${GCC_FLAGS} -Wshadow")


Reflect ARMV8 target definition changes from PR1876

and create config target directory for cross-compiles.

--- cmake/prebuild.cmake
+++ cmake/prebuild.cmake
@@ -116,18 +116,19 @@
       "#define L2_LINESIZE\t64\n"
       "#define DTB_DEFAULT_ENTRIES\t64\n"
       "#define DTB_SIZE\t4096\n"
-      "#define L2_ASSOCIATIVE\t32\n")
+      "#define L2_ASSOCIATIVE\t32\n"
+      "#define ARMV8\n")
     set(SGEMM_UNROLL_M 4)
     set(SGEMM_UNROLL_N 4)
-  elseif ("${CORE}" STREQUAL "CORTEXA57")
-    file(APPEND ${TARGET_CONF_TEMP}
-      "#define L1_CODE_SIZE\t49152\n"
+  elseif ("${CORE}" STREQUAL "CORTEXA57" OR "${CORE}" STREQUAL "CORTEXA53")
+    file(APPEND ${TARGET_CONF_TEMP}
+      "#define L1_CODE_SIZE\t32768\n"
       "#define L1_CODE_LINESIZE\t64\n"
       "#define L1_CODE_ASSOCIATIVE\t3\n"
       "#define L1_DATA_SIZE\t32768\n"
       "#define L1_DATA_LINESIZE\t64\n"
       "#define L1_DATA_ASSOCIATIVE\t2\n"
-      "#define L2_SIZE\t2097152\n"
+      "#define L2_SIZE\t262144\n"
       "#define L2_LINESIZE\t64\n"
       "#define L2_ASSOCIATIVE\t16\n"
       "#define DTB_DEFAULT_ENTRIES\t64\n"
@@ -135,7 +136,8 @@
       "#define HAVE_VFPV4\n"
       "#define HAVE_VFPV3\n"
       "#define HAVE_VFP\n"
-      "#define HAVE_NEON\n")
+      "#define HAVE_NEON\n"
+      "#define ARMV8\n")
     set(SGEMM_UNROLL_M 16)
     set(SGEMM_UNROLL_N 4)
     set(DGEMM_UNROLL_M 8)
@@ -143,6 +145,109 @@
     set(CGEMM_UNROLL_M 8)
     set(CGEMM_UNROLL_N 4)
     set(ZGEMM_UNROLL_M 8)
+    set(ZGEMM_UNROLL_N 4)
+  elseif ("${CORE}" STREQUAL "CORTEXA72" OR "${CORE}" STREQUAL "CORTEXA73")
+    file(APPEND ${TARGET_CONF_TEMP}
+      "#define L1_CODE_SIZE\t49152\n"
+      "#define L1_CODE_LINESIZE\t64\n"
+      "#define L1_CODE_ASSOCIATIVE\t3\n"
+      "#define L1_DATA_SIZE\t32768\n"
+      "#define L1_DATA_LINESIZE\t64\n"
+      "#define L1_DATA_ASSOCIATIVE\t2\n"
+      "#define L2_SIZE\t524288\n"
+      "#define L2_LINESIZE\t64\n"
+      "#define L2_ASSOCIATIVE\t16\n"
+      "#define DTB_DEFAULT_ENTRIES\t64\n"
+      "#define DTB_SIZE\t4096\n"
+      "#define HAVE_VFPV4\n"
+      "#define HAVE_VFPV3\n"
+      "#define HAVE_VFP\n"
+      "#define HAVE_NEON\n"
+      "#define ARMV8\n")
+    set(SGEMM_UNROLL_M 16)
+    set(SGEMM_UNROLL_N 4)
+    set(DGEMM_UNROLL_M 8)
+    set(DGEMM_UNROLL_N 4)
+    set(CGEMM_UNROLL_M 8)
+    set(CGEMM_UNROLL_N 4)
+    set(ZGEMM_UNROLL_M 8)
+    set(ZGEMM_UNROLL_N 4)
+  elseif ("${CORE}" STREQUAL "FALKOR")
+    file(APPEND ${TARGET_CONF_TEMP}
+      "#define L1_CODE_SIZE\t65536\n"
+      "#define L1_CODE_LINESIZE\t64\n"
+      "#define L1_CODE_ASSOCIATIVE\t3\n"
+      "#define L1_DATA_SIZE\t32768\n"
+      "#define L1_DATA_LINESIZE\t128\n"
+      "#define L1_DATA_ASSOCIATIVE\t2\n"
+      "#define L2_SIZE\t524288\n"
+      "#define L2_LINESIZE\t64\n"
+      "#define L2_ASSOCIATIVE\t16\n"
+      "#define DTB_DEFAULT_ENTRIES\t64\n"
+      "#define DTB_SIZE\t4096\n"
+      "#define HAVE_VFPV4\n"
+      "#define HAVE_VFPV3\n"
+      "#define HAVE_VFP\n"
+      "#define HAVE_NEON\n"
+      "#define ARMV8\n")
+    set(SGEMM_UNROLL_M 16)
+    set(SGEMM_UNROLL_N 4)
+    set(DGEMM_UNROLL_M 8)
+    set(DGEMM_UNROLL_N 4)
+    set(CGEMM_UNROLL_M 8)
+    set(CGEMM_UNROLL_N 4)
+    set(ZGEMM_UNROLL_M 8)
+    set(ZGEMM_UNROLL_N 4)
+  elseif ("${CORE}" STREQUAL "THUNDERX)
+    file(APPEND ${TARGET_CONF_TEMP}
+      "#define L1_CODE_SIZE\t32768\n"
+      "#define L1_CODE_LINESIZE\t64\n"
+      "#define L1_CODE_ASSOCIATIVE\t3\n"
+      "#define L1_DATA_SIZE\t32768\n"
+      "#define L1_DATA_LINESIZE\t128\n"
+      "#define L1_DATA_ASSOCIATIVE\t2\n"
+      "#define L2_SIZE\t167772164\n"
+      "#define L2_LINESIZE\t128\n"
+      "#define L2_ASSOCIATIVE\t16\n"
+      "#define DTB_DEFAULT_ENTRIES\t64\n"
+      "#define DTB_SIZE\t4096\n"
+      "#define HAVE_VFPV4\n"
+      "#define HAVE_VFPV3\n"
+      "#define HAVE_VFP\n"
+      "#define HAVE_NEON\n"
+      "#define ARMV8\n")
+    set(SGEMM_UNROLL_M 4)
+    set(SGEMM_UNROLL_N 4)
+    set(DGEMM_UNROLL_M 2)
+    set(DGEMM_UNROLL_N 2)
+    set(CGEMM_UNROLL_M 2)
+    set(CGEMM_UNROLL_N 2)
+    set(ZGEMM_UNROLL_M 2)
+    set(ZGEMM_UNROLL_N 2)
+  elseif ("${CORE}" STREQUAL "THUNDERX2T99)
+    file(APPEND ${TARGET_CONF_TEMP}
+      "#define L1_CODE_SIZE\t32768\n"
+      "#define L1_CODE_LINESIZE\t64\n"
+      "#define L1_CODE_ASSOCIATIVE\t8\n"
+      "#define L1_DATA_SIZE\t32768\n"
+      "#define L1_DATA_LINESIZE\t64\n"
+      "#define L1_DATA_ASSOCIATIVE\t8\n"
+      "#define L2_SIZE\t262144\n"
+      "#define L2_LINESIZE\t64\n"
+      "#define L2_ASSOCIATIVE\t8\n"
+      "#define L3_SIZE\t33554432\n"
+      "#define L3_LINESIZE\t64\n"
+      "#define L3_ASSOCIATIVE\t32\n"
+      "#define DTB_DEFAULT_ENTRIES\t64\n"
+      "#define DTB_SIZE\t4096\n"
+      "#define VULCAN\n")
+    set(SGEMM_UNROLL_M 16)
+    set(SGEMM_UNROLL_N 4)
+    set(DGEMM_UNROLL_M 8)
+    set(DGEMM_UNROLL_N 4)
+    set(CGEMM_UNROLL_M 8)
+    set(CGEMM_UNROLL_N 4)
+    set(ZGEMM_UNROLL_M 4)
     set(ZGEMM_UNROLL_N 4)
   endif()

@@ -163,6 +268,7 @@
   file(APPEND ${TARGET_CONF_TEMP}
     "#define GEMM_MULTITHREAD_THRESHOLD\t${GEMM_MULTITHREAD_THRESHOLD}\n")
   # Move to where gen_config_h would place it
+  file(MAKE_DIRECTORY ${TARGET_CONF_DIR})
   file(RENAME ${TARGET_CONF_TEMP} "${TARGET_CONF_DIR}/${TARGET_CONF}")

 else(NOT CMAKE_CROSSCOMPILING)


Testing file tracking

Testing file tracking

--- BoltFlow/cmake/SelectLibraryConfigurations.cmake
+++ BoltFlow/cmake/SelectLibraryConfigurations.cmake
@@ -1,4 +1,4 @@
-#.rst:
+#
 # SelectLibraryConfigurations
 # ---------------------------
 #


fix for multiple nodes not being recognized (#790)

Signed-off-by: Siddharth Kucheria <d65c5de2f9241ed00720b7a6cb488b563b037de2@usc.edu>

--- rclcpp_components/cmake/rclcpp_components_register_node.cmake
+++ rclcpp_components/cmake/rclcpp_components_register_node.cmake
@@ -38,9 +38,9 @@
   set(_RCLCPP_COMPONENTS__NODES
     "${_RCLCPP_COMPONENTS__NODES}${component};${_path}/$<TARGET_FILE_NAME:${target}>\n")
   configure_file(${rclcpp_components_NODE_TEMPLATE}
-    ${PROJECT_BINARY_DIR}/node_main_configured.cpp.in)
+    ${PROJECT_BINARY_DIR}/rclcpp_components/node_main_configured_${node}.cpp.in)
   file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/rclcpp_components/node_main_${node}.cpp
-    INPUT ${PROJECT_BINARY_DIR}/node_main_configured.cpp.in)
+    INPUT ${PROJECT_BINARY_DIR}/rclcpp_components/node_main_configured_${node}.cpp.in)
   add_executable(${node} ${PROJECT_BINARY_DIR}/rclcpp_components/node_main_${node}.cpp)
   ament_target_dependencies(${node}
     "rclcpp"


优化VS目录

优化VS目录

--- project/cmake/modules/IncludeDirectoryRecurse.cmake
+++ project/cmake/modules/IncludeDirectoryRecurse.cmake
@@ -69,20 +69,18 @@
 # cmake VC 源文件分组
 # source_group_by_dir [Source List Var1 [Source List Var2 [...]]]
 macro(source_group_by_dir)
-    if(MSVC)
-        foreach(source_files ${ARGV})
-            set(sgbd_cur_dir ${CMAKE_CURRENT_SOURCE_DIR})
-            foreach(sgbd_file ${${source_files}})
-                string(REGEX REPLACE ${sgbd_cur_dir}/\(.*\) \\1 sgbd_fpath ${sgbd_file})
-                string(REGEX REPLACE "\(.*\)/.*" \\1 sgbd_group_name ${sgbd_fpath})
-                string(COMPARE EQUAL ${sgbd_fpath} ${sgbd_group_name} sgbd_nogroup)
-                string(REPLACE "/" "\\" sgbd_group_name ${sgbd_group_name})
-                if(sgbd_nogroup)
-                    set(sgbd_group_name "\\")
-                endif(sgbd_nogroup)
-                source_group(${sgbd_group_name} FILES ${sgbd_file})
-            endforeach(sgbd_file)
-        endforeach()
+	if(MSVC)
+		foreach(source_files ${ARGV})
+			foreach(sgbd_file ${${source_files}})
+				file(RELATIVE_PATH sgbd_fpath ${CMAKE_CURRENT_SOURCE_DIR} ${sgbd_file})
+				string(REGEX REPLACE "\(.*\)/.*" \\1 sgbd_group_name ${sgbd_fpath})
+				string(COMPARE EQUAL ${sgbd_fpath} ${sgbd_group_name} sgbd_nogroup)
+				string(REPLACE "/" "\\" sgbd_group_name ${sgbd_group_name})
+				if(sgbd_nogroup)
+					set(sgbd_group_name "\\")
+				endif(sgbd_nogroup)
+				source_group(${sgbd_group_name} FILES ${sgbd_file})
+			endforeach(sgbd_file)
+		endforeach()
     endif(MSVC)
 endmacro(source_group_by_dir)
-


Patch [3427552] - FindOpenGLES.cmake doesn't support OpenGL ES 1.1 spec

--- CMake/Packages/FindOpenGLES.cmake
+++ CMake/Packages/FindOpenGLES.cmake
@@ -42,17 +42,14 @@

   ELSE(APPLE)

-
-
     FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h
       /usr/openwin/share/include
       /opt/graphics/OpenGL/include /usr/X11R6/include
       /usr/include
     )

-
     FIND_LIBRARY(OPENGLES_gl_LIBRARY
-      NAMES GLES_CM
+      NAMES GLES_CM GLESv1_CM
       PATHS /opt/graphics/OpenGL/lib
             /usr/openwin/lib
             /usr/shlib /usr/X11R6/lib
@@ -62,16 +59,13 @@
     # On Unix OpenGL most certainly always requires X11.
     # Feel free to tighten up these conditions if you don't
     # think this is always true.
-    # It's not true on OSX.

     IF (OPENGLES_gl_LIBRARY)
       IF(NOT X11_FOUND)
         INCLUDE(FindX11)
       ENDIF(NOT X11_FOUND)
       IF (X11_FOUND)
-        IF (NOT APPLE)
-          SET (OPENGLES_LIBRARIES ${X11_LIBRARIES})
-        ENDIF (NOT APPLE)
+        SET (OPENGLES_LIBRARIES ${X11_LIBRARIES})
       ENDIF (X11_FOUND)
     ENDIF (OPENGLES_gl_LIBRARY)

@@ -99,4 +93,4 @@
   set(CMAKE_PREFIX_PATH ${CMAKE_SYSYEM_OUT_DIR})
   FIND_LIBRARY(OPENGLES_gl_LIBRARY libgles_cm )
   set(CMAKE_PREFIX_PATH ${ORIGINAL_CMAKE_PREFIX_PATH})
-endif()+endif()


fix cmake block comment syntax

fix cmake block comment syntax

--- CMakeModules/FindFontconfig.cmake
+++ CMakeModules/FindFontconfig.cmake
@@ -1,6 +1,6 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
-
+#[[=======================================================================.rst:
 FindFontconfig
 --------------

@@ -28,6 +28,7 @@
 ``FONTCONFIG_COMPILE_OPTIONS``
   this should be passed to target_compile_options(), if the
   target is not used for linking
+=======================================================================]]

 # use pkg-config to get the directories and then use these values
 # in the FIND_PATH() and FIND_LIBRARY() calls


fixed project load test

fixed project load test

--- tests/package/project_tests/project_load_test.cmake
+++ tests/package/project_tests/project_load_test.cmake
@@ -1,5 +1,8 @@
 function(test)

+  path_package_source()
+  ans(path_source)
+
   ## event handler protocols all events fired
   map_new()
   ans(context)
@@ -60,7 +63,7 @@
   managed_package_source("project" "${test_dir}/pr2/packages")
   ans(managed_source)

-  assign(success = managed_source.push(pkg1))
+  assign(success = managed_source.push(${path_source} pkg1))
   project_new()
   ans(project)


Fix for Epoxy to work with SDL and VS 2015

--- Tools/CMake/libraries/epoxy.cmake
+++ Tools/CMake/libraries/epoxy.cmake
@@ -30,10 +30,14 @@
    addDef(BUILD_WGL)
 else()
    addPath("${libDir}/epoxy/src/glx")
-   addDef(BUILD_GLX)
+   addDef(BUILD_GLX)
 endif()

 addInclude("${libDir}/epoxy/include")
 addInclude("${libDir}/epoxy/src")

 finishLibrary()
+# VS 2015 has a problem with sdl and epoxy together and requires optimizations to be disabled
+if (MSVC14)
+	target_compile_options(epoxy PRIVATE "/Od")
+endif()


Correctly read installed provisioning files.

--- BlueBerry/CMake/FunctionCreateProvisioningFile.cmake
+++ BlueBerry/CMake/FunctionCreateProvisioningFile.cmake
@@ -11,9 +11,9 @@
   endif()

   foreach(incl ${_PROV_INCLUDE})
-    string(REPLACE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" "@EXECUTABLE_DIR" incl_install ${incl})
+    get_filename_component(incl_filename "${incl}" NAME)
     set(out_var "${out_var}READ ${file_url}${incl}\n")
-    set(out_var_install "${out_var_install}READ ${file_url}${incl_install}\n")
+    set(out_var_install "${out_var_install}READ ${file_url}@EXECUTABLE_DIR/${incl_filename}\n")
   endforeach()

   if(_PROV_INCLUDE)


Partial update of cmake-init

Partial update of cmake-init

--- libzeug-config.cmake
+++ libzeug-config.cmake
@@ -44,5 +44,10 @@
 endif()

 # Try common build locations
-find_modules("build/cmake")
-find_modules("build-debug/cmake")
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+    find_modules("build-debug/cmake")
+    find_modules("build/cmake")
+else()
+    find_modules("build/cmake")
+    find_modules("build-debug/cmake")
+endif()


Remove -O1 from relwithdebinfo

Remove -O1 from relwithdebinfo

Former-commit-id: b19519dc7cc245dc417f646df6cadf014886dadf

--- cmake-modules/CompilerFlags.cmake
+++ cmake-modules/CompilerFlags.cmake
@@ -86,6 +86,8 @@
 string (REPLACE ";" " " CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_LIST}")
 string (REPLACE ";" " " CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL_LIST}")

+#string(REPLACE "-O2" "-O1" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
+
 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)


Enable coverage also for release build

Enable coverage also for release build

--- cmake/CMakeCompilerSettings.cmake
+++ cmake/CMakeCompilerSettings.cmake
@@ -4,6 +4,7 @@
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wformat -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -Wformat=2 -Wextra -Wnon-virtual-dtor -fPIC -O0")
     if(WITH_COVERAGE)
         set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
     endif()
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
     # TODO figure clang stuff to enable test-coverage


Fix for ROOT-6459

Fix for ROOT-6459

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -120,7 +120,9 @@
     endif()
     if(files)
       foreach(s ${files})
-        if(s MATCHES "${cwd}/G__") # Eliminate G__* files only when using wildcards
+        if(fp MATCHES "[*]" AND s MATCHES "(^|/)G__") # Eliminate G__* files
+        elseif(s MATCHES "${cwd}/G__")
+          set(sources ${fp} ${sources})
         else()
           set(sources ${sources} ${s})
         endif()


fix linker warning on Windows

fix linker warning on Windows

--- cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
+++ cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
@@ -81,6 +81,8 @@
 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED ${_generated_files})
 if(WIN32)
   target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
+    PRIVATE "ROSIDL_BUILDING_DLL")
+  target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PRIVATE "ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_BUILDING_DLL")
 endif()
 target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}


Revert "Update external protobuf codebase version for Windows cmake build"

This reverts commit 07bec47ba5db4c2f2e33ecb49f23253a371bfbbe.

--- tensorflow/contrib/cmake/external/protobuf.cmake
+++ tensorflow/contrib/cmake/external/protobuf.cmake
@@ -16,7 +16,7 @@

 set(PROTOBUF_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/protobuf/src/protobuf/src)
 set(PROTOBUF_URL https://github.com/google/protobuf.git)
-set(PROTOBUF_TAG 396336eb961b75f03b25824fe86cf6490fb75e3a)
+set(PROTOBUF_TAG b04e5cba356212e4e8c66c61bbe0c3a20537c5b9)

 if(WIN32)
   set(protobuf_STATIC_LIBRARIES


Try to fix confusing message

Try to fix confusing message

--- cmake/modules/FindKLEENativeRuntime.cmake
+++ cmake/modules/FindKLEENativeRuntime.cmake
@@ -40,8 +40,7 @@
   message(STATUS "Found KLEE runtime include path: \"${KLEE_NATIVE_RUNTIME_INCLUDE_DIR}\"")
 else()
   message(STATUS "Could not find KLEE runtime include path.\n"
-		"Try setting the KLEE_NATIVE_RUNTIME_INCLUDE_DIR environment variable to the directory"
-    " containing \"include/klee.h\""
+    "Try setting the KLEE_NATIVE_RUNTIME_INCLUDE_DIR environment variable to the KLEE include directory"
   )
 endif()


include(hunter_cacheable)

--- cmake/projects/nlohmann-json/hunter.cmake
+++ cmake/projects/nlohmann-json/hunter.cmake
@@ -1,6 +1,7 @@
 # !!! DO NOT PLACE HEADER GUARDS HERE !!!

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


[FIX] Forcing CMAKE_CXX_FLAGS to be a string in the SeqAn build system.

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

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -46,6 +46,22 @@

 include (SeqAnUsabilityAnalyzer)
 include (SeqAnLegacyBuildSystem)
+
+# ---------------------------------------------------------------------------
+# Normalize CMAKE_CXX_FLAGS to be a string.
+#
+# If we do not do this then setting the environment variable CXXFLAGS will
+# cause CMAKE_CXX_FLAGS to become a list and this will generate compiler
+# command lines including the list item separator semicolon ";".  This makes
+# the compiler command fail.
+# ---------------------------------------------------------------------------
+
+if (CMAKE_CXX_FLAGS)
+  foreach (_FLAG ${CMAKE_CXX_FLAGS})
+    set (_FLAGS "${_FLAGS} ${_FLAG}")
+  endforeach (_FLAG ${CMAKE_CXX_FLAGS})
+  set (CMAKE_CXX_FLAGS "${_FLAGS}")
+endif (CMAKE_CXX_FLAGS)

 # ---------------------------------------------------------------------------
 # Function add_executable (name [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]


[FIXES-#1814] strip binaries when packaging

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -307,6 +307,13 @@
         endif (APPLE)
     endif (SEQAN_STATIC_APPS AND (NOT CMAKE_SYSTEM_NAME MATCHES "Windows"))

+    # strip binaries when packaging
+    if ((CMAKE_BUILD_TYPE STREQUAL "Release") AND
+        (NOT SEQAN_BUILD_SYSTEM STREQUAL "DEVELOP") AND
+        (COMPILER_CLANG OR COMPILER_GCC))
+        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s")
+    endif ()
+
     # search dependencies once, globally, if in DEVELOP
     if (SEQAN_BUILD_SYSTEM STREQUAL "DEVELOP")
         message (STATUS "Scanning dependencies once in DEVELOP mode...")


[INTERNAL] SeqAnSimdUtility: clear flags for SEQAN_SIMD detection (this try-compile does not need -msse4, -mavx2 or -mavx512f flags)

--- util/cmake/SeqAnSimdUtility.cmake
+++ util/cmake/SeqAnSimdUtility.cmake
@@ -399,6 +399,7 @@
         endforeach()

         # test seqan simd
+        set(CMAKE_REQUIRED_FLAGS "")
         check_cxx_source_compiles("${SEQAN_SIMD_SEQANSIMD_SOURCE}" SEQAN_SIMD_SEQANSIMD_SUPPORTED)

         # try-compile known compiler crashes/errors with seqan-simd and exclude them


List out .so files to include in binary

List out .so files to include in binary

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -12,7 +12,20 @@
   USE_SOURCE_PERMISSIONS
   COMPONENT superbuild)

-FILE(GLOB shared_libs "${install_location}/lib/*.so")
+# GLOB is performed at configure time, before the compiled
+# libraries exist.  I'm listing them out manually for now.
+#FILE(GLOB shared_libs "${install_location}/lib/*.so")
+set(shared_libs
+  "${install_location}/lib/libavcodec.so"
+  "${install_location}/lib/libavutil.so"
+  "${install_location}/lib/libavfilter.so"
+  "${install_location}/lib/libavformat.so"
+  "${install_location}/lib/libswscale.so"
+  "${install_location}/lib/libpython2.7.so"
+  "${install_location}/lib/libswresample.so"
+  "${install_location}/lib/libtomvizExtensions.so"
+  "${install_location}/lib/libz.so"
+)

 install(FILES ${shared_libs}
   DESTINATION "lib"
@@ -52,13 +65,6 @@
 	COMPONENT superbuild)
 endif()

-file(GLOB libraries RELATIVE "${install_location}/lib" "*.so")
-foreach(library ${libraries})
-  install(FILES "${install_location}/lib/${library}"
-    DESTINATION "lib"
-    COMPONENT superbuild)
-endforeach()
-
 # install executables
 foreach(executable tomviz)
   install(PROGRAMS "${install_location}/bin/${executable}"


CEGUI: added a missing check for dynamic target existence

--- Deps/CEGUI/cmake/CEGUIMacros.cmake
+++ Deps/CEGUI/cmake/CEGUIMacros.cmake
@@ -138,34 +138,34 @@
     ###########################################################################
     #                    NON-STATIC VERSION OF TARGET
     ###########################################################################
-if (_DYNAMIC_EXISTS)
-    if (${_DEP_NAME}_DEFINITIONS)
-        set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_DEFINITIONS ${${_DEP_NAME}_DEFINITIONS} )
-    endif()
-    if (${_DEP_NAME}_COMPILE_FLAGS)
-        set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_FLAGS ${${_DEP_NAME}_COMPILE_FLAGS} )
-    endif()
-
-    if (CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
-        if (${_DEP_NAME}_DEFINITIONS_STATIC)
-            set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_DEFINITIONS ${${_DEP_NAME}_DEFINITIONS_STATIC} )
-        endif()
-        if (${_DEP_NAME}_COMPILE_FLAGS_STATIC)
-            set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_FLAGS ${${_DEP_NAME}_COMPILE_FLAGS_STATIC} )
-        endif()
-
-        cegui_add_dependency_static_libs(${_TARGET_NAME} ${_DEP_NAME})
-    else()
-        if (${_DEP_NAME}_DEFINITIONS_DYNAMIC)
-            set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_DEFINITIONS ${${_DEP_NAME}_DEFINITIONS_DYNAMIC} )
-        endif()
-        if (${_DEP_NAME}_COMPILE_FLAGS_DYNAMIC)
-            set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_FLAGS ${${_DEP_NAME}_COMPILE_FLAGS_DYNAMIC} )
-        endif()
-
-        cegui_add_dependency_dynamic_libs(${_TARGET_NAME} ${_DEP_NAME})
-    endif()
-endif()
+    if (_DYNAMIC_EXISTS)
+        if (${_DEP_NAME}_DEFINITIONS)
+            set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_DEFINITIONS ${${_DEP_NAME}_DEFINITIONS} )
+        endif()
+        if (${_DEP_NAME}_COMPILE_FLAGS)
+            set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_FLAGS ${${_DEP_NAME}_COMPILE_FLAGS} )
+        endif()
+
+        if (CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES)
+            if (${_DEP_NAME}_DEFINITIONS_STATIC)
+                set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_DEFINITIONS ${${_DEP_NAME}_DEFINITIONS_STATIC} )
+            endif()
+            if (${_DEP_NAME}_COMPILE_FLAGS_STATIC)
+                set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_FLAGS ${${_DEP_NAME}_COMPILE_FLAGS_STATIC} )
+            endif()
+
+            cegui_add_dependency_static_libs(${_TARGET_NAME} ${_DEP_NAME})
+        else()
+            if (${_DEP_NAME}_DEFINITIONS_DYNAMIC)
+                set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_DEFINITIONS ${${_DEP_NAME}_DEFINITIONS_DYNAMIC} )
+            endif()
+            if (${_DEP_NAME}_COMPILE_FLAGS_DYNAMIC)
+                set_property( TARGET ${_TARGET_NAME} APPEND PROPERTY COMPILE_FLAGS ${${_DEP_NAME}_COMPILE_FLAGS_DYNAMIC} )
+            endif()
+
+            cegui_add_dependency_dynamic_libs(${_TARGET_NAME} ${_DEP_NAME})
+        endif()
+    endif()

     ###########################################################################
@@ -397,7 +397,7 @@
         ${CMAKE_SOURCE_DIR}/samples/common/include/SampleBase.h
     )

-	set(CORE_SOURCE_FILES ${CORE_SOURCE_FILES} ${_EXTRA_SOURCE_FILES})
+    set(CORE_SOURCE_FILES ${CORE_SOURCE_FILES} ${_EXTRA_SOURCE_FILES})

     # Each demo will become a dynamically linked library as plugin (module)
     cegui_add_library_impl(${CEGUI_TARGET_NAME} TRUE CORE_SOURCE_FILES CORE_HEADER_FILES FALSE FALSE)
@@ -434,7 +434,7 @@

 endmacro()
 macro (cegui_add_sample _NAME)
-	cegui_add_sample_with_extra_files(${_NAME} "" "")
+    cegui_add_sample_with_extra_files(${_NAME} "" "")
 endmacro()


ENH: Bump TubeTK to v1.1

ENH: Bump TubeTK to v1.1

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -48,5 +48,5 @@
   "http://www.tubetk.org"
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG 8565a00f1a1d19775375748f88b67b46310e7872
+  GIT_TAG v1.1
   )


ENH: Update TubeTK to github/InsightSoftwareConsortium/ITKTubeTK

This version of ITKTubeTK also fully supports internal remote and
external remote builds.

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -48,6 +48,6 @@
  "http://www.tubetk.org
 "
   MODULE_COMPLIANCE_LEVEL 3
-  GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKTubeTK.git
-  GIT_TAG 4b6b3651959f4017fce1dfdfc24c2e169c84ff0b
+  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
+  GIT_TAG e3eb8677e802812c06a4a3fe19f39d3c6756cf59
   )


remove names for licensing

remove names for licensing

--- SuperBuild/External_CCPi-RGL.cmake
+++ SuperBuild/External_CCPi-RGL.cmake
@@ -1,6 +1,4 @@
 #========================================================================
-# Author: Benjamin A Thomas
-# Author: Kris Thielemans
 # Author: Edoardo Pasca
 # Copyright 2017-2018 University College London
 # Copyright 2017-2018 STFC


Fixed bug in auto ctest tests

Fixed bug in auto ctest tests

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -24,6 +24,7 @@
              ${_USE_BOOST}
              "-DCMAKE_INSTALL_PREFIX=${${package}ExternalDir}/install\n"
              "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}\n"
+             "DOWNLOAD_COMMAND echo\n"
              "UPDATE_COMMAND git submodule update --recursive --init ${PROJECT_SOURCE_DIR}/thirdparty/${package}\n"
              "SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/${package}\n"
              "BINARY_DIR ${${package}ExternalDir}/build\n"


[CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compiling

Summary:
When cross-compiling LLDB, we want to use llvm-tblgen built for the
host, not the target.

Reviewers: compnerd, sgraenitz

Subscribers: mgorny, lldb-commits

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

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

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -25,8 +25,31 @@
   set(LLVM_BINARY_DIR ${LLVM_BUILD_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
   set(LLVM_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to llvm-lit")

-  find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
-    NO_DEFAULT_PATH)
+  if(CMAKE_CROSSCOMPILING)
+    set(LLVM_NATIVE_BUILD "${LLDB_PATH_TO_LLVM_BUILD}/NATIVE")
+    if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
+      message(FATAL_ERROR
+        "Attempting to cross-compile LLDB standalone but no native LLVM build
+        found. Please cross-compile LLVM as well.")
+    endif()
+
+    if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+      set(HOST_EXECUTABLE_SUFFIX ".exe")
+    endif()
+
+    if (NOT CMAKE_CONFIGURATION_TYPES)
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    else()
+      # NOTE: LLVM NATIVE build is always built Release, as is specified in
+      # CrossCompile.cmake
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    endif()
+  else()
+    find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
+      NO_DEFAULT_PATH)
+  endif()

   # They are used as destination of target generators.
   set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)


Fix for ROOT-7819 - ctest: diff order unintuitive

--- cmake/modules/RootTestDriver.cmake
+++ cmake/modules/RootTestDriver.cmake
@@ -204,7 +204,7 @@
 endif()

 if(OUTREF)
-  execute_process(COMMAND ${diff_cmd} ${OUT} ${OUTREF} OUTPUT_VARIABLE _outvar ERROR_VARIABLE _outvar RESULT_VARIABLE _rc)
+  execute_process(COMMAND ${diff_cmd} ${OUTREF} ${OUT} OUTPUT_VARIABLE _outvar ERROR_VARIABLE _outvar RESULT_VARIABLE _rc)
   if(_outvar)
     message("-- BEGIN OUTDIFF OUTPUT --")
     message("${_outvar}")
@@ -216,7 +216,7 @@
 endif()

 if(ERRREF)
-  execute_process(COMMAND ${diff_cmd} ${ERR} ${ERRREF} OUTPUT_VARIABLE _outvar ERROR_VARIABLE _outvar RESULT_VARIABLE _rc)
+  execute_process(COMMAND ${diff_cmd} ${ERRREF} ${ERR} OUTPUT_VARIABLE _outvar ERROR_VARIABLE _outvar RESULT_VARIABLE _rc)
   if(_outvar)
     message("-- BEGIN ERRDIFF OUTPUT --")
     message("${_outvar}")


cmake: Drop test results via https.

cmake: Drop test results via https.

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@samba.org>

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

-set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_METHOD "https")
 set(CTEST_DROP_SITE "mock.cryptomilk.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=resolvwrapper")
 set(CTEST_DROP_SITE_CDASH TRUE)


swap 3.2 <-> default CTestConfig.cmake file

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

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


disable sanitization on android for now

disable sanitization on android for now

I will investigate what is wrong later.

--- toolchains/android-studio.toolchain.cmake
+++ toolchains/android-studio.toolchain.cmake
@@ -22,6 +22,13 @@

 if("${ANDROID_TOOLCHAIN}" STREQUAL "clang")
     include( "${CMAKE_CURRENT_LIST_DIR}/clang.cmake" )
+
+    # Implementation note:
+    # This currently breaks with linker errors "undefined reference to '__asan_report_load1', etc.
+    # For now, just disable sanitization on Android. I will investigate this later.
+    #                                        ( 11.08.2016. Nenad Miksa )
+    unset( TNUN_compiler_runtime_sanity_checks )
+    unset( TNUN_linker_runtime_sanity_checks )
 else()
     include( "${CMAKE_CURRENT_LIST_DIR}/gcc.cmake" )
 endif()


Factor time stamp output file.

Factor time stamp output file.

	* build-aux/cmake/modules/ConfigureVersionInfo.cmake: Do that and make
	it a function instead of a macro to enable local variables scope.

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

--- build-aux/cmake/modules/ConfigureVersionInfo.cmake
+++ build-aux/cmake/modules/ConfigureVersionInfo.cmake
@@ -14,29 +14,32 @@

 # Generate version information in 'output' file and add it to the 'sources'
 # list variable.
-macro(CONFIGURE_VERSION_INFO output deps)
+function(CONFIGURE_VERSION_INFO output deps)
+  set(tmpout "${output}.tmp")
   add_custom_command(
-    OUTPUT ${output}.tmp
+    OUTPUT ${tmpout}
     COMMAND ${CMAKE_AUX_DIR}/revision
-    ARGS ${output}.tmp
+    ARGS ${tmpout}
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
     COMMENT "${CMAKE_COMMAND} -E cmake_echo_color "
     "--switch=${CMAKE_MAKEFILE_COLOR} --cyan "
-    "Generating version information time stamp '${output}.tmp'" VERBATIM)
+    "Generating version information time stamp '${tmpout}'"
+    VERBATIM)
   add_custom_command(
     OUTPUT ${output}
     COMMAND ${CMAKE_AUX_DIR}/move-if-change
-    ARGS ${output}.tmp ${output}
-    DEPENDS ${output}.tmp
+    ARGS ${tmpout} ${output}
+    DEPENDS ${tmpout}
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
     COMMENT "${CMAKE_COMMAND} -E cmake_echo_color "
     "--switch=${CMAKE_MAKEFILE_COLOR} --cyan "
-    "Generating version information '${output}'" VERBATIM)
+    "Generating version information '${output}'"
+    VERBATIM)
   set_source_files_properties(${deps}
     PROPERTIES OBJECT_DEPENDS ${output})
   set_directory_properties(PROPERTIES
     ADDITIONAL_MAKE_CLEAN_FILES ${output}
-    ADDITIONAL_MAKE_CLEAN_FILES ${output}.tmp)
-endmacro(CONFIGURE_VERSION_INFO)
+    ADDITIONAL_MAKE_CLEAN_FILES ${tmpout})
+endfunction(CONFIGURE_VERSION_INFO)

 endif(NOT COMMAND CONFIGURE_VERSION_INFO)


Revert "Only link to DirectX 11.3"

Revert "Only link to DirectX 11.3"

This reverts commit af1e1e54c1b165afc305ebdc8bf2840825b801de.

--- CMake/Packages/FindDirectX11.cmake
+++ CMake/Packages/FindDirectX11.cmake
@@ -7,7 +7,7 @@
 if(WIN32) # The only platform it makes sense to check for DirectX11 SDK
     include(FindPkgMacros)
     findpkg_begin(DirectX11)
-
+
     # Windows 10 Universal SDK
     if(MSVC14)
         if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
@@ -15,12 +15,102 @@
         else()
             set(W10SDK_VER 10.0.10240.0)
         endif()
-    else()
-        set(W10SDK_VER 10.0.15063.0)
-    endif()
+        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/10/include/${W10SDK_VER}/um" "C:/Program Files/Windows Kits/10/include/${W10SDK_VER}/um")
+        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/10/lib/${W10SDK_VER}/um/${MSVC_CXX_ARCHITECTURE_ID}/"
+
+    # Windows Phone 8.1 SDK
+    elseif(WINDOWS_PHONE AND MSVC12)
+        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Phone Kits/8.1/include" "C:/Program Files/Windows Phone Kits/8.1/include")
+        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Phone Kits/8.1/lib/${MSVC_CXX_ARCHITECTURE_ID}/"
+
+    # Windows Phone 8.0 SDK
+    elseif(WINDOWS_PHONE AND MSVC11)
+        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Phone Kits/8.0/include" "C:/Program Files/Windows Phone Kits/8.0/include")
+        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Phone Kits/8.0/lib/${MSVC_CXX_ARCHITECTURE_ID}/"
+
+    # Windows 8.1 SDK
+    elseif(MSVC12)
+        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/8.1/include/um" "C:/Program Files/Windows Kits/8.1/include/um")
+        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/8.1/lib/winv6.3/um/${MSVC_CXX_ARCHITECTURE_ID}/"
+
+    # Windows 8.0 SDK
+    elseif(MSVC11)
+        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/8.0/include/um" "C:/Program Files/Windows Kits/8.0/include/um")
+        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/8.0/lib/win8/um/${MSVC_CXX_ARCHITECTURE_ID}/"
+
+    # Legacy Direct X SDK
+    else()
+
+    # Get path, convert backslashes as ${ENV_DXSDK_DIR}
+    getenv_path(DXSDK_DIR)
+    getenv_path(DIRECTX_HOME)
+    getenv_path(DIRECTX_ROOT)
+    getenv_path(DIRECTX_BASE)
+
+    # construct search paths
+    set(DirectX11_PREFIX_PATH
+    "${DXSDK_DIR}" "${ENV_DXSDK_DIR}"
+    "${DIRECTX_HOME}" "${ENV_DIRECTX_HOME}"
+    "${DIRECTX_ROOT}" "${ENV_DIRECTX_ROOT}"
+    "${DIRECTX_BASE}" "${ENV_DIRECTX_BASE}"
+    "C:/apps_x86/Microsoft DirectX SDK*"
+    "C:/Program Files (x86)/Microsoft DirectX SDK*"
+    "C:/apps/Microsoft DirectX SDK*"
+    "C:/Program Files/Microsoft DirectX SDK*"
+    "$ENV{ProgramFiles}/Microsoft DirectX SDK*"
+    )
+
+    create_search_paths(DirectX11)
+    # redo search if prefix path changed
+    clear_if_changed(DirectX11_PREFIX_PATH
+        DirectX11_LIBRARY
+        DirectX11_INCLUDE_DIR
+    )
+
+    # dlls are in DirectX11_ROOT_DIR/Developer Runtime/x64|x86
+    # lib files are in DirectX11_ROOT_DIR/Lib/x64|x86
+    if(CMAKE_CL_64)
+        set(DirectX11_LIBPATH_SUFFIX "x64")
+    else(CMAKE_CL_64)
+        set(DirectX11_LIBPATH_SUFFIX "x86")
+    endif(CMAKE_CL_64)
+
+    # look for D3D11 components
+    find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS ${DirectX11_INC_SEARCH_PATH})
+    find_library(DirectX11_DXERR_LIBRARY NAMES DxErr HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
+    find_library(DirectX11_DXGUID_LIBRARY NAMES dxguid HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
+    find_library(DirectX11_DXGI_LIBRARY NAMES dxgi HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
+    find_library(DirectX11_D3DCOMPILER_LIBRARY NAMES d3dcompiler HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
+    find_library(DirectX11_D3D11_LIBRARY NAMES d3d11 HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
+    find_library(DirectX11_D3DX11_LIBRARY NAMES d3dx11 HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
+
+    if (DirectX11_INCLUDE_DIR AND DirectX11_D3D11_LIBRARY)
+      set(DirectX11_D3D11_LIBRARIES ${DirectX11_D3D11_LIBRARIES}
+        ${DirectX11_D3D11_LIBRARY}
+        ${DirectX11_DXGI_LIBRARY}
+        ${DirectX11_DXGUID_LIBRARY}
+        ${DirectX11_D3DCOMPILER_LIBRARY}
+      )
+    endif ()
+    if (DirectX11_D3DX11_LIBRARY)
+        set(DirectX11_D3D11_LIBRARIES ${DirectX11_D3D11_LIBRARIES} ${DirectX11_D3DX11_LIBRARY})
+    endif ()
+    if (DirectX11_DXERR_LIBRARY)
+        set(DirectX11_D3D11_LIBRARIES ${DirectX11_D3D11_LIBRARIES} ${DirectX11_DXERR_LIBRARY})
+    endif ()
+
+    set(DirectX11_LIBRARY
+        ${DirectX11_D3D11_LIBRARIES}
+    )

-    find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/10/include/${W10SDK_VER}/um" "C:/Program Files/Windows Kits/10/include/${W10SDK_VER}/um")
-    set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/10/lib/${W10SDK_VER}/um/${MSVC_CXX_ARCHITECTURE_ID}/"
+    mark_as_advanced(DirectX11_D3D11_LIBRARY
+                     DirectX11_D3DX11_LIBRARY
+                     DirectX11_DXERR_LIBRARY
+                     DirectX11_DXGUID_LIBRARY
+                     DirectX11_DXGI_LIBRARY
+                     DirectX11_D3DCOMPILER_LIBRARY)
+
+    endif () # Legacy Direct X SDK

     findpkg_finish(DirectX11)


Add possibility to specify link directories

Since CMake 3.13, link directories can be passed target-wise with
target_link_directories(). It allows to write MITK package config
files for dependencies that needed ADDITIONAL_LIBS before. Now
they can be specified with PACKAGE_DEPENDS as well.

--- CMake/mitkFunctionUseModules.cmake
+++ CMake/mitkFunctionUseModules.cmake
@@ -51,6 +51,7 @@
   # multiple inclusions of the file in the parent scope
   include(${pkg_config_file})
   set(ALL_INCLUDE_DIRECTORIES ${ALL_INCLUDE_DIRECTORIES} PARENT_SCOPE)
+  set(ALL_LINK_DIRECTORIES ${ALL_LINK_DIRECTORIES} PARENT_SCOPE)
   set(ALL_LIBRARIES ${ALL_LIBRARIES} PARENT_SCOPE)
   set(ALL_COMPILE_DEFINITIONS ${ALL_COMPILE_DEFINITIONS} PARENT_SCOPE)
   set(ALL_COMPILE_OPTIONS ${ALL_COMPILE_OPTIONS} PARENT_SCOPE)
@@ -120,6 +121,7 @@
     foreach(_package_visibility INTERFACE PUBLIC PRIVATE)
     foreach(_package ${${_package_visibility}_PACKAGE_NAMES})
       set(ALL_INCLUDE_DIRECTORIES)
+      set(ALL_LINK_DIRECTORIES)
       set(ALL_LIBRARIES)
       set(ALL_COMPILE_DEFINITIONS)
       set(ALL_COMPILE_OPTIONS)
@@ -137,6 +139,10 @@
         if(ALL_INCLUDE_DIRECTORIES)
           list(REMOVE_DUPLICATES ALL_INCLUDE_DIRECTORIES)
           target_include_directories(${USE_TARGET} SYSTEM ${_package_visibility} ${ALL_INCLUDE_DIRECTORIES})
+        endif()
+        if(ALL_LINK_DIRECTORIES)
+          list(REMOVE_DUPLICATES ALL_LINK_DIRECTORIES)
+          target_link_directories(${USE_TARGET} ${_package_visibility} ${ALL_LINK_DIRECTORIES})
         endif()
         if(ALL_LIBRARIES)
           # Don't remove "duplicats" because ALL_LIBRARIES may be of the form:


Fix FindImageMagick so it works with Ubuntu 15.04

--- CMakeModules/FindImageMagick.cmake
+++ CMakeModules/FindImageMagick.cmake
@@ -148,7 +148,19 @@
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
     PATH_SUFFIXES
       ImageMagick ImageMagick-6
-    DOC "Path to the ImageMagick include dir."
+    DOC "Path to the ImageMagick arch-independent include dir."
+    )
+  find_path(ImageMagick_${component}_ARCH_INCLUDE_DIR
+    NAMES magick/magick-baseconfig.h
+    HINTS
+      ${PC_${component}_INCLUDEDIR}
+      ${PC_${component}_INCLUDE_DIRS}
+    PATHS
+      ${ImageMagick_INCLUDE_DIRS}
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
+    PATH_SUFFIXES
+      ImageMagick ImageMagick-6
+    DOC "Path to the ImageMagick arch-specific include dir."
     )
   find_library(ImageMagick_${component}_LIBRARY
     NAMES ${ARGN}
@@ -157,12 +169,24 @@
     DOC "Path to the ImageMagick Magick++ library."
     )

+  # old version have only indep dir
   if(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
     set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)

-    list(APPEND ImageMagick_INCLUDE_DIRS
+    # Construct per-component include directories.
+    set(ImageMagick_${component}_INCLUDE_DIRS
       ${ImageMagick_${component}_INCLUDE_DIR}
       )
+    if(ImageMagick_${component}_ARCH_INCLUDE_DIR)
+      list(APPEND ImageMagick_${component}_INCLUDE_DIRS
+        ${ImageMagick_${component}_ARCH_INCLUDE_DIR})
+    endif()
+    list(REMOVE_DUPLICATES ImageMagick_${component}_INCLUDE_DIRS)
+    set(ImageMagick_${component}_INCLUDE_DIRS
+      ${ImageMagick_${component}_INCLUDE_DIRS} PARENT_SCOPE)
+
+    # Add the per-component include directories to the full include dirs.
+    list(APPEND ImageMagick_INCLUDE_DIRS ${ImageMagick_${component}_INCLUDE_DIRS})
     list(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
     set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)


COMP: Prevent "You are in 'detached HEAD' state." git warning.

ExternalProject parameter GIT_CONFIG was introduced in CMake 3.8

See https://cmake.org/cmake/help/v3.8/module/ExternalProject.html

--- CMake/niral_utilitiesExternalProject.cmake
+++ CMake/niral_utilitiesExternalProject.cmake
@@ -44,9 +44,16 @@
       )
   endif()

+  # Disable the "You are in 'detached HEAD' state." warning.
+  set(git_config_arg)
+  if(CMAKE_VERSION VERSION_GREATER "3.7.2")
+    set(git_config_arg GIT_CONFIG "advice.detachedHead=false")
+  endif()
+
   ExternalProject_Add(${projectname}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
+    ${git_config_arg}
     SOURCE_DIR ${proj}
     BINARY_DIR ${proj}-build
     CMAKE_GENERATOR ${gen}


COMP: Bump DCMTK to fix warning.

COMP: Bump DCMTK to fix warning.

The previous CMake related patch not integrated upstream was rebased on the
upstream DCMTK-3.6.1_20131114 tag, d60870a5b9bbb9792f63d9c929358446f50f1b88.
Upstream has fixed a warning in CMake/3rdparty.cmake:9:70:

CMake Warning (dev) at CMake/dcmtkPrepare.cmake:288 (INCLUDE):
Syntax Warning in cmake code at

   CMake/3rdparty.cmake:9:70

Argument not separated from preceding token by whitespace.

Co-authored by Brian Helba <brian.helba@kitware.com>

Change-Id: Ie21356974bbf58c9bac5421789bfbdee7427be80

--- Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake
+++ Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake
@@ -1,9 +1,7 @@
 # Set GIT tag here for use in multiple CMakeLists.txt
 #
-# DCMTK tag brought up to 2013-01-11 to get incorporated
-# compiler fixes and bug fixes
 set(DCMTK_GIT_REPOSITORY "http://github.com/InsightSoftwareConsortium/DCMTK.git")
-# this is a specific tag.  It corresponds to the symbolic tag
-# 20130129_DCMTK_PATCHES_FOR_ITK which incorporates changes needed to build and deploy
+# This is a specific tag.  It corresponds to the symbolic tag
+# 20131114_DCMTK_PATCHES_FOR_ITK which incorporates changes needed to build and deploy
 # with ITK
-set(DCMTK_GIT_TAG "257e800c42f40ff3207a9242fa225c850c56dd07")
+set(DCMTK_GIT_TAG "840cf5f158ca837ec398df3d6287ae953ff3bfce")