CMake: Remove own FindLibXml2

CMake: Remove own FindLibXml2

Summary: The upstream (bundled with CMake) one is just fine.

Reviewers: #kde_telepathy, davidedmundson, apol, heikobecker

Reviewed By: apol, heikobecker

Tags: #kde_telepathy

Differential Revision: https://phabricator.kde.org/D24067

--- cmake/modules/FindLibXml2.cmake
+++ cmake/modules/FindLibXml2.cmake
@@ -1,57 +0,0 @@
-# - Try to find LibXml2
-# Once done this will define
-#
-#  LIBXML2_FOUND - System has LibXml2
-#  LIBXML2_INCLUDE_DIR - The LibXml2 include directory
-#  LIBXML2_LIBRARIES - The libraries needed to use LibXml2
-#  LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
-#  LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
-   # in cache already
-   SET(LibXml2_FIND_QUIETLY TRUE)
-ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
-
-IF (NOT WIN32)
-   # use pkg-config to get the directories and then use these values
-   # in the FIND_PATH() and FIND_LIBRARY() calls
-   FIND_PACKAGE(PkgConfig)
-   PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
-   SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
-ENDIF (NOT WIN32)
-
-FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
-   HINTS
-   ${PC_LIBXML_INCLUDEDIR}
-   ${PC_LIBXML_INCLUDE_DIRS}
-   PATH_SUFFIXES libxml2
-   )
-
-FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
-   HINTS
-   ${PC_LIBXML_LIBDIR}
-   ${PC_LIBXML_LIBRARY_DIRS}
-   )
-
-FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
-# for backwards compat. with KDE 4.0.x:
-SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
-
-IF( NOT LIBXML2_XMLLINT_EXECUTABLE )
-   MESSAGE(STATUS "xmllint program not found. Install it if you want validate generated doc file.")
-ENDIF(NOT LIBXML2_XMLLINT_EXECUTABLE )
-
-
-INCLUDE(FindPackageHandleStandardArgs)
-
-# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
-# all listed variables are TRUE
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-
-MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)


Update CMake library dependencies.

Update CMake library dependencies.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -34,7 +34,7 @@
 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo)
-set(MSVC_LIB_DEPS_LLVMMCJIT LLVMExecutionEngine LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMCJIT LLVMCore LLVMExecutionEngine LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMTarget)


If specified EXTERNAL jar is a symlink, install the target of the symlink.

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -516,7 +516,11 @@
       # Put absolute path into classpath file
       FILE (APPEND "${_CP_FILE}" "${_jar_file}\n")
     ELSE (JAR_EXTERNAL AND NOT ZORBA_PACKAGE_EXTERNAL_JARS)
-      # Copy jar to jars/ directory and add relative path to classpath file
+      # Copy real jar (after following any symlinks) to jars/ directory
+      # and add relative path to classpath file
+      IF (IS_SYMLINK "${_jar_file}")
+	GET_FILENAME_COMPONENT (_jar_file "${_jar_file}" REALPATH)
+      ENDIF (IS_SYMLINK "${_jar_file}")
       GET_FILENAME_COMPONENT (_output_filename "${_jar_file}" NAME)
       ADD_COPY_RULE ("LIB" "${_jar_file}" "jars/${_output_filename}" ""
 	"${JAR_TARGET}" 1 "${JAR_TEST_ONLY}")


updated cdash config

updated cdash config

--- tests/CTestConfig.cmake
+++ tests/CTestConfig.cmake
@@ -4,7 +4,7 @@
 ## # The following are required to uses Dart and the Cdash dashboard
 ##   ENABLE_TESTING()
 ##   INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "ViennaMOS")
+set(CTEST_PROJECT_NAME "ViennaMaterials")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

 set(CTEST_DROP_METHOD "http")


cmake: mark recently added python files as gyb dependencies.

--- cmake/modules/SwiftHandleGybSources.cmake
+++ cmake/modules/SwiftHandleGybSources.cmake
@@ -130,7 +130,10 @@
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/PatternNodes.py"
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/StmtNodes.py"
       "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/TypeNodes.py"
-      "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Token.py")
+      "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Token.py"
+      "${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Traits.py"
+      "${SWIFT_SOURCE_DIR}/utils/gyb_sourcekit_support/__init__.py"
+      "${SWIFT_SOURCE_DIR}/utils/gyb_sourcekit_support/UIDs.py")

   foreach (src ${${sources_var_name}})
     string(REGEX REPLACE "[.]gyb$" "" src_sans_gyb "${src}")


PKG: special ldflags needed for proj4 executables

--- SuperBuild/CMake/External_proj.cmake
+++ SuperBuild/CMake/External_proj.cmake
@@ -17,6 +17,12 @@
     )

 else()
+
+  if(APPLE)
+    set(PROJ_SB_ENV_CONFIGURE_CMD ${SB_ENV_CONFIGURE_CMD} LDFLAGS=-headerpad_max_install_names)
+  else()
+    set(PROJ_SB_ENV_CONFIGURE_CMD ${SB_ENV_CONFIGURE_CMD})
+  endif()

   ExternalProject_Add(PROJ
     PREFIX PROJ


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

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


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

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


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   25)
+SET(KWSYS_DATE_STAMP_DAY   26)


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   28)
+SET(KWSYS_DATE_STAMP_DAY   29)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2011)

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

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


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

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


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


Split off 3.10.8

Split off 3.10.8

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 3 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 8 )
-set ( HPCC_MATURITY "rc" )
+set ( HPCC_POINT 9 )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


Split off 8.4.30

Split off 8.4.30

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 29 )
+set ( HPCC_POINT 31 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.10.46

Split off 7.10.46

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 45 )
+set ( HPCC_POINT 47 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Remove RegistrationOntology module

Remove RegistrationOntology module

Module can not be built. MatchPoint needs to be updated to include
Ontologies.

--- Modules/ModuleList.cmake
+++ Modules/ModuleList.cmake
@@ -53,7 +53,6 @@
   US
   USUI
   DicomUI
-  RegistrationOntology
   Remeshing
   Python
   QtPython


Update internals to be consistent with new libffi name of build
configuration.

svn path=/trunk/; revision=12435

--- cmake/build_projects/libffi/bp.cmake
+++ cmake/build_projects/libffi/bp.cmake
@@ -1,6 +1,6 @@
-# ffi/bp.cmake
+# libffi/bp.cmake
 # This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build of ffi.
+# CMakeLists.txt file to configure the build of libffi.

 # Copyright (C) 2013 Alan W. Irwin

@@ -24,7 +24,7 @@
 # used below that configure how the External_Project functions
 # operate.

-set(BP_PACKAGE ffi)
+set(BP_PACKAGE libffi)

 # Protect against configuring a build twice in one CMake call
 if(${BP_PACKAGE}_configured)


Don't try to use pkgconfig on win32

Don't try to use pkgconfig on win32

svn path=/trunk/kdesupport/qca/; revision=693855

--- cmake/modules/FindPkcs11Helper.cmake
+++ cmake/modules/FindPkcs11Helper.cmake
@@ -20,15 +20,16 @@
   SET(PKCS11H_FOUND TRUE)

 else (PKCS11H_INCLUDE_DIRS AND PKCS11H_LIBRARIES)
+  if(NOT WIN32)
+    INCLUDE(UsePkgConfig)

-  INCLUDE(UsePkgConfig)
+    PKGCONFIG(libpkcs11-helper-1 _PKCS11HIncDir _PKCS11HLinkDir _PKCS11HLinkFlags _PKCS11HCflags)

-  PKGCONFIG(libpkcs11-helper-1 _PKCS11HIncDir _PKCS11HLinkDir _PKCS11HLinkFlags _PKCS11HCflags)
+    set(PKCS11H_DEFINITIONS ${_PKCS11HCflags})
+    set(PKCS11H_INCLUDE_DIRS ${_PKCS11HIncDir})
+    set(PKCS11H_LIBRARIES ${_PKCS11HLinkFlags})
+  endif(NOT WIN32)

-  set(PKCS11H_DEFINITIONS ${_PKCS11HCflags})
-  set(PKCS11H_INCLUDE_DIRS ${_PKCS11HIncDir})
-  set(PKCS11H_LIBRARIES ${_PKCS11HLinkFlags})
-
   if (PKCS11H_INCLUDE_DIRS AND PKCS11H_LIBRARIES)
      set(PKCS11H_FOUND TRUE)
   endif (PKCS11H_INCLUDE_DIRS AND PKCS11H_LIBRARIES)


SuperBuild: CMAKE_MAKE_PROGRAM break make -jN

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -91,8 +91,8 @@
     ${GDAL_SB_CONFIG}
     ${GDAL_SB_EXTRA_OPTIONS}
     )
-  set(GDAL_BUILD_COMMAND ${CMAKE_MAKE_PROGRAM})
-  set(GDAL_INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install)
+  #set(GDAL_BUILD_COMMAND ${CMAKE_MAKE_PROGRAM})
+  #set(GDAL_INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install)

 else(MSVC)


Update superbuild version of Swig to 3.0.12

--- SuperBuild/CMake/External_swig.cmake
+++ SuperBuild/CMake/External_swig.cmake
@@ -33,8 +33,8 @@
   # Use pre-built swig executable (no linking is required, no install done)
   ExternalProject_Add(SWIG
     PREFIX SWIG
-    URL "http://downloads.sourceforge.net/project/swig/swigwin/swigwin-3.0.7/swigwin-3.0.7.zip"
-    URL_MD5 d8b5a9ce49c819cc1bfc1e797b85ba7a
+    URL "http://downloads.sourceforge.net/project/swig/swigwin/swigwin-3.0.12/swigwin-3.0.12.zip"
+    URL_MD5 a49524dad2c91ae1920974e7062bfc93
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
     CONFIGURE_COMMAND ""
@@ -52,8 +52,8 @@

   ExternalProject_Add(SWIG
     PREFIX SWIG
-    URL "http://downloads.sourceforge.net/project/swig/swig/swig-3.0.7/swig-3.0.7.tar.gz"
-    URL_MD5 7fff46c84b8c630ede5b0f0827e3d90a
+    URL "http://downloads.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz"
+    URL_MD5 82133dfa7bba75ff9ad98a7046be687c
     BINARY_DIR ${SWIG_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


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


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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   02)
+SET(KWSYS_DATE_STAMP_DAY   03)


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


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   13)
+SET(KWSYS_DATE_STAMP_DAY   14)


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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

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


Nicer output

Nicer output

--- make/TSPCMakeTools.cmake
+++ make/TSPCMakeTools.cmake
@@ -19,7 +19,7 @@
 ENDMACRO(TSP_XINCLUDE)

 MACRO(TSP_CONFIGURE_FILE_AUTOTOOLS_COMPAT)
-  SET(configure_input "DO NOT EDIT file was generated by CMake using -${ARGV0}- file.")
+  SET(configure_input "${ARGV1} generated from ${ARGV0} by CMake.")
   CONFIGURE_FILE(${ARGV})
 ENDMACRO(TSP_CONFIGURE_FILE_AUTOTOOLS_COMPAT)


i#975 static DR: Windows static client support

Prevents the linker from discarding a static client when using
dynamorio_static by requesting the dr_client_main symbol.

Review-URL: https://codereview.appspot.com/305590043

--- make/utils_exposed.cmake
+++ make/utils_exposed.cmake
@@ -179,6 +179,14 @@
     # ensures we have the right CMake dependencies.
     target_link_libraries(${target} -Wl,--whole-archive ${lib} -Wl,--no-whole-archive)
   else ()
+    # There is no equivalent for MSVC.  The best we can do is keep a client in place,
+    # for our caller in use_DynamoRIO_static_client().
     target_link_libraries(${target} ${lib})
+    if (X64)
+      set(incname "dr_client_main")
+    else ()
+      set(incname "_dr_client_main")
+    endif ()
+    append_property_string(TARGET ${target} LINK_FLAGS "/include:${incname}")
   endif ()
 endfunction(DynamoRIO_force_static_link)


Turned off Boost "pragma lib" directives on windows

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -16,6 +16,13 @@
 SET(Boost_USE_STATIC_LIBS OFF)
 SET(Boost_USE_MULTITHREADED ON)
 SET(Boost_USE_STATIC_RUNTIME OFF)
+# Boost settings
+set(Boost_NO_BOOST_CMAKE ON CACHE BOOL "Enable fix for FindBoost.cmake" )
+add_definitions(-DBOOST_ALL_NO_LIB) # Don't use 'pragma lib' on Windows
+add_definitions(-DBoost_NO_BOOST_CMAKE) # Fix for CMake problem in FindBoost
+if(NOT Boost_USE_STATIC_LIBS)
+add_definitions(-DBOOST_TEST_DYN_LINK) # generates main() for unit tests
+endif()
 FIND_PACKAGE(Boost COMPONENTS thread system)
 IF(Boost_FOUND)
   SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DUSE_BOOST_THREADS=1)
@@ -105,6 +112,7 @@

 IF(WIN32)
   SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DNOMINMAX -DGLUI_NO_LIB_PRAGMA)
+  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} Ws2_32.lib Winmm.lib)
 ENDIF(WIN32)

 SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS}


Using PROJECT_INCLUDE_NAME for header directory and auto single header.

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -9,6 +9,8 @@
 # * NAME_PUBLIC_HEADERS for public, installed header files
 # * NAME_LINK_LIBRARIES for dependencies of name
 # * NAME_LIBRARY_TYPE for setting shared or static library
+# * PROJECT_INCLUDE_NAME or lower case input Name for the include directory
+#   and single include header.
 # * VERSION for the API version
 # * VERSION_ABI for the ABI version
 #
@@ -20,13 +22,15 @@

 function(COMMON_LIBRARY Name)
   string(TOUPPER ${Name} NAME)
-  string(TOLOWER ${Name} name)
+  if(NOT PROJECT_INCLUDE_NAME)
+    string(TOLOWER ${Name} PROJECT_INCLUDE_NAME)
+  endif()
   set(SOURCES ${${NAME}_SOURCES})
   set(HEADERS ${${NAME}_HEADERS})
   set(PUBLIC_HEADERS ${${NAME}_PUBLIC_HEADERS})
   set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES})

-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}.in.h
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h
     "// generated by CommonLibrary.cmake, do not edit\n"
     "#ifndef ${NAME}_H\n"
     "#define ${NAME}_H\n")
@@ -37,14 +41,14 @@
     if(NOT PUBLIC_HEADER MATCHES "defines.+\\.h" AND
         PUBLIC_HEADER MATCHES ".*\\.h$" )

-      file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${name}.in.h
-        "#include <${name}/${PUBLIC_HEADER}>\n")
+      file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h
+        "#include <${PROJECT_INCLUDE_NAME}/${PUBLIC_HEADER}>\n")
     endif()
   endforeach()
-  file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${name}.in.h "#endif\n")
+  file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h "#endif\n")
   set(PROJECT_INCLUDE_HEADER ${CMAKE_BINARY_DIR}/include/${PROJECT_INCLUDE_NAME}/${PROJECT_INCLUDE_NAME}.h)

-  configure_file(${CMAKE_CURRENT_BINARY_DIR}/${name}.in.h
+  configure_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h
     ${PROJECT_INCLUDE_HEADER} COPYONLY)
   list(APPEND PUBLIC_HEADERS ${PROJECT_INCLUDE_HEADER})

@@ -56,7 +60,8 @@
   endif()
   list(SORT PUBLIC_HEADERS)

-  source_group(${name} FILES ${SOURCES} ${HEADERS} ${PUBLIC_HEADERS})
+  source_group(
+    ${PROJECT_INCLUDE_NAME} FILES ${SOURCES} ${HEADERS} ${PUBLIC_HEADERS})
   if (NOT ${NAME}_LIBRARY_TYPE)
     set(${NAME}_LIBRARY_TYPE SHARED)
   endif()
@@ -77,5 +82,6 @@
   endif()

   # install(TARGETS ... PUBLIC_HEADER ...) flattens directories
-  install_files(include/${name} FILES ${PUBLIC_HEADERS} COMPONENT dev)
+  install_files(include/${PROJECT_INCLUDE_NAME}
+    FILES ${PUBLIC_HEADERS} COMPONENT dev)
 endfunction()


Explicitly support Mac OS X 10.6 (Snow Leopard) and later. #3243

On the Mac, MACOSX_DEPLOYMENT_TARGET to say that the binaries should be
able to run on 10.6.x (Snow Leopard) and beyond. Otherwise, binaries
built on 10.8.x (Mountain Lion) won't run on older series.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -22,6 +22,9 @@
   if(${TEST_VER} MATCHES "10.[678]" AND ${SYS_ARCH} MATCHES "I386")
 	set (SYS_ARCH "X86_64")
   endif()
+
+  # Support Mac OS X 10.6 and above
+  set( ENV{MACOSX_DEPLOYMENT_TARGET} 10.6 )
 elseif(${OS_NAME} MATCHES "WIN")
 	cmake_minimum_required(VERSION 2.8.3)
 	set(WINDOWS ON)


CDRIVER-2249 don't set maintainer flags with MSVC

MSVC accepts "-Wall" but it results in thousands of spurious warnings.
It doesn't accept any other GCC-style flags like "-Wformat", so CMake
wastes time checking them all. To solve both problems, just skip the
maintainer flags configuration with MSVC.

--- build/cmake/MaintainerFlags.cmake
+++ build/cmake/MaintainerFlags.cmake
@@ -1,4 +1,4 @@
-if (ENABLE_MAINTAINER_FLAGS)
+if (ENABLE_MAINTAINER_FLAGS AND NOT MSVC)
    include(CheckCCompilerFlag)

    message(STATUS "Detecting available maintainer flags")


Bump the ParaView to the latest master

Bump the ParaView to the latest master

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "281c288ebeccd6589770addbcb57973a81b4764f")
+  set(_paraview_revision "69834674ac6a042994d696e47247155807f25025")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


- Add Ws2_32 to Windows linking flags, for gethostname() and etc.

--- cmake/Find/FindStandardLibs.cmake
+++ cmake/Find/FindStandardLibs.cmake
@@ -94,6 +94,7 @@
          oleaut32
          shell32
          version
+         Ws2_32
           )
 endif()


Find ANTLR: Reformat file with `cmake-format`

--- cmake/Modules/FindANTLR4Cpp.cmake
+++ cmake/Modules/FindANTLR4Cpp.cmake
@@ -1,14 +1,15 @@
 # Try to find the C++ runtime of ANTLR
 # ====================================

+# ~~~
 # Once done this will define
 #
 #  ANTLR4CPP_FOUND		Tells us if the script was able to find the C++ runtime of ANTLR
 #  ANTLR4CPP_INCLUDE_DIRS	The ANTLR C++ runtime include directories
 #  ANTLR4CPP_LIBRARIES		The libraries needed to use the ANTLR C++ runtime
 #
-# This script is a modified version of the code available here:
-#	https://cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules
+# This script is a modified version of the code available here: https://cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules
+# ~~~

 find_path (ANTLR4CPP_INCLUDE_DIR NAMES antlr4-runtime.h PATH_SUFFIXES antlr4-runtime)
 find_library (ANTLR4CPP_LIBRARY NAMES antlr4-runtime)


Add new folders to core_folders for modules.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -245,7 +245,7 @@
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  rheaderfiles "${headerfiles}")
   # Replace the non-standard folder layout of Core.
   if (ARG_STAGE1 AND ARG_MODULE STREQUAL "Core")
-    set(core_folders "base|clib|cont|doc|lzma|macosx|meta|metautils|multiproc|newdelete|pcre|rint|textinput|thread|unix|utils|winnt|zip")
+    set(core_folders "base|clib|clingutils|cont|dictgen|doc|foundation|lzma|macosx|meta|metacling|multiproc|newdelete|pcre|rint|rootcling_stage1|textinput|thread|unix|utils|winnt|zip")
     string(REGEX REPLACE "${CMAKE_SOURCE_DIR}/core/(${core_folders})/inc/" ""  rheaderfiles "${rheaderfiles}")
   endif()


Remove deleted folders from core_folders for modules.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -245,7 +245,7 @@
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  rheaderfiles "${headerfiles}")
   # Replace the non-standard folder layout of Core.
   if (ARG_STAGE1 AND ARG_MODULE STREQUAL "Core")
-    set(core_folders "base|clib|clingutils|cont|dictgen|doc|foundation|lzma|macosx|meta|metacling|multiproc|newdelete|pcre|rint|rootcling_stage1|textinput|thread|unix|utils|winnt|zip")
+    set(core_folders "base|clib|clingutils|cont|dictgen|doc|foundation|lzma|macosx|meta|metacling|multiproc|newdelete|pcre|rint|rootcling_stage1|textinput|thread|unix|winnt|zip")
     string(REGEX REPLACE "${CMAKE_SOURCE_DIR}/core/(${core_folders})/inc/" ""  rheaderfiles "${rheaderfiles}")
   endif()


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/gloox/hunter.cmake
+++ cmake/projects/gloox/hunter.cmake
@@ -39,7 +39,7 @@
     0170053e76b86ab10cbae4253221fd51d8f32f59
 )

-hunter_pick_scheme(DEFAULT url_sha1_autotools)
+hunter_pick_scheme(DEFAULT url_sha1_cmake)

 hunter_cmake_args(
     gloox


Updated heaplimit for vs

Updated heaplimit for vs

--- cmake/AscConfigs.cmake
+++ cmake/AscConfigs.cmake
@@ -13,4 +13,4 @@
 set(BUILD_EXTRAS FALSE CACHE BOOL "Build AscEmu extra.")

 #Compiler heap limit.
-set(VISUALSTUDIO_COMPILERHEAPLIMIT 400 CACHE STRING "Visual Studio compiler heap limit. Ignore on darwin and unix platforms.")
+set(VISUALSTUDIO_COMPILERHEAPLIMIT 460 CACHE STRING "Visual Studio compiler heap limit. Ignore on darwin and unix platforms.")


VS2008 dev+

VS2008 dev+

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -17,7 +17,6 @@
   -DWIN32:BOOL=${WIN32}
   -DTARGET_TEST_SYSTEM:STRING=${TARGET_TEST_SYSTEM}
   -DTARGET_TEST_CMAKE_COMMAND:STRING=${TARGET_TEST_SYSTEM_COMMAND}
-  -DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=${FIXME_CMAKE_ABSOLUTE}
   )

 #
@@ -34,7 +33,10 @@
   -DPCRE2_SUPPORT_JIT=Y
   -DPCRE2_BUILD_TESTS=N)
 IF (MSVC)
-  LIST (APPEND _PCRE2_CMAKE_ARGS "-DPCRE_STATIC_RUNTIME=1")
+  LIST (APPEND _PCRE2_CMAKE_ARGS "-DPCRE2_STATIC_RUNTIME=1")
+ENDIF ()
+IF (FIXME_CMAKE_ABSOLUTE)
+  LIST (APPEND _PCRE2_CMAKE_ARGS "-DCMAKE_PROJECT_INCLUDE=${FIXME_CMAKE_ABSOLUTE}")
 ENDIF ()
 #
 # We force the install command with DESTDIR= in any case, so that it always remains local


Add a generated CBSE header in sources list

--- cmake/DaemonCBSE.cmake
+++ cmake/DaemonCBSE.cmake
@@ -50,7 +50,8 @@
     endif()
     set(GENERATED_CBSE ${output}/backend/CBSEBackend.cpp
                        ${output}/backend/CBSEBackend.h
-                       ${output}/backend/CBSEComponents.h)
+                       ${output}/backend/CBSEComponents.h
+                       ${output}/backend/CBSEEntities.h)
     add_custom_command(
         OUTPUT ${GENERATED_CBSE}
         COMMENT "Generating CBSE entities for ${definition}"


Add missing cython3 detection

Add missing cython3 detection

Forgot to add cython3 detection if PYTHONINTERP_FOUND

--- cmake/FindCython.cmake
+++ cmake/FindCython.cmake
@@ -28,7 +28,7 @@
 if( PYTHONINTERP_FOUND )
   get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
   find_program( CYTHON_EXECUTABLE
-    NAMES cython cython.bat
+    NAMES cython cython.bat cython3
     HINTS ${_python_path}
     )
 else()


dont use flat_namespace as it is evil

dont use flat_namespace as it is evil

--- cmake/FindPython.cmake
+++ cmake/FindPython.cmake
@@ -109,10 +109,9 @@
         # on Mac, we need to use the "-bundle" gcc flag, which is what MODULE
         # does:
         add_library(${name} MODULE ${ARGN})
-        # and "-flat_namespace -undefined suppress" link flags, that we need
-        # to add by hand:
+        # and "-undefined dynamic_lookup" link flags, that we need to add by hand:
         set_property(TARGET ${name} APPEND_STRING PROPERTY
-            LINK_FLAGS " -flat_namespace -undefined suppress -Wl,-exported_symbol,_PyInit_${name}")
+            LINK_FLAGS " -undefined dynamic_lookup -Wl,-exported_symbol,_PyInit_${name}")
     ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
         # on Linux, we need to use the "-shared" gcc flag, which is what SHARED
         # does:


Fix indent width

Fix indent width

--- cmake/clang-tidy.cmake
+++ cmake/clang-tidy.cmake
@@ -1,24 +1,24 @@
 # clang-tidy
 option(ENABLE_CLANG_TIDY "Enable clang-tidy rules" ON)
 if(ENABLE_CLANG_TIDY)
-  find_program(CLANG_TIDY "clang-tidy")
-  if(NOT CLANG_TIDY)
-    message(SEND_ERROR "clang-tidy not found.")
-  else()
-    message(STATUS "Configuring clang-tidy")
+    find_program(CLANG_TIDY "clang-tidy")
+    if(NOT CLANG_TIDY)
+        message(SEND_ERROR "clang-tidy not found.")
+    else()
+        message(STATUS "Configuring clang-tidy")

-    # Let cmake generate compile_commands.json
-    set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+        # Let cmake generate compile_commands.json
+        set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

-    file(GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_BINARY_DIR} *.cc)
+        file(GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_BINARY_DIR} *.cc)

-    add_custom_target(
-      clang-tidy
-      COMMAND ${CLANG_TIDY} ${SOURCE_FILES}
-      )
-    add_custom_target(
-      clang-tidy-fix
-      COMMAND ${CLANG_TIDY} -fix ${SOURCE_FILES}
-      )
-  endif()
+        add_custom_target(
+            clang-tidy
+            COMMAND ${CLANG_TIDY} ${SOURCE_FILES}
+            )
+        add_custom_target(
+            clang-tidy-fix
+            COMMAND ${CLANG_TIDY} -fix ${SOURCE_FILES}
+            )
+    endif()
 endif()


Fix include paths of third party modules

--- cmake/thirdparty.cmake
+++ cmake/thirdparty.cmake
@@ -111,6 +111,8 @@
     generate_external_project(${NAME} ${NO_CONFIG} ${NO_BUILD} "${externalProjectArgs}")

     ExternalProject_Get_Property(${external} source_dir binary_dir)
+    set_target_properties(${external} PROPERTIES EXCLUDE_FROM_ALL TRUE)
+
     string(REGEX REPLACE "-" "_" FORMATTED_NAME "${NAME}")
     string(TOUPPER "${FORMATTED_NAME}" FORMATTED_NAME)

@@ -129,8 +131,6 @@
         add_dependencies(${NAME}-rename-sources ${external})
     else()
         add_dependencies(${NAME} ${external})
-        message("REPODIR: ${repodir}")
-        message("DOWNLOADDIR: ${downloaddir}")
     endif()

     set(includedirs)
@@ -181,7 +181,7 @@
             set(external ${COMPONENT_THIRD_PARTY}-external-project)
             set(rename ${COMPONENT_THIRD_PARTY}-rename-sources)
             ExternalProject_Get_Property(${external} source_dir binary_dir)
-            set(repodir "${CMAKE_CURRENT_BINARY_DIR}/THIRDPARTY/${COMPONENT_THIRD_PARTY}/src/${COMPONENT_THIRD_PARTY}")
+            set(repodir "${CMAKE_BINARY_DIR}/THIRDPARTY/${COMPONENT_THIRD_PARTY}/src/${COMPONENT_THIRD_PARTY}")
         endif()
     endif()
     if(NOT COMPONENT_BINARY)


also match backticks and whatever other kind of quotes

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -4,7 +4,7 @@
    "call to .*Vc::Warnings::_operator_bracket_warning.* declared with attribute warning"
    "warning is a GCC extension"
    "^-- "  # Ignore output from cmake
-   "suggest parentheses around '\\&\\&' within '\\|\\|'" # GCC 4.4 gives bogus warnings
+   "suggest parentheses around .+&&.+ within .+\\|\\|.+" # GCC 4.4 gives bogus warnings
    "^\\*\\*\\* WARNING non-zero return value in ctest from: make") # Ignore output from ctest

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}


Use dependencies got from generated cmake

Change-Id: I42ef85468d3d8688a51703b73278da7d5148fde2

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -297,15 +297,13 @@
   )

   target_link_libraries (${VALUE_CODE_IMPLEMENTATION_LIB}interface
-    ${JSONRPC_LIBRARIES}
-    ${SIGCPP_LIBRARIES}
+    ${DEPENDENCIES_LIBRARIES}
     ${PARAM_INTERFACE_LIB_EXTRA_LIBRARIES}
   )

   set_property (TARGET ${VALUE_CODE_IMPLEMENTATION_LIB}interface
     PROPERTY INCLUDE_DIRECTORIES
-      ${JSONRPC_INCLUDE_DIRS}
-      ${SIGCPP_INCLUDE_DIRS}
+      ${DEPENDENCIES_INCLUDE_DIRS}
       ${PARAM_INTERFACE_LIB_EXTRA_INCLUDE_DIRS}
   )

@@ -421,10 +419,7 @@
   )

   target_link_libraries (${VALUE_CODE_IMPLEMENTATION_LIB}impl
-    ${GLIBMM_LIBRARIES}
-    ${JSONRPC_LIBRARIES}
-    ${SIGCPP_LIBRARIES}
-    ${GSTREAMER_LIBRARIES}
+    ${DEPENDENCIES_LIBRARIES}
     ${PARAM_SERVER_IMPL_LIB_EXTRA_LIBRARIES}
     ${VALUE_CODE_IMPLEMENTATION_LIB}interface
   )
@@ -460,10 +455,7 @@

   set_property (TARGET ${VALUE_CODE_IMPLEMENTATION_LIB}impl
     PROPERTY INCLUDE_DIRECTORIES
-      ${GLIBMM_INCLUDE_DIRS}
-      ${JSONRPC_INCLUDE_DIRS}
-      ${SIGCPP_INCLUDE_DIRS}
-      ${GSTREAMER_INCLUDE_DIRS}
+      ${DEPENDENCIES_INCLUDE_DIRS}
       ${PARAM_SERVER_IMPL_LIB_EXTRA_INCLUDE_DIRS}
       ${SERVER_GEN_FILES_DIR}
       ${CMAKE_CURRENT_BINARY_DIR}/interface/generated-cpp
@@ -488,13 +480,10 @@

   set_property (TARGET ${VALUE_CODE_IMPLEMENTATION_LIB}module
     PROPERTY INCLUDE_DIRECTORIES
-      ${JSONRPC_INCLUDE_DIRS}
-      ${SIGCPP_INCLUDE_DIRS}
+      ${DEPENDENCIES_INCLUDE_DIRS}
       ${CMAKE_CURRENT_SOURCE_DIR}/implementation
       ${SERVER_GEN_FILES_DIR}
       ${CMAKE_CURRENT_BINARY_DIR}/interface/generated-cpp
-      ${GSTREAMER_INCLUDE_DIRS}
-      ${GLIBMM_INCLUDE_DIRS}
   )

   install(


Default disable optional dependencies

Default disable optional dependencies

Explicit is better than implicit. Turn off optional dependencies by
default. The one compiling the code should enable options manually.

--- CMake_build_options.cmake
+++ CMake_build_options.cmake
@@ -18,12 +18,7 @@

 #####################3
 ## CUDA related options
-find_package(CUDA QUIET)
-if (CUDA_FOUND)
-option(ENABLE_CUDA "Enable the compilation of the CUDA GPU code" on)
-else (CUDA_FOUND)
 option(ENABLE_CUDA "Enable the compilation of the CUDA GPU code" off)
-endif (CUDA_FOUND)

 if (ENABLE_CUDA)
     option(ENABLE_NVTOOLS "Enable NVTools profiler integration" off)
@@ -31,12 +26,7 @@

 ############################
 ## MPI related options
-find_package(MPI)
-if (MPI_FOUND OR MPI_C_FOUND OR MPI_CXX_FOUND)
-option(ENABLE_MPI "Enable the compilation of the MPI communication code" on)
-else ()
 option (ENABLE_MPI "Enable the compilation of the MPI communication code" off)
-endif ()

 #################################
 ## Optionally enable documentation build


Fix bug regarding find_library in FindIlmBase.cmake

Find_library caches the result so the output variable should be unique
for each library.

--- FindIlmBase.cmake
+++ FindIlmBase.cmake
@@ -6,11 +6,9 @@

 set(ILMBASE_LIBRARIES "")
 foreach (LIBNAME ${CONAN_LIBS_ILMBASE})
-    find_library(LIB_FULL_PATH NAMES ${LIBNAME} PATHS ${ILMBASE_LIBRARY_DIRS})
-    list(APPEND ILMBASE_LIBRARIES "${LIB_FULL_PATH}")
-
     string(REGEX MATCH "[^-]+" LIBNAME_STEM ${LIBNAME})
-    set(ILMBASE_${LIBNAME_STEM}_LIBRARY "${LIB_FULL_PATH}")
+    find_library(ILMBASE_${LIBNAME_STEM}_LIBRARY NAMES ${LIBNAME} PATHS ${ILMBASE_LIBRARY_DIRS})
+    list(APPEND ILMBASE_LIBRARIES "${ILMBASE_${LIBNAME_STEM}_LIBRARY}")
 endforeach()
 set(ILMBASE_LIBRARY "${ILMBASE_LIBRARIES}")


Lapack on linux

Lapack on linux

--- Targets/Linux.cmake
+++ Targets/Linux.cmake
@@ -6,5 +6,5 @@
 set(CMAKE_CXX_COMPILER mpicxx)

 set(PYTHON_INCLUDE_PATH "/usr/include/python2.7/")
-set(CXX_TOOLCHAINFLAGS "-O3 -openmp -lgomp -fPIC")
-set(F_TOOLCHAINFLAGS "-O3 -cpp -openmp -fPIC")
+set(CXX_TOOLCHAINFLAGS "-O3 -openmp -lgomp -fPIC -llapack")
+set(F_TOOLCHAINFLAGS "-O3 -cpp -openmp -fPIC -llapack")


Refactor finding python

Refactor finding python

Use `find_package(Python ..)` if available, instead of the deprecated
`find_package(PythonInterp)` CMake module.

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -244,7 +244,13 @@
 endfunction()

 # Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
-find_package(PythonInterp)
+if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
+  find_package(PythonInterp)
+else()
+  find_package(Python COMPONENTS Interpreter)
+  set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
+  set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
+endif()

 # cxx_test_with_flags(name cxx_flags libs srcs...)
 #


FindGMOCK: Force shared C Runtime Library usage on Windows

Other tests are using the shared library on Windows by
default and MSVC requires the use of the same C Runtime
Library across all linkees

--- FindGMOCK.cmake
+++ FindGMOCK.cmake
@@ -123,6 +123,10 @@
     set (CMAKE_CXX_FLAGS_BACKUP ${CMAKE_CXX_FLAGS})
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GMOCK_CXX_FLAGS}")

+    list (APPEND ADD_WITH_FLAGS_OPTIONS
+          CMAKE_ARGS
+          -Dgtest_force_shared_crt=ON)
+
     psq_import_external_project (${PROJECT_NAME} gmock-exports
                                  OPTIONS
                                  ${ADD_WITH_FLAGS_OPTIONS}


[CMAKE] Fix -Wunused-command-line-argument when adding linker flag

Summary:
The previous diff D3792 made the `add_linker_flag` method able to catch
unused link flags, preventing their addition.
The following diff D3802 broke the feature while refactoring the code.
Adding the warning is not enough, it should be promoted to an error.

This diff restores the previous (correct) behavior.

Test Plan:
  mkdir buildcmake_osx && cd buildcmake_osx
  cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake
  ninja

Check the following warning disappeared with this patch:
```
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
```

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D3825

--- cmake/modules/AddCompilerFlags.cmake
+++ cmake/modules/AddCompilerFlags.cmake
@@ -100,7 +100,7 @@
 		add_compiler_flags_to_var(
 			CMAKE_REQUIRED_FLAGS
 			CXX
-			"-Wunused-command-line-argument"
+			"-Werror=unused-command-line-argument"
 		)

 		# Save the current linker flags
@@ -114,7 +114,7 @@
 		# Unset the -Werror=unused-command-line-argument flag if it is set.
 		remove_compiler_flags_from_var(
 			CMAKE_REQUIRED_FLAGS
-			"-Wunused-command-line-argument"
+			"-Werror=unused-command-line-argument"
 		)

 		# If the flag is not supported restore CMAKE_EXE_LINKER_FLAGS


when building with covise, install binaries into covise binary directories

--- cmake/modules/DeskvoxAddTarget.cmake
+++ cmake/modules/DeskvoxAddTarget.cmake
@@ -116,7 +116,7 @@

   if(COVISE_BUILD)
-    install(TARGETS virvo EXPORT covise-targets
+    install(TARGETS ${name} EXPORT covise-targets
       RUNTIME DESTINATION ${ARCHSUFFIX}/bin${_category_path}
       LIBRARY DESTINATION ${ARCHSUFFIX}/lib
       ARCHIVE DESTINATION ${ARCHSUFFIX}/lib COMPONENT modules.${category}
@@ -149,11 +149,19 @@

   target_link_libraries(${name} ${__DESKVOX_LINK_LIBRARIES})

-  install(TARGETS ${name}
-    RUNTIME DESTINATION plugins
-    LIBRARY DESTINATION plugins
-    ARCHIVE DESTINATION plugins
-  )
+  if(COVISE_BUILD)
+    install(TARGETS ${name} EXPORT covise-targets
+      RUNTIME DESTINATION ${ARCHSUFFIX}/bin
+      LIBRARY DESTINATION ${ARCHSUFFIX}/lib
+      ARCHIVE DESTINATION ${ARCHSUFFIX}/lib
+    )
+  else(COVISE_BUILD)
+    install(TARGETS ${name}
+      RUNTIME DESTINATION plugins
+      LIBRARY DESTINATION plugins
+      ARCHIVE DESTINATION plugins
+    )
+  endif(COVISE_BUILD)
 endfunction()

@@ -175,7 +183,13 @@

   target_link_libraries(${name} ${__DESKVOX_LINK_LIBRARIES})

-  install(TARGETS ${name} RUNTIME DESTINATION bin)
+  if(COVISE_BUILD)
+    install(TARGETS ${name} EXPORT covise-targets
+        RUNTIME DESTINATION ${ARCHSUFFIX}/bin
+    )
+  else(COVISE_BUILD)
+    install(TARGETS ${name} RUNTIME DESTINATION bin)
+  endif(COVISE_BUILD)
 endfunction()


fix (#6902)

fix (#6902)

--- cmake/modules/contrib/TensorRT.cmake
+++ cmake/modules/contrib/TensorRT.cmake
@@ -18,6 +18,9 @@
 # TensorRT Codegen only. This can be enabled independently of USE_TENSORRT_RUNTIME to enable
 # compilation of TensorRT modules without requiring TensorRT to be installed. The compiled modules
 # will only be able to be executed using a TVM built with USE_TENSORRT_RUNTIME=ON.
+
+include (FindPackageHandleStandardArgs)
+
 if(USE_TENSORRT_CODEGEN)
     message(STATUS "Build with TensorRT codegen")
     file(GLOB COMPILER_TENSORRT_SRCS src/relay/backend/contrib/tensorrt/*.cc)


extra endif

extra endif


GitExternals: Set up user fork remote

GitExternals: Set up user fork remote

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -1,4 +1,5 @@
-# configures an external git repository
+# Configures an external git repository
+#
 # Usage:
 #  * Automatically reads, parses and updates a .gitexternals file if it only
 #    contains lines in the form "# <directory> <giturl> <gittag>".
@@ -7,7 +8,8 @@
 #    update target to bump the tag to the master revision by
 #    recreating .gitexternals.
 #  * Provides function
-#    git_external(<directory> <giturl> <gittag> [NO_UPDATE, VERBOSE] [RESET <files>])
+#    git_external(<directory> <giturl> <gittag> [NO_UPDATE, VERBOSE]
+#      [RESET <files>])
 #  git_external_manage(<file>)
 #
 # [optional] Flags which control behaviour
@@ -20,6 +22,10 @@
 #  VERBOSE
 #    When set, displays information about git commands that are executed
 #
+# CMake variables
+#  GIT_EXTERNAL_USER_FORK If set, a remote called 'user' is set up for github
+#    repositories, pointing to github.com/<user>/<project>. Defaults to user
+#    name or GIT_EXTERNAL_USER environment variable.

 find_package(Git)
 if(NOT GIT_EXECUTABLE)
@@ -27,6 +33,17 @@
 endif()

 include(CMakeParseArguments)
+
+set(GIT_EXTERNAL_USER $ENV{GIT_EXTERNAL_USER})
+if(NOT GIT_EXTERNAL_USER)
+  if(MSVC)
+    set(GIT_EXTERNAL_USER $ENV{USERNAME})
+  else()
+    set(GIT_EXTERNAL_USER $ENV{USER})
+  endif()
+endif()
+set(GIT_EXTERNAL_USER_FORK ${GIT_EXTERNAL_USER} CACHE STRING
+  "Github user name used to setup remote for user forks")

 macro(GIT_EXTERNAL_MESSAGE msg)
   if(${GIT_EXTERNAL_VERBOSE})
@@ -49,6 +66,16 @@
     if(nok)
       message(FATAL_ERROR "${DIR} git clone failed: ${error}\n")
     endif()
+  endif()
+
+  # set up "user" remote for github forks
+  if(GIT_EXTERNAL_USER_FORK AND REPO MATCHES ".*github.com.*")
+    string(REGEX REPLACE "(.*github.com[\\/:]).*(\\/.*)"
+      "\\1${GIT_EXTERNAL_USER_FORK}\\2" GIT_EXTERNAL_USER_REPO ${REPO})
+    execute_process(
+      COMMAND "${GIT_EXECUTABLE}" remote add user ${GIT_EXTERNAL_USER_REPO}
+      RESULT_VARIABLE nok ERROR_VARIABLE error
+      WORKING_DIRECTORY "${DIR}")
   endif()

   if(IS_DIRECTORY "${DIR}/.git")


reference data fix

reference data fix

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag 89ea8fb6) # first 8 characters of hash-tag
+  set(revision_tag ba680ca8) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


updated MITK-Data hash

updated MITK-Data hash

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 0872af7b)
+  set(revision_tag e9e744e5)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


ENH: Support passing ITKV4_COMPATIBILITY to ITK superbuild

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -29,6 +29,7 @@
 foreach (_varName ${_varNames})
   if(_varName MATCHES "^ITK_"
       OR _varName MATCHES "^ITKV3"
+      OR _varName MATCHES "^ITKV4"
       OR _varName MATCHES "FFTW"
       OR _varName MATCHES "^Module_")
     message( STATUS "Passing variable \"${_varName}=${${_varName}}\" to ITK external project.")


WIP: vtk build process out of date?

WIP: vtk build process out of date?

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -160,7 +160,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY https://github.com/Kitware/VTK.git)
-  set(${proj}_GIT_TAG 836c511abf0b8d97599b25f9b26658b8636ed8d7 )
+  set(${proj}_GIT_TAG acc5f269186e3571fb2a10af4448076ecac75e8e )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


update definitions for the new changes

update definitions for the new changes

--- definitions.cmake
+++ definitions.cmake
@@ -40,24 +40,22 @@
 SET (INITAL_EN_HOME_PAGE_TITLE "The blog of Mohammad S. Babaei" CACHE STRING "" )
 SET (INITAL_FA_HOME_PAGE_TITLE "وبلاگ محمد صادق بابائی" CACHE STRING "" )

-SET ( DATABASE_BACKEND "PGSQL" CACHE STRING "" )
-SET_PROPERTY( CACHE DATABASE_BACKEND PROPERTY STRINGS "SQLITE3" "PGSQL" "MYSQL" )
-
-SET ( SQLITE3_DATABASE_FILE_PATH "../db/" CACHE STRING "" )
-SET ( SQLITE3_DATABASE_FILE_NAME "subscription.db" CACHE STRING "" )
+# Either Keyword/Value Connection Strings or Connection URIs,
+# to set more values such as:
+# host, hostaddr, port, dbname, user, password, connect_timeout,
+# client_encoding, options, application_name, fallback_application_name,
+# keepalives, keepalives_idle, keepalives_interval, keepalives_count, tty,
+# sslmode, requiressl, sslcompression, sslcert, sslkey, sslrootcert, sslcrl,
+# requirepeer, krbsrvname, gsslib, service
+# https://www.postgresql.org/docs/9.6/static/libpq-connect.html#LIBPQ-CONNSTRING
+# NOTE: If this parameter is set, the rest of the PGSQL_* variables will be ignored.
+SET ( PGSQL_CONNECTION_STRING "" CACHE STRING "" )

 SET ( PGSQL_HOST "localhost" CACHE STRING "" )
 SET ( PGSQL_PORT "5432" CACHE STRING "" )
-SET ( PGSQL_DATABASE "blog_subscription_service_db" CACHE STRING "" )
-SET ( PGSQL_USER "blog_subscription_service_user" CACHE STRING "" )
-SET ( PGSQL_PASSWORD "BE_SURE_TO_USE_A_STRONG_SECRET_PASSPHRASE_HERE" CACHE STRING "" )
-
-SET ( MYSQL_HOST "localhost" CACHE STRING "" )
-SET ( MYSQL_PORT "3306" CACHE STRING "" )
-SET ( MYSQL_UNIX_SOCKET "" CACHE STRING "" )
-SET ( MYSQL_DATABASE "blog_subscription_service_db" CACHE STRING "" )
-SET ( MYSQL_USER "blog_subscription_service_user" CACHE STRING "" )
-SET ( MYSQL_PASSWORD "BE_SURE_TO_USE_A_STRONG_SECRET_PASSPHRASE_HERE" CACHE STRING "" )
+SET ( PGSQL_DATABASE "blog_subscription_service_production" CACHE STRING "" )
+SET ( PGSQL_USER "blog_subscription_service" CACHE STRING "" )
+SET ( PGSQL_PASSWORD "A_STRONG_SECRET_PASSPHRASE" CACHE STRING "" )

 SET ( CEREAL_THREAD_SAFE 1 CACHE STRING "" )


SVN_SILENT made messages (.desktop file)

--- xine/xine.desktop.cmake
+++ xine/xine.desktop.cmake
@@ -46,6 +46,7 @@
 Name[pl]=Xine
 Name[pt]=Xine
 Name[pt_BR]=Xine
+Name[ro]=Xine
 Name[ru]=Xine
 Name[se]=Xine
 Name[sk]=Xine
@@ -98,6 +99,7 @@
 Comment[pl]=Obsługa Xine przez Phonon
 Comment[pt]=Infra-estrutura de Xine para o Phonon
 Comment[pt_BR]=Infraestrutura do Xine para o Phonon
+Comment[ro]=Suportul Xine pentru Phonon
 Comment[ru]=Механизм Xine для Phonon
 Comment[se]=Phonon Xine duogášmohtor
 Comment[sk]=Phonon Xine podsystém


Initial work to support pkg config.

Initial work to support pkg config.

--- VigraAddDep.cmake
+++ VigraAddDep.cmake
@@ -37,7 +37,7 @@
 endif()

 function(git_clone NAME)
-  find_package(Git REQUIRED)
+  find_package(Git REQUIRED VAD_IGNORE_DEP)

   # Check if a git repo has been determined for the dependency.
   if(NOT VAD_${NAME}_GIT_REPO)
@@ -275,10 +275,19 @@
   vad_reset_hooks()

   # Parse the options.
-  set(options SYSTEM LIVE)
+  set(options SYSTEM LIVE VAD_IGNORE_DEP)
   set(oneValueArgs GIT_REPO GIT_BRANCH GIT_COMMIT)
   set(multiValueArgs GIT_CLONE_OPTS)
   cmake_parse_arguments(ARG_VAD_${NAME} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+  if(NOT ARG_VAD_${NAME}_VAD_IGNORE_DEP)
+    message(STATUS "Declaring '${NAME}' as a dependency for '${PROJECT_NAME}'")
+    get_property(_VAD_${PROJECT_NAME}_DEP_LIST GLOBAL PROPERTY VAD_${PROJECT_NAME}_DEP_LIST)
+    list(APPEND _VAD_${PROJECT_NAME}_DEP_LIST "${NAME}")
+    list(REMOVE_DUPLICATES _VAD_${PROJECT_NAME}_DEP_LIST)
+    message(STATUS "Full dep list for '${PROJECT_NAME}': ${_VAD_${PROJECT_NAME}_DEP_LIST}")
+    set_property(GLOBAL PROPERTY VAD_${PROJECT_NAME}_DEP_LIST "${_VAD_${PROJECT_NAME}_DEP_LIST}")
+  endif()

   # Validate options.
   # SYSTEM and LIVE cannot be present at the same time.


CMake - Add new macros: - Accumulate environment variables, to be used later to run some command in proper environment. - Generate environement script using previously created variables.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -640,24 +640,23 @@
 #########################################################################
 # SALOME_ACCUMULATE_ENVIRONMENT()
 #
-# USAGE: SALOME_ACCUMULATE_ENVIRONMENT(var value)
+# USAGE: SALOME_ACCUMULATE_ENVIRONMENT(envvar value [value ...])
 #
 # ARGUMENTS:
-#   var   [in] environment variable name, e.g. PATH
-#   value [in] value(s) to be added to environment variable
+#   envvar [in] environment variable name, e.g. PATH
+#   value  [in] value(s) to be added to environment variable
 #
 # This macro is called in the various FindSalomeXYZ.cmake modules to
 # accumulate environment variables, to be used later to run some command
 # in proper environment.
 #
 # 1. Each envrironment variable is stored in specific CMake variable
-#      _${PROJECT_NAME}_EXTRA_ENV_<var>
-# where <var> is name of variable.
+#    _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable.
 # 2. Full list of environment variable names is stored in CMake variable
-# _${PROJECT_NAME}_EXTRA_ENV.
-#
-MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar val)
-  FOREACH(_item ${val})
+#    _${PROJECT_NAME}_EXTRA_ENV.
+#
+MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
+  FOREACH(_item ${ARGN})
     LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
     IF(_res EQUAL -1)
       LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
@@ -673,6 +672,58 @@
   ENDFOREACH()
 ENDMACRO(SALOME_ACCUMULATE_ENVIRONMENT)

+#########################################################################
+# SALOME_GENERATE_ENVIRONMENT_SCRIPT()
+#
+# USAGE: SALOME_GENERATE_ENVIRONMENT_SCRIPT(output script cmd opts)
+#
+# ARGUMENTS:
+#   output [out] output command, e.g. for creation of target.
+#   script [in]  output environement script name
+#   cmd    [in]  input command, e.g. sphinx or python command.
+#   opts   [in]  options for input command (cmd).
+#
+# This macro is called when it's necessary to use given environment to run some command.
+# Macro generates environement script using previously created variables
+# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and
+# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);
+# and puts generated command in proper environment into <output> argument.
+#
+# Notes:
+# - If <script> is specified as relative path, it is computed from the current build
+#   directory.
+#
+MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
+  IF(IS_ABSOLUTE ${script})
+    SET(_script ${script})
+  ELSE()
+    SET(_script ${CMAKE_CURRENT_BINARY_DIR}/${script})
+  ENDIF()
+
+  SET(_env)
+  FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
+    FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
+      IF(WIN32)
+        IF(${_item} STREQUAL "LD_LIBRARY_PATH")
+          SET(_item PATH)
+        ENDIF()
+        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val}\;%${_item}%\n")
+        SET(_ext "bat")
+        SET(_call_cmd "call")
+      ELSE(WIN32)
+        SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
+        SET(_ext "sh")
+        SET(_call_cmd ".")
+      ENDIF(WIN32)
+    ENDFOREACH()
+  ENDFOREACH()
+
+  SET(_script ${_script}.${_ext})
+  FILE(WRITE ${_script} "${_env}")
+
+  SET(${output} ${_call_cmd} ${_script} && ${cmd} ${opts})
+
+ENDMACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT)

 #########################################################################
 # SALOME_APPEND_LIST_OF_LIST()
@@ -721,5 +772,4 @@
       SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
     ENDIF()
   ENDFOREACH()
-ENDMACRO(SALOME_CONFIGURE_PREPARE)
-
+ENDMACRO(SALOME_CONFIGURE_PREPARE)


Wrap CMP0116 in CMAKE_VERSION check

Wrap CMP0116 in CMAKE_VERSION check

--- atdna/atdnaHelpers.cmake
+++ atdna/atdnaHelpers.cmake
@@ -3,8 +3,10 @@
 # across all dependencies.
 #

-# CMake 3.20: Don't transform add_custom_command DEPFILE for Ninja
-cmake_policy(SET CMP0116 OLD)
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.20")
+  # Don't transform add_custom_command DEPFILE for Ninja
+  cmake_policy(SET CMP0116 OLD)
+endif ()

 function(_atdna_gather_include_directories_impl target_name)
   get_target_property(target_dependencies ${target_name} INTERFACE_LINK_LIBRARIES)


add LJ_ENDIAN and LJ_NO_UNWIND checks

add LJ_ENDIAN and LJ_NO_UNWIND checks

--- deps/luajit.cmake
+++ deps/luajit.cmake
@@ -152,6 +152,12 @@
 SET(DASM_FLAGS)
 SET(TARGET_ARCH)
 LIST(APPEND TARGET_ARCH "LUAJIT_TARGET=LUAJIT_ARCH_${TARGET_LJARCH}")
+LJ_TEST_ARCH_VALUE(LJ_LE 1)
+IF(LJ_LE_1)
+  SET(DASM_FLAGS ${DASM_FLAGS} -D ENDIAN_LE)
+ELSE()
+  SET(DASM_FLAGS ${DASM_FLAGS} -D ENDIAN_BE)
+ENDIF()
 LJ_TEST_ARCH_VALUE(LJ_ARCH_BITS 64)
 IF(LJ_ARCH_BITS_64)
   SET(DASM_FLAGS ${DASM_FLAGS} -D P64)
@@ -181,6 +187,11 @@
   LIST(APPEND TARGET_ARCH "LJ_ABI_SOFTFP=0")
 ELSE()
   LIST(APPEND TARGET_ARCH "LJ_ABI_SOFTFP=1")
+ENDIF()
+LJ_TEST_ARCH_VALUE(LJ_NO_UNWIND 1)
+IF(LJ_NO_UNWIND_1)
+  SET(DASM_FLAGS ${DASM_FLAGS} -D NO_UNWIND)
+  LIST(APPEND TARGET_ARCH "LUAJIT_NO_UNWIND=1")
 ENDIF()
 IF(WIN32)
   SET(DASM_FLAGS ${DASM_FLAGS} -LN -D WIN)


Fix ExternalProjectPatched to handle .bz2 and long download times.

--- build/cmake/modules/ExternalProjectPatched.cmake
+++ build/cmake/modules/ExternalProjectPatched.cmake
@@ -220,7 +220,7 @@

 function(_ep_write_downloadfile_script script_filename remote local timeout)
   if(NOT timeout)
-    set(timeout 30)
+    set(timeout 300)
   endif()

   file(WRITE ${script_filename}
@@ -273,7 +273,7 @@
   endif()

   if(args STREQUAL "" AND NOT filename MATCHES ".zip$")
-    message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .tar, .zip, .tgz and .tar.gz")
+    message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .bz2, .tar, .zip, .tgz and .tar.gz")
     return()
   endif()

@@ -733,7 +733,7 @@
       if("${url}" MATCHES "^[a-z]+://")
         # TODO: Should download and extraction be different steps?
         string(REGEX MATCH "[^/]*$" fname "${url}")
-        if(NOT "${fname}" MATCHES "\\.(tar|tgz|tar\\.gz)$")
+        if(NOT "${fname}" MATCHES "\\.(bz2|tar|tgz|tar\\.gz)$")
           message(FATAL_ERROR "Could not extract tarball filename from url:\n  ${url}")
         endif()
         set(file ${download_dir}/${fname})


Use ITK 4.5 RC03 in superbuild

Use ITK 4.5 RC03 in superbuild

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -70,8 +70,8 @@
      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
      BINARY_DIR ${proj}-build
      PREFIX ${proj}-cmake
-     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.3.2.tar.gz
-     URL_MD5 f25bb1561887be621d3954689f3944a6
+     GIT_REPOSITORY http://itk.org/ITK.git
+     GIT_TAG v4.5rc03
      INSTALL_COMMAND ""
      PATCH_COMMAND ${ITK_PATCH_COMMAND}
      CMAKE_GENERATOR ${gen}


Only enable -Werror in gcc because gcc doesn't let you suppress enum missmatch warnings

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -182,7 +182,7 @@
 		string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE   "${CMAKE_C_FLAGS_RELEASE}")
 		string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG}")
 		string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG     "${CMAKE_C_FLAGS_DEBUG}")
-		add_flags_cxx("-Wall -Wextra -Werror -Wno-unused-parameter -Wno-error=switch -Wno-error=enum-compare")
+		add_flags_cxx("-Wall -Wextra -Wno-unused-parameter -Wno-error=switch")

 		# we support non-IEEE 754 fpus so can make no guarentees about error
 		add_flags_cxx("-ffast-math")
@@ -190,7 +190,7 @@
 		# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
 		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
 			add_flags_cxx("-D__extern_always_inline=inline")
-			add_flags_cxx("-Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")
+			add_flags_cxx("-Werror -Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")
 			add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation")
 			add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-padded")
 			add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal")


use different name for build folder (conflicts with build file)

--- cmake/External/Protobuf.cmake
+++ cmake/External/Protobuf.cmake
@@ -24,7 +24,7 @@
     ExternalProject_Add(protobuf_external
       SOURCE_DIR ${CMAKE_SOURCE_DIR}/third_party/protobuf
       BUILD_IN_SOURCE 1
-      CONFIGURE_COMMAND "./autogen.sh" COMMAND ./configure --prefix=${CMAKE_SOURCE_DIR}/third_party/protobuf/build
+      CONFIGURE_COMMAND "./autogen.sh" COMMAND ./configure --prefix=${CMAKE_SOURCE_DIR}/third_party/protobuf/_build
       BUILD_COMMAND make
       INSTALL_COMMAND make install
       )


add support vs 15

add support vs 15

--- cmake/FindFaceEngineSDK.cmake
+++ cmake/FindFaceEngineSDK.cmake
@@ -24,6 +24,8 @@
 	set(FSDK_COMPILER_NAME vs2012)
 elseif(MSVC12)
 	set(FSDK_COMPILER_NAME vs2013)
+elseif(MSVC14)
+	set(FSDK_COMPILER_NAME vs2015)
 elseif(CMAKE_COMPILER_IS_GNUCXX)
 	set(FSDK_COMPILER_NAME gcc4)
 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")


cmake/FindgenericLogger.cmake fix [ci skip]

--- cmake/FindgenericLogger.cmake
+++ cmake/FindgenericLogger.cmake
@@ -128,7 +128,7 @@
 	NAMES ${_GENERICLOGGER_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
 	PATHS ${GENERICLOGGER_ROOT_DIR} PATH_SUFFIXES ${_GENERICLOGGER_POSSIBLE_LIB_SUFFIXES}
 	NO_DEFAULT_PATH)
-    ELSE (ICU_ROOT_DIR)
+    ELSE (GENERICLOGGER_ROOT_DIR)
       FIND_LIBRARY (${_GENERICLOGGER_LIBRARY_BASE}_RELEASE
 	NAMES ${_GENERICLOGGER_COMPONENT_POSSIBLE_RELEASE_NAMES}
 	PATH_SUFFIXES ${_GENERICLOGGER_POSSIBLE_LIB_SUFFIXES}


Fix cmake 2.8.9 '-rdynamic' bug:

Fix cmake 2.8.9 '-rdynamic' bug:

--- cmake/arm-none-eabi-gcc.cmake
+++ cmake/arm-none-eabi-gcc.cmake
@@ -24,7 +24,9 @@
 CMAKE_FORCE_CXX_COMPILER(${CPREF}-g++ GNU)
 ################################################################################

-
+#fix '-rdynamic' cmake 2.8.9 bug
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")

 # here is the target environment is located
 SET(CMAKE_FIND_ROOT_PATH	${CROSS_COMPIL_TOOLS})


Don't allow Q_FOREACH to be used

Don't allow Q_FOREACH to be used

Enforce the fact that we are Q_FOREACH-free.


[cmake] fix 189e19d7e7d2a2c6cc53f053622d547713823d7b * ensure dune-commons cmake stuff is used only with --use-cmake

--- cmake/modules/DuneUtils.cmake
+++ cmake/modules/DuneUtils.cmake
@@ -125,8 +125,10 @@
 endmacro(BEGIN_TESTCASES)

 macro(END_TESTCASES)
-    add_directory_test_target(_test_target)
-    add_dependencies(${_test_target} ${testnames})
+    IF(NOT CMAKE_WITH_AUTOTOOLS)
+        add_directory_test_target(_test_target)
+        add_dependencies(${_test_target} ${testnames})
+    ENDIF(NOT CMAKE_WITH_AUTOTOOLS)
 	add_custom_target(test_binaries DEPENDS ${testnames})
 	add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
                   DEPENDS test_binaries)


removing unused cmake file

removing unused cmake file

--- cmake/modules/FindCXX11.cmake
+++ cmake/modules/FindCXX11.cmake
@@ -1,64 +0,0 @@
-# - Finds if the compiler has C++11 support
-# This module can be used to detect compiler flags for using C++11, and checks
-# a small subset of the language.
-#
-# The following variables are set:
-#   CXX11_FLAGS - flags to add to the CXX compiler for C++11 support
-#   CXX11_FOUND - true if the compiler supports C++11
-#
-# TODO: When compilers starts implementing the whole C++11, check the full set
-
-include(CheckCXXSourceCompiles)
-include(FindPackageHandleStandardArgs)
-
-set(CXX11_FLAG_CANDIDATES
-	 #Gnu and Intel Linux and Max
-    "-std=c++11"
-    "-std=c++0x"
-    #Microsoft Visual Studio, and everything that automatically accepts C++11
-    " "
-    #Intel windows
-    "/Qstd=c++0x"
-	 #Mac
-	 "-stdlib=libc++"
-    )
-
-set(CXX11_TEST_SOURCE
-"
-class Matrix
-{
-public:
-    Matrix(int a, int b, int c, int d)
-        : data {a, b, c, d}
-    {}
-
-private:
-    int data[4];
-};
-
-int main()
-{
-    int n[] {4,7,6,1,2};
-    for (auto i : n)
-        Matrix mat (3,5,1,2);
-    return 0;
-}
-")
-
-foreach(FLAG ${CXX11_FLAG_CANDIDATES})
-    set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
-    set(CMAKE_REQUIRED_FLAGS "${FLAG}")
-    unset(CXX11_FLAG_DETECTED CACHE)
-    message(STATUS "Try C++11 flag = [${FLAG}]")
-    check_cxx_source_compiles("${CXX11_TEST_SOURCE}" CXX11_FLAG_DETECTED)
-    set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
-    if(CXX11_FLAG_DETECTED)
-        set(CXX11_FLAGS_INTERNAL "${FLAG}")
-        break()
-    endif(CXX11_FLAG_DETECTED)
-endforeach(FLAG ${CXX11_FLAG_CANDIDATES})
-
-set(CXX11_FLAGS "${CXX11_FLAGS_INTERNAL}")
-
-find_package_handle_standard_args(CXX11 DEFAULT_MSG CXX11_FLAGS)
-mark_as_advanced(CXX11_FLAGS)


Tweak commentary.

Tweak commentary.

svn path=/trunk/; revision=7111

--- cmake/modules/FindQHULL.cmake
+++ cmake/modules/FindQHULL.cmake
@@ -3,9 +3,9 @@

 # This module defines the following uncached variables:
 #  QHULL_FOUND, if false, do not try to use qhull.
-#  QHULL_INCLUDE_DIRS, where to find qhull_a.h.
-#  QHULL_LIBRARIES, the libraries to link against to use libqhull.a
-#  QHULL_LIBRARY_DIRS, the directory where libqhull.a is found.
+#  QHULL_INCLUDE_DIRS, where to find qhull/qhull_a.h.
+#  QHULL_LIBRARIES, the libraries to link against to use the qhull library
+#  QHULL_LIBRARY_DIRS, the directory where the qhull library is found.

 find_path(
   QHULL_INCLUDE_DIR


ENH: update KWStyle to fix potential buffer overflow

warning: '%ld' directive writing between 1 and 20 bytes into a region of size 10 [-Wformat-overflow=]
note: '__builtin___sprintf_chk' output between 2 and 21 bytes into a destination of size 10

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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

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


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

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


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

 # 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
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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

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


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp


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


roll forward libbot-drc

roll forward libbot-drc

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -3,7 +3,7 @@
 set(lcm_pod_depends)

 set(libbot-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/libbot-drc)
-set(libbot-drc_revision 8331)
+set(libbot-drc_revision 8332)
 set(libbot-drc_depends)

 set(Eigen_pod_url https://github.com/RobotLocomotion/eigen-pod.git)


Update VTK.cmake

Update VTK.cmake

Replacing date by SHA1 in GIT_TAG

--- cmake/externals/projects_modules/VTK.cmake
+++ cmake/externals/projects_modules/VTK.cmake
@@ -52,7 +52,7 @@
 if (NOT DEFINED ${ep}_SOURCE_DIR)
     set(location GIT_REPOSITORY "git://vtk.org/VTK.git")
     # Set GIT_TAG to latest commit of origin/release-5.10 known to work
-    set(branch GIT_TAG "release-5.10@{29/01/2014}")
+    set(branch GIT_TAG d3b66526624ba8e55addcddb0ec28c40982473ac)
 endif()


configure curl with HTTP_ONLY (#259)

configure curl with HTTP_ONLY (#259)


[CMakeLists] Factored out cmake function that does single gyb processing

So that we can generate arbitrary output file.

--- cmake/modules/SwiftHandleGybSources.cmake
+++ cmake/modules/SwiftHandleGybSources.cmake
@@ -1,5 +1,73 @@
 include(SwiftAddCustomCommandTarget)
 include(SwiftSetIfArchBitness)
+
+# Create a target to process single gyb source with the 'gyb' tool.
+#
+# handle_gyb_source_single(
+#     dependency_out_var_name
+#     SOURCE src_gyb
+#     OUTPUT output
+#     [FLAGS [flags ...]])
+#     [DEPENDS [depends ...]]
+#     [COMMENT comment])
+#
+# dependency_out_var_name
+#   The name of a variable, to be set in the parent scope to be the target
+#   target that invoke gyb.
+#
+# src_gyb
+#   .gyb suffixed source file
+#
+# output
+#   Output filename to be generated
+#
+# flags ...
+#    gyb flags in addition to ${SWIFT_GYB_FLAGS}.
+#
+# depends ...
+#    gyb flags in addition to 'src_gyb' and sources of gyb itself.
+#
+# comment
+#    Additional comment.
+function(handle_gyb_source_single dependency_out_var_name)
+  set(options)
+  set(single_value_args SOURCE OUTPUT COMMENT)
+  set(multi_value_args FLAGS DEPENDS)
+  cmake_parse_arguments(
+      GYB_SINGLE # prefix
+      "${options}" "${single_value_args}" "${multi_value_args}" ${ARGN})
+
+  set(gyb_flags
+      "--test" # Run gyb's self-tests whenever we use it.  They're cheap
+               # enough and it keeps us honest.
+      ${SWIFT_GYB_FLAGS}
+      ${GYB_SINGLE_FLAGS})
+
+  set(gyb_tool "${SWIFT_SOURCE_DIR}/utils/gyb")
+  set(gyb_tool_source "${gyb_tool}" "${gyb_tool}.py")
+
+  get_filename_component(dir "${GYB_SINGLE_OUTPUT}" DIRECTORY)
+  get_filename_component(basename "${GYB_SINGLE_OUTPUT}" NAME)
+  add_custom_command_target(
+      dependency_target
+      COMMAND
+          "${CMAKE_COMMAND}" -E make_directory "${dir}"
+      COMMAND
+          "${gyb_tool}" "${gyb_flags}"
+          -o "${GYB_SINGLE_OUTPUT}.tmp" "${GYB_SINGLE_SOURCE}"
+      COMMAND
+          "${CMAKE_COMMAND}" -E copy_if_different
+          "${GYB_SINGLE_OUTPUT}.tmp" "${GYB_SINGLE_OUTPUT}"
+      COMMAND
+          "${CMAKE_COMMAND}" -E remove "${GYB_SINGLE_OUTPUT}.tmp"
+      OUTPUT "${GYB_SINGLE_OUTPUT}"
+      DEPENDS "${gyb_tool_source}" "${GYB_SINGLE_DEPENDS}" "${GYB_SINGLE_SOURCE}"
+      COMMENT "Generating ${basename} from ${GYB_SINGLE_SOURCE} ${GYB_SINGLE_COMMENT}"
+      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+      SOURCES "${GYB_SINGLE_SOURCE}"
+      IDEMPOTENT)
+  set("${dependency_out_var_name}" "${dependency_target}" PARENT_SCOPE)
+endfunction()

 # Create a target to process .gyb files with the 'gyb' tool.
 #
@@ -32,16 +100,8 @@
     set(extra_gyb_flags "-DCMAKE_SIZEOF_VOID_P=${ptr_size}")
   endif()

-  set(gyb_flags
-      "--test" # Run gyb's self-tests whenever we use it.  They're cheap
-               # enough and it keeps us honest.
-      ${SWIFT_GYB_FLAGS}
-      ${extra_gyb_flags})
-
   set(dependency_targets)
   set(de_gybbed_sources)
-  set(gyb_tool "${SWIFT_SOURCE_DIR}/utils/gyb")
-  set(gyb_tool_source "${gyb_tool}" "${gyb_tool}.py")
   set(gyb_extra_sources
       "${SWIFT_SOURCE_DIR}/utils/GYBUnicodeDataUtils.py"
       "${SWIFT_SOURCE_DIR}/utils/SwiftIntTypes.py"
@@ -59,27 +119,15 @@
       endif()
       set(output_file_name "${dir}/${src_sans_gyb}")
       list(APPEND de_gybbed_sources "${output_file_name}")
-      string(MD5 output_file_name_hash "${output_file_name}")
-      add_custom_command_target(
-          dependency_target
-          COMMAND
-            "${CMAKE_COMMAND}" -E make_directory "${dir}"
-          COMMAND
-            "${gyb_tool}" "${gyb_flags}" -o "${output_file_name}.tmp" "${src}"
-          COMMAND
-            "${CMAKE_COMMAND}" -E copy_if_different "${output_file_name}.tmp" "${output_file_name}"
-          COMMAND
-            "${CMAKE_COMMAND}" -E remove "${output_file_name}.tmp"
+      handle_gyb_source_single(dependency_target
+          SOURCE "${src}"
           OUTPUT "${output_file_name}"
-          DEPENDS "${gyb_tool_source}" "${src}" "${gyb_extra_sources}"
-          COMMENT "Generating ${src_sans_gyb} from ${src} with ptr size = ${ptr_size}"
-          WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-          SOURCES "${src}"
-          IDEMPOTENT)
+          FLAGS ${extra_gyb_flags}
+          DEPENDS "${gyb_extra_sources}"
+          COMMENT "with ptr size = ${ptr_size}")
       list(APPEND dependency_targets "${dependency_target}")
     endif()
   endforeach()
   set("${dependency_out_var_name}" "${dependency_targets}" PARENT_SCOPE)
   set("${sources_var_name}" "${de_gybbed_sources}" PARENT_SCOPE)
 endfunction()
-


hunter_calculate_self: use hunter_test_string_not_empty

--- cmake/modules/hunter_calculate_self.cmake
+++ cmake/modules/hunter_calculate_self.cmake
@@ -4,22 +4,13 @@
 cmake_minimum_required(VERSION 3.0)

 include(hunter_internal_error)
+include(hunter_test_string_not_empty)

 function(hunter_calculate_self root version sha1 result)
-  string(COMPARE EQUAL "${root}" "" is_bad)
-  if(is_bad)
-    hunter_internal_error("root is empty")
-  endif()
-
-  string(COMPARE EQUAL "${version}" "" is_bad)
-  if(is_bad)
-    hunter_internal_error("version is empty")
-  endif()
-
-  string(COMPARE EQUAL "${sha1}" "" is_bad)
-  if(is_bad)
-    hunter_internal_error("sha1 is empty")
-  endif()
+  hunter_test_string_not_empty("${root}")
+  hunter_test_string_not_empty("${version}")
+  hunter_test_string_not_empty("${sha1}")
+  hunter_test_string_not_empty("${result}")

   string(SUBSTRING "${sha1}" 0 7 archive_id)


cmake: fix finding zeromq on visual studio

--- cmake/qibuild/modules/zeromq-config.cmake
+++ cmake/qibuild/modules/zeromq-config.cmake
@@ -2,7 +2,8 @@

 clean(ZEROMQ)
 fpath(ZEROMQ zmq.h)
-flib(ZEROMQ zmq)
+# zeromq is called libzmq.dll on windows...
+flib(ZEROMQ libzmq zmq)
 if(UNIX)
   qi_set_global(ZEROMQ_DEPENDS "UUID")
 else()


LargeAdressaware option and don't warn about variadic macros

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@966 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCompiler.cmake
+++ cmake/ACGCompiler.cmake
@@ -15,11 +15,11 @@
   set( ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS )

   if ( WINDOWS_LARGE_MEMORY_SUPPORT )
-        if( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
-	  list(APPEND ADDITIONAL_CMAKE_EXE_LINKER_FLAGS       "/LARGEADDRESSAWARE" )
-  	  list(APPEND ADDITIONAL_CMAKE_SHARED_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
-	  list(APPEND ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
-        endif()
+    if( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
+	list(APPEND ADDITIONAL_CMAKE_EXE_LINKER_FLAGS       "/LARGEADDRESSAWARE" )
+	list(APPEND ADDITIONAL_CMAKE_SHARED_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
+	list(APPEND ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
+    endif()
   endif()

@@ -61,7 +61,7 @@
   list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS          "-DINCLUDE_TEMPLATES" )
   list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS        "-DINCLUDE_TEMPLATES" )
   list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-DINCLUDE_TEMPLATES" )
-
+
   # add our standard flags for Template inclusion
   list(APPEND ADDITIONAL_C_DEBUG_FLAGS            "-DINCLUDE_TEMPLATES" )
   list(APPEND ADDITIONAL_C_RELEASE_FLAGS          "-DINCLUDE_TEMPLATES" )
@@ -104,11 +104,13 @@

     IF ( APPLE  )
       # Skip unused parameters as it has to be used for the documentation via doxygen and the interfaces
-      set ( COMPILER_WARNINGS "-W" "-Wall" "-Wno-unused" "-Wextra" "-Wno-non-virtual-dtor" "-Wno-unused-parameter" CACHE STRINGLIST "This list contains the warning flags used during compilation " )
+      set ( COMPILER_WARNINGS "-W" "-Wall" "-Wno-unused" "-Wextra" "-Wno-non-virtual-dtor" "-Wno-unused-parameter" "-Wno-variadic-macros" CACHE STRINGLIST "This list contains the warning flags used during compilation " )
+    elseif ("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang")
+      set ( COMPILER_WARNINGS "-W" "-Wall" "-Wextra" "-Wno-non-virtual-dtor" "-Wno-unused-parameter" "-Wno-variadic-macros" CACHE STRINGLIST "This list contains the warning flags used during compilation " )
     ELSEIF ( CMAKE_SYSTEM MATCHES "SunOS*" )
       set ( COMPILER_WARNINGS "" CACHE STRINGLIST "This list contains the warning flags used during compilation " )
     ELSE ()
-      set ( COMPILER_WARNINGS "-W" "-Wall" "-Wno-unused" "-Wextra" CACHE STRINGLIST "This list contains the warning flags used during compilation " )
+      set ( COMPILER_WARNINGS "-W" "-Wall" "-Wno-unused" "-Wextra" "-Wno-variadic-macros" CACHE STRINGLIST "This list contains the warning flags used during compilation " )
     ENDIF()

   endif ( NOT COMPILER_WARNINGS )


Code sign executables on mac as well.

Code sign executables on mac as well.

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -61,7 +61,8 @@
 	)

     foreach(SO $\{installedSOs\})
-		execute_process(COMMAND codesign -s \"Erik Smistad\" --timestamp --signature-size=12000 $\{SO\} RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE err)
+    	message(\"-- Signing $\{SO\}\")
+		execute_process(COMMAND codesign --force --options runtime,library -s \"Developer ID Application: Erik Smistad (85JK2HDMY2)\" --timestamp --signature-size=12000 $\{SO\} RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE err)
 		if (NOT res EQUAL 0)
 			message(\"Unable to sign $\{SO\} - $\{err\}\")
 		endif ()


cmake: update PDB support condition

cmake: update PDB support condition

Unfortunately there is no stable support for installation of PDB files in CMake.
This patch is just eliminate problems with modern versions.

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -607,8 +607,11 @@
     set(${__package}_TARGETS "${${__package}_TARGETS}" CACHE INTERNAL "List of ${__package} targets")
   endif()

-  if(INSTALL_CREATE_DISTRIB)
-    if(MSVC AND NOT BUILD_SHARED_LIBS)
+  if(MSVS)
+    if(NOT INSTALL_IGNORE_PDB AND
+        (INSTALL_PDB OR
+          (INSTALL_CREATE_DISTRIB AND NOT BUILD_SHARED_LIBS)
+        ))
       set(__target "${ARGV0}")

       set(isArchive 0)
@@ -636,13 +639,13 @@
           get_target_property(fname ${__target} LOCATION_DEBUG)
           if(fname MATCHES "\\.lib$")
             string(REGEX REPLACE "\\.lib$" ".pdb" fname "${fname}")
-            install(FILES "${fname}" DESTINATION "${__dst}" CONFIGURATIONS Debug)
+            install(FILES "${fname}" DESTINATION "${__dst}" CONFIGURATIONS Debug OPTIONAL)
           endif()

           get_target_property(fname ${__target} LOCATION_RELEASE)
           if(fname MATCHES "\\.lib$")
             string(REGEX REPLACE "\\.lib$" ".pdb" fname "${fname}")
-            install(FILES "${fname}" DESTINATION "${__dst}" CONFIGURATIONS Release)
+            install(FILES "${fname}" DESTINATION "${__dst}" CONFIGURATIONS Release OPTIONAL)
           endif()
         else()
           # CMake 2.8.12 broke PDB support for STATIC libraries from MSVS, fix was introduced in CMake 3.1.0.


Remove quotes around variable name to adapt for the new behavior of CMake

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -110,10 +110,10 @@
         if(SUBSYS_EXT_DEPS)
         foreach(_dep ${SUBSYS_EXT_DEPS})
             string(TOUPPER "${_dep}_found" EXT_DEP_FOUND)
-            if(NOT ${EXT_DEP_FOUND} OR (NOT ("${EXT_DEP_FOUND}" STREQUAL "TRUE")))
+            if(NOT ${EXT_DEP_FOUND} OR (NOT (${EXT_DEP_FOUND} STREQUAL "TRUE")))
                 set(${_var} FALSE)
                 PCL_SET_SUBSYS_STATUS(${_name} FALSE "Requires external library ${_dep}.")
-            endif(NOT ${EXT_DEP_FOUND} OR (NOT ("${EXT_DEP_FOUND}" STREQUAL "TRUE")))
+            endif(NOT ${EXT_DEP_FOUND} OR (NOT (${EXT_DEP_FOUND} STREQUAL "TRUE")))
         endforeach(_dep)
         endif(SUBSYS_EXT_DEPS)
     endif(${_var} AND (NOT ("${subsys_status}" STREQUAL "AUTO_OFF")))


Fix GIF min dependency (#2697)

Fix GIF min dependency (#2697)

Seems that cmake's FindGIF.cmake isn't good at discerning minor
releases (prior to GIF 5.x including more info in its headers), so
saying "find_package(GIF 4.1)" doesn't work the way we'd like, and
seems to fail to find a legit 4.1 installation.  Go back to
find_package(GIF 4).

We seem to have broken this in PR 2681, and I'm worried that people
with gif_lib 4.1 will find themselves mysteriously lacking GIF support
in their OIIO builds. I may do an emergency tweak release of 2.2 just
to address this.

Signed-off-by: Larry Gritz <f0a1ce6f80112d72f7276457fd261d671b827567@larrygritz.com>

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -151,7 +151,7 @@
 checked_find_package (Field3D
                    DEPS         HDF5
                    DEFINITIONS  -DUSE_FIELD3D=1)
-checked_find_package (GIF 4.1
+checked_find_package (GIF 4
                       RECOMMEND_MIN 5.0
                       RECOMMEND_MIN_REASON "for stability and thread safety")
 checked_find_package (Libheif 1.3)  # For HEIF/HEIC format


Harmonize ispc.cmake with OSPRay's version

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -14,9 +14,13 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

-SET (ISPC_INCLUDE_DIR "")
+# ##################################################################
+# add macro INCLUDE_DIRECTORIES_ISPC() that allows to specify search
+# paths for ISPC sources
+# ##################################################################
+SET(ISPC_INCLUDE_DIR "")
 MACRO (INCLUDE_DIRECTORIES_ISPC)
-  SET (ISPC_INCLUDE_DIR ${ISPC_INCLUDE_DIR} ${ARGN})
+  SET(ISPC_INCLUDE_DIR ${ISPC_INCLUDE_DIR} ${ARGN})
 ENDMACRO ()

 IF (ENABLE_ISPC_SUPPORT)
@@ -24,7 +28,17 @@
 SET(ISPC_VERSION_REQUIRED "1.8.2")

 IF (NOT ISPC_EXECUTABLE)
-  FIND_PROGRAM(ISPC_EXECUTABLE ispc DOC "Path to the ISPC executable.")
+  # try sibling folder as hint for path of ISPC
+  IF (APPLE)
+    SET(ISPC_DIR_SUFFIX "osx")
+  ELSEIF(WIN32)
+    SET(ISPC_DIR_SUFFIX "windows")
+  ELSE()
+    SET(ISPC_DIR_SUFFIX "linux")
+  ENDIF()
+  SET(ISPC_DIR_HINT ${PROJECT_SOURCE_DIR}/../ispc-v${ISPC_VERSION_REQUIRED}-${ISPC_DIR_SUFFIX})
+
+  FIND_PROGRAM(ISPC_EXECUTABLE ispc PATHS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.")
   IF (NOT ISPC_EXECUTABLE)
     MESSAGE(FATAL_ERROR "Intel SPMD Compiler (ISPC) not found. Disable ENABLE_ISPC_SUPPORT or install ISPC.")
   ELSE()
@@ -51,14 +65,16 @@
 SET(EMBREE_ISPC_ADDRESSING 32 CACHE INT "32vs64 bit addressing in ispc")
 MARK_AS_ADVANCED(EMBREE_ISPC_ADDRESSING)

-MACRO (ispc_compile)
+MACRO (ISPC_COMPILE)
   SET(ISPC_ADDITIONAL_ARGS "")

-  IF (__XEON__)
-    SET (ISPC_TARGET_EXT ${CMAKE_CXX_OUTPUT_EXTENSION})
-  ELSE()
-    SET (ISPC_TARGET_EXT .cpp)
-    SET (ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --opt=force-aligned-memory)
+  IF (NOT __XEON__)
+    SET(ISPC_TARGET_EXT .cpp)
+    SET(ISPC_TARGET_ARGS generic-16)
+    SET(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --opt=force-aligned-memory --emit-c++ --c++-include-file=${ISPC_DIR}/examples/intrinsics/knc.h -D__XEON_PHI__)
+  ELSE()
+    SET(ISPC_TARGET_EXT ${CMAKE_CXX_OUTPUT_EXTENSION})
+    STRING(REPLACE ";" "," ISPC_TARGET_ARGS "${ISPC_TARGETS}")
   ENDIF()

   IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -75,11 +91,10 @@
     SET(ISPC_INCLUDE_DIR_PARMS "-I" ${ISPC_INCLUDE_DIR_PARMS})
   ENDIF()

-  IF (__XEON__)
-    STRING(REPLACE ";" "," ISPC_TARGET_ARGS "${ISPC_TARGETS}")
-  ELSE()
-    SET(ISPC_TARGET_ARGS generic-16)
-    SET(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --emit-c++ -D__XEON_PHI__ --c++-include-file=${ISPC_DIR}/examples/intrinsics/knc.h)
+  IF (${CMAKE_BUILD_TYPE} STREQUAL "Release")
+    SET(ISPC_OPT_FLAGS -O3)
+  ELSE()
+    SET(ISPC_OPT_FLAGS -O2 -g)
   ENDIF()

   SET(ISPC_OBJECTS "")
@@ -88,12 +103,13 @@
     GET_FILENAME_COMPONENT(fname ${src} NAME_WE)
     GET_FILENAME_COMPONENT(dir ${src} PATH)

-    IF("${dir}" STREQUAL "")
-      SET(outdir ${ISPC_TARGET_DIR})
-    ELSE("${dir}" STREQUAL "")
-      SET(outdir ${ISPC_TARGET_DIR}/${dir})
-    ENDIF("${dir}" STREQUAL "")
-    SET(outdirh ${ISPC_TARGET_DIR})
+    IF ("${dir}" MATCHES "^/|([A-Z]:)") # global path name to input
+      STRING(REGEX REPLACE "^/|([A-Z]:)" "${ISPC_TARGET_DIR}/rebased/" outdir "${dir}")
+      SET(input ${src})
+    ELSE() # local path name to input
+      SET(outdir "${ISPC_TARGET_DIR}/local_${dir}")
+      SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
+    ENDIF()

     SET(deps "")
     IF (EXISTS ${outdir}/${fname}.dev.idep)
@@ -121,39 +137,37 @@
     ENDIF()

     IF (WIN32)
-	  SET(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --dllexport)
-	ELSE()
+      SET(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --dllexport)
+    ELSE()
       SET(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --pic)
     ENDIF()

     ADD_CUSTOM_COMMAND(
-      OUTPUT ${results} ${outdirh}/${fname}_ispc.h
+      OUTPUT ${results} ${ISPC_TARGET_DIR}/${fname}_ispc.h
       COMMAND ${CMAKE_COMMAND} -E make_directory ${outdir}
       COMMAND ${ISPC_EXECUTABLE}
       -I ${CMAKE_CURRENT_SOURCE_DIR}
       ${ISPC_INCLUDE_DIR_PARMS}
       --arch=${ISPC_ARCHITECTURE}
       --addressing=${EMBREE_ISPC_ADDRESSING}
-      -O3
+      ${ISPC_OPT_FLAGS}
       --target=${ISPC_TARGET_ARGS}
       --woff
       --opt=fast-math
       ${ISPC_ADDITIONAL_ARGS}
-      -h ${outdirh}/${fname}_ispc.h
+      -h ${ISPC_TARGET_DIR}/${fname}_ispc.h
       -MMM  ${outdir}/${fname}.dev.idep
       -o ${outdir}/${fname}.dev${ISPC_TARGET_EXT}
-      ${CMAKE_CURRENT_SOURCE_DIR}/${src}
-      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${deps}
+      ${input}
+      DEPENDS ${input} ${deps}
       COMMENT "Building ISPC object ${outdir}/${fname}.dev${ISPC_TARGET_EXT}"
     )

     SET(ISPC_OBJECTS ${ISPC_OBJECTS} ${results})
-
-  ENDFOREACH()
-
-ENDMACRO()
-
-MACRO (add_ispc_executable name)
+  ENDFOREACH()
+ENDMACRO()
+
+MACRO (ADD_ISPC_EXECUTABLE name)
    SET(ISPC_SOURCES "")
    SET(OTHER_SOURCES "")
    FOREACH(src ${ARGN})
@@ -174,7 +188,7 @@
   ENDIF()
 ENDMACRO()

-MACRO (add_ispc_library name type)
+MACRO (ADD_ISPC_LIBRARY name type)
    SET(ISPC_SOURCES "")
    SET(OTHER_SOURCES "")
    FOREACH(src ${ARGN})
@@ -197,7 +211,7 @@

 ELSE (ENABLE_ISPC_SUPPORT)

-MACRO (add_ispc_library name type)
+MACRO (ADD_ISPC_LIBRARY name type)
    SET(ISPC_SOURCES "")
    SET(OTHER_SOURCES "")
    FOREACH(src ${ARGN})
@@ -209,7 +223,6 @@
     ENDIF ()
   ENDFOREACH()
   ADD_LIBRARY(${name} ${type} ${OTHER_SOURCES})
-
 ENDMACRO()

 ENDIF (ENABLE_ISPC_SUPPORT)


Silenced MSVC LNK4221 warning about empty compilation units. Such units appear because they are used for basic validation of header files that only contain e.g. template code.

--- globals.cmake
+++ globals.cmake
@@ -56,6 +56,8 @@

 elseif(MSVC)
 	set(MIRRAGE_DEFAULT_COMPILER_ARGS /DWIN32_LEAN_AND_MEAN /DNOMINMAX /MP)
+	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4221")
+	set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
 endif()

 # Select optimal linker


Support for macOS in CompilerWarnings.cmake

Solves #46 ,adds stricter checking for GCC and prints a proper warning if compiler is not handled.

--- cmake/CompilerWarnings.cmake
+++ cmake/CompilerWarnings.cmake
@@ -79,10 +79,12 @@

   if(MSVC)
     set(PROJECT_WARNINGS ${MSVC_WARNINGS})
-  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
     set(PROJECT_WARNINGS ${CLANG_WARNINGS})
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+    set(PROJECT_WARNINGS ${GCC_WARNINGS})
   else()
-    set(PROJECT_WARNINGS ${GCC_WARNINGS})
+    message(AUTHOR_WARNING "No compiler warnings set for '${CMAKE_CXX_COMPILER_ID}' compiler.")
   endif()

   target_compile_options(${project_name} INTERFACE ${PROJECT_WARNINGS})


Coverage: Fix coverage enabled build on macOS

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -170,7 +170,10 @@

 if (ENABLE_COVERAGE)
 	set (COMMON_FLAGS "${COMMON_FLAGS} -fprofile-arcs -ftest-coverage")
-	set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov")
+	set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+	if (NOT APPLE)
+		set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lgcov")
+	endif (NOT APPLE)
 endif (ENABLE_COVERAGE)

 set (CXX_EXTRA_FLAGS "${CXX_EXTRA_FLAGS} -Wno-missing-field-initializers")


Fix add_graviton_plugin macro

Fix add_graviton_plugin macro

--- cmake/GravitonInternal.cmake
+++ cmake/GravitonInternal.cmake
@@ -1,12 +1,13 @@
 set(GRAVITON_VERSION
   "${GRAVITON_VERSION_MAJOR}.${GRAVITON_VERSION_MINOR}.${GRAVITON_VERSION_PATCH}")

-macro(add_graviton_plugin _name _source)
-  add_library(graviton-plugin-${_name} MODULE ${_source})
+function(add_graviton_plugin)
+  cmake_parse_arguments(_plugin "" "NAME" "SOURCES" ${ARGN})
+  add_library(graviton-plugin-${_plugin_NAME} MODULE ${_plugin_SOURCES})
   string(REPLACE ";" " " _LDFLAGS "${GRAVITON_LDFLAGS};${GRAVITON_LDFLAGS_OTHER}")
-  set_target_properties(graviton-plugin-${_name} PROPERTIES
-    OUTPUT_NAME ${_name}
+  set_target_properties(graviton-plugin-${_plugin_NAME} PROPERTIES
+    OUTPUT_NAME ${_plugin_NAME}
     PREFIX ""
     LINK_FLAGS "${_LDFLAGS}"
   )
-endmacro(add_graviton_plugin)
+endfunction(add_graviton_plugin)


Prevent reading non-whitelisted properties of interface targets. (#916)

* Prevent reading non-whitelisted properties of interface targets.

* Recursively resolve targets from INTERFACE_LINK_LIBRARIES.

--- cmake/catkin_libraries.cmake
+++ cmake/catkin_libraries.cmake
@@ -131,8 +131,15 @@
       # sometimes cmake dependencies define imported targets, in which
       # case the imported library information is not the target name, but
       # the information embedded in cmake properties inside the imported library
+      # For interface libraries, this is the INTERFACE_LINK_LIBRARIES property.
+      # For regular imported libraries, this is IMPORTED_LOCATION(_$CONFIG).
+      get_target_property(${lib}_type ${lib} TYPE)
       get_target_property(${lib}_imported ${lib} IMPORTED)
-      if(${${lib}_imported})
+      if(${${lib}_type} STREQUAL "INTERFACE_LIBRARY")
+        get_target_property(${lib}_interface_link_libraries ${lib} INTERFACE_LINK_LIBRARIES)
+        catkin_replace_imported_library_targets(${lib}_resolved_libs ${${lib}_interface_link_libraries})
+        list(APPEND result ${${lib}_resolved_libs})
+      elseif(${${lib}_imported})
         set(imported_libraries)  # empty list
         get_target_property(${lib}_imported_location ${lib} IMPORTED_LOCATION)
         if(${lib}_imported_location)


add comment about source files variable

add comment about source files variable

--- cmake/clang-cpp-checks.cmake
+++ cmake/clang-cpp-checks.cmake
@@ -1,7 +1,8 @@
 # Additional targets to perform clang-format/clang-tidy
-# Get all project files
+
+# Get all project files - FIXME: this should also use the list of generated targets
 IF(NOT CHECK_CXX_SOURCE_FILES)
-    MESSAGE(FATAL_ERROR "Variable CHECK_CXX_SOURCE_FILES not defined - set it to the list of files to lint and format")
+    MESSAGE(FATAL_ERROR "Variable CHECK_CXX_SOURCE_FILES not defined - set it to the list of files format")
     RETURN()
 ENDIF()


Don't emit a message if doxygen is not found.

--- cmake/generate_doxygen.cmake
+++ cmake/generate_doxygen.cmake
@@ -1,4 +1,4 @@
-FIND_PACKAGE(Doxygen)
+FIND_PACKAGE(Doxygen QUIET)
 IF(DOXYGEN_FOUND)
     SET(CJET_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/generated/Doxyfile)


Bug 775: propagate generator when workingaround cmake bug 9220

--- cmake/language_support.cmake
+++ cmake/language_support.cmake
@@ -33,7 +33,7 @@
   file(WRITE ${CMAKE_BINARY_DIR}/language_tests/${language}/CMakeLists.txt
     ${text})
   execute_process(
-    COMMAND ${CMAKE_COMMAND} .
+    COMMAND ${CMAKE_COMMAND} . -G "${CMAKE_GENERATOR}"
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}
     RESULT_VARIABLE return_code
     OUTPUT_QUIET
@@ -64,3 +64,4 @@
 #message("CXX_language_works = ${CXX_language_works}")
 #workaround_9220(CXXp CXXp_language_works)
 #message("CXXp_language_works = ${CXXp_language_works}")
+


[CMake] Export target libraries.

[CMake] Export target libraries.

lldb needs this to link against reflection.
Patch by Michael Gottesman, I take no credit.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1870,6 +1870,13 @@
               FILES "${UNIVERSAL_LIBRARY_NAME}"
               DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
               PERMISSIONS ${file_permissions})
+          swift_is_installing_component("${SWIFTLIB_INSTALL_IN_COMPONENT}" is_installing)
+
+          if(NOT is_installing)
+            set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${VARIANT_NAME})
+          else()
+            set_property(GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${VARIANT_NAME})
+          endif()
         endif()

         # If we built static variants of the library, create a lipo target for


[build] Add LTO flag to link options (#32683)

Following the refactoring in #31612, LTO flag was only added to compile
flags -- we need to pass this only when linking.

Addresses rdar://65037856

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -121,6 +121,7 @@
   _compute_lto_flag("${SWIFT_TOOLS_ENABLE_LTO}" _lto_flag_out)
   if (_lto_flag_out)
     target_compile_options(${name} PRIVATE ${_lto_flag_out})
+    target_link_options(${name} PRIVATE ${_lto_flag_out})
   endif()
 endfunction()


Find Homebrew CGAL on Apple Silicon

Find Homebrew CGAL on Apple Silicon

Homebrew on Apple Silicon installs in /opt/homebrew,
not /usr/local, so add this path to those we check
for a CGAL installation.

--- cmake_modules/FindCGAL.cmake
+++ cmake_modules/FindCGAL.cmake
@@ -58,6 +58,7 @@
     /usr/local/share/CGAL/cmake
     /usr/share/CGAL/cmake
     /usr/share/cmake/CGAL
+    /opt/homebrew/lib/cmake/CGAL

     # Read from the CMakeSetup registry entries.  It is likely that
     # CGAL will have been recently built.


Cleaned up custom-vs file

Cleaned up custom-vs file

--- platform/windows/Custom-vs.cmake
+++ platform/windows/Custom-vs.cmake
@@ -60,14 +60,6 @@
 set(CMAKE_16BIT_TYPE "unsigned short")
 set(FAIL_MISSING OFF) # Enable when packaging

-
-# TEMPORARILY USE THE FOLLOWING SELF-BUILT PORTMIDI UNTIL VCPKG PROVIDES ONE
-# THAT IS UP TO DATE
-list(APPEND CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR}\\msvc\\deps")
-set(CMAKE_REQUIRED_INCLUDES ${PROJECT_SOURCE_DIR}\\msvc\\deps\\include)
-
-# END CUSTOM PORTMIDI #
-
 # Disable the following warnings in msvc
 # - C4244 loss of data in conversion
 # - C4267 loss of data in conversion
@@ -78,4 +70,3 @@
 # - C4477 format string type differences
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996 /wd4047 /wd4090 /wd4477")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996 /wd4047 /wd4090 /wd4477 /wd4251")
-


Fix typo

Fix typo

--- ecp5/family.cmake
+++ ecp5/family.cmake
@@ -37,7 +37,7 @@

 add_custom_target(chipdb-${family}-bins DEPENDS ${chipdb_sources} ${chipdb_binaries})

-add_library(chipdb-${family} OBJECT ${ICE40_CHIPDB} ${chipdb_sources})
+add_library(chipdb-${family} OBJECT ${ECP5_CHIPDB} ${chipdb_sources})
 add_dependencies(chipdb-${family} chipdb-${family}-bins)
 target_compile_options(chipdb-${family} PRIVATE -g0 -O0 -w)
 target_compile_definitions(chipdb-${family} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family})


[CMake] remove dead version specific checks

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -1,10 +1,4 @@
 include(CMakeParseArguments)
-
-# Use ${cmake_2_8_12_KEYWORD} instead of KEYWORD in target_link_libraries().
-# These variables are used by LLVM's CMake code.
-set(cmake_2_8_12_INTERFACE INTERFACE)
-set(cmake_2_8_12_PRIVATE PRIVATE)
-
 include(SwiftXcodeSupport)

 macro(swift_common_standalone_build_config_llvm product is_cross_compiling)


Boost::thread -- add rt library, if necessary

* fixes clock_gettime undefined referenced (link error)
* issue https://github.com/smanders/externpro/issues/262

--- projects/use/usexp-boost-config.cmake
+++ projects/use/usexp-boost-config.cmake
@@ -133,6 +133,16 @@
   checkLibraryConcat(pthread pthread_create syslibs)
   checkLibraryConcat(rt shm_open syslibs)
   list(APPEND ${PRJ}_LIBRARIES ${syslibs})
+  checkLibraryConcat(rt clock_gettime additionalThreadLibs)
+  if(DEFINED additionalThreadLibs)
+    get_target_property(libs Boost::thread INTERFACE_LINK_LIBRARIES)
+    if(libs)
+      list(APPEND libs ${additionalThreadLibs})
+    else()
+      set(libs ${additionalThreadLibs})
+    endif()
+    set_target_properties(Boost::thread PROPERTIES INTERFACE_LINK_LIBRARIES "${libs}")
+  endif()
 else()
   if(DEFINED ZLIB_LIBRARIES AND DEFINED BZIP2_LIBRARIES)
     set(iodefs


Prefer the GLEW static library.

Prefer the GLEW static library.

--- cmake/FindGLEW.cmake
+++ cmake/FindGLEW.cmake
@@ -29,8 +29,9 @@
 		${GLEW_ROOT_DIR}/include
 		DOC "The directory where GL/glew.h resides")

+	# Prefer the static library.
 	FIND_LIBRARY( GLEW_LIBRARY
-		NAMES GLEW glew
+		NAMES libGLEW.a GLEW
 		PATHS
 		/usr/lib64
 		/usr/lib


message change

message change

--HG--
branch : v0-8

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -181,7 +181,7 @@
         endif()
     endif()

-    # look for required Ogre dependencies in case of static build and/or threading
+    # look for required Ogre dependencies in case of static build
     if (OGRE_STATIC)
         set(OGRE_DEPS_FOUND TRUE)
         find_package(FreeImage QUIET)


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -23,14 +23,14 @@
 	set(DEPENDS_PATHFILE ${CMAKI_PATH}/../depends.json)
 ENDIF()

-# if(DEFINED CMAKI_DEBUG)
-MESSAGE("CMAKI_PATH = ${CMAKI_PATH}")
-MESSAGE("DEPENDS_PATH = ${DEPENDS_PATH}")
-MESSAGE("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
-MESSAGE("ARTIFACTS_PATH = ${ARTIFACTS_PATH}")
-MESSAGE("DEPENDS_PATHFILE = ${DEPENDS_PATHFILE}")
-# MESSAGE(FATAL_ERROR)
-# endif()
+if(DEFINED CMAKI_DEBUG)
+	MESSAGE("CMAKI_PATH = ${CMAKI_PATH}")
+	MESSAGE("DEPENDS_PATH = ${DEPENDS_PATH}")
+	MESSAGE("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
+	MESSAGE("ARTIFACTS_PATH = ${ARTIFACTS_PATH}")
+	MESSAGE("DEPENDS_PATHFILE = ${DEPENDS_PATHFILE}")
+	MESSAGE(FATAL_ERROR)
+endif()

 IF(WIN32)
 	if(MSVC14)


Switched to using dynamic versions of engine libraries on UWP

--- BuildUtils.cmake
+++ BuildUtils.cmake
@@ -205,9 +205,9 @@

 # Returns default backend library type (static/dynamic) for the current platform
 function(get_backend_libraries_type _LIB_TYPE)
-    if(PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_ANDROID)
+    if(PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_ANDROID OR PLATFORM_UNIVERSAL_WINDOWS)
         set(LIB_TYPE "shared")
-    elseif(PLATFORM_UNIVERSAL_WINDOWS OR PLATFORM_MACOS)
+    elseif(PLATFORM_MACOS)
         set(LIB_TYPE "static")
     elseif(PLATFORM_IOS)
         # Statically link with the engine on iOS.