Testsuite: Port to git

Testsuite: Port to git

Update run_testsuite.cmake to commit git specific branch, commit, and
author information instead of svn branch and revision number.

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -330,102 +330,65 @@
 ENDIF()

 #
-# Query subversion information:
-#
-
-# First try native subversion:
-FIND_PACKAGE(Subversion QUIET)
-SET(_result 1)
-IF(SUBVERSION_FOUND)
-  EXECUTE_PROCESS(
-    COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
-    OUTPUT_QUIET ERROR_QUIET
-    RESULT_VARIABLE _result
-    )
-ENDIF()
-
-IF(${_result} EQUAL 0)
-  Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
-
-ELSE()
-
-  # Umm, no valid subversion info was found, try again with git-svn:
-  FIND_PACKAGE(Git QUIET)
-  IF(GIT_FOUND)
-    GET_FILENAME_COMPONENT(_path "${CTEST_SOURCE_DIRECTORY}" PATH)
-    IF(EXISTS ${_path}/.git/svn)
-      EXECUTE_PROCESS(
-        COMMAND ${GIT_EXECUTABLE} svn info
-        WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
-        OUTPUT_VARIABLE _svn_WC_INFO
-        RESULT_VARIABLE _result
-        OUTPUT_STRIP_TRAILING_WHITESPACE
-        )
-
-      IF(${_result} EQUAL 0)
-        STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
-          "\\2" _svn_WC_URL "${_svn_WC_INFO}")
-        STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
-          "\\2" _svn_WC_ROOT "${_svn_WC_INFO}")
-        STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
-          "\\2" _svn_WC_REVISION "${_svn_WC_INFO}")
-        STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
-          "\\2" _svn_WC_LAST_CHANGED_DATE "${_svn_WC_INFO}")
-      ELSE()
-        SET(_svn_WC_INFO)
-      ENDIF()
-    ENDIF()
-  ENDIF()
-ENDIF()
-
-# If we have a valid (git) svn info use it:
-IF(${_result} EQUAL 0)
-
-  STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
-  STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
-  STRING(REGEX REPLACE "^releases/" "" _branch ${_branch})
-  STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
-  STRING(REGEX REPLACE "/" "" _branch ${_branch})
-
-  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}")
-ENDIF()
-
-#
-# We require valid svn information for build tests:
-#
-
-IF( "${TRACK}" STREQUAL "Build Tests"
-    AND NOT DEFINED _svn_WC_REVISION )
-  MESSAGE(FATAL_ERROR "
-TRACK was set to \"Build Tests\" which requires the source directory to be
-under Subversion version control.
-"
+# Query git information:
+#
+
+FIND_PACKAGE(Git)
+
+IF(NOT GIT_FOUND)
+  MESSAGE(FATAL_ERROR "\nCould not find git. Bailing out.\n"
+   )
+ENDIF()
+
+EXECUTE_PROCESS(
+   COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%H %h %ae"
+   WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
+   OUTPUT_VARIABLE _git_WC_INFO
+   RESULT_VARIABLE _result
+   OUTPUT_STRIP_TRAILING_WHITESPACE
+   )
+
+IF(NOT ${_result} EQUAL 0)
+  MESSAGE(FATAL_ERROR "\nCould not retrieve git information. Bailing out.\n")
+ENDIF()
+
+STRING(REGEX REPLACE "^\"([^ ]+) ([^ ]+) ([^\"]+)\""
+         "\\1" _git_WC_REV "${_git_WC_INFO}")
+
+STRING(REGEX REPLACE "^\"([^ ]+) ([^ ]+) ([^\"]+)\""
+         "\\2" _git_WC_SHORTREV "${_git_WC_INFO}")
+
+STRING(REGEX REPLACE "^\"([^ ]+) ([^ ]+) ([^\"]+)\""
+         "\\3" _git_WC_AUTHOR "${_git_WC_INFO}")
+
+EXECUTE_PROCESS(
+   COMMAND ${GIT_EXECUTABLE} symbolic-ref HEAD
+   WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
+   OUTPUT_VARIABLE _git_WC_BRANCH
+   RESULT_VARIABLE _result
+   OUTPUT_STRIP_TRAILING_WHITESPACE
+   )
+
+STRING(REGEX REPLACE "refs/heads/" ""
+  _git_WC_BRANCH "${_git_WC_BRANCH}")
+
+#
+# Write revision log:
+#
+
+FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
+"###
+#
+#  Git information:
+#    Branch: ${_git_WC_BRANCH}
+#    Commit: ${_git_WC_REV}
+#    Author: ${_git_WC_AUTHOR}
+#
+###"
   )
-ENDIF()
-
-#
-# Write revision log:
-#
-
-IF(DEFINED _svn_WC_REVISION)
-  FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
-"###
-#
-#  SVN information:
-#        SVN_WC_URL:               ${_svn_WC_URL}
-#        SVN_WC_REVISION:          ${_svn_WC_REVISION}
-#        SVN_WC_LAST_CHANGED_DATE: ${_svn_WC_LAST_CHANGED_DATE}
-#
-###"
-    )
-ELSE()
-  FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
-"###
-#
-#  No SVN information available.
-#
-###"
-    )
+
+IF(NOT "${_git_WC_BRANCH}" STREQUAL "")
+  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_git_WC_BRANCH}")
 ENDIF()

 #
@@ -525,15 +488,6 @@
 #                          Run the testsuite:                          #
 #                                                                      #
 ########################################################################
-
-IF("${_branch}" STREQUAL "")
-  #
-  # If we have no branch information, just assume we are on trunk:
-  #
-  SET_PROPERTY(GLOBAL PROPERTY SubProject "trunk")
-ELSE()
-  SET_PROPERTY(GLOBAL PROPERTY SubProject ${_branch})
-ENDIF()

 CTEST_START(Experimental TRACK ${TRACK})

@@ -609,19 +563,17 @@
   ENDIF()
 ENDIF()

-IF(NOT "${_svn_WC_REVISION}" STREQUAL "")
-  FILE(WRITE ${_path}/Update.xml
+FILE(WRITE ${_path}/Update.xml
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
 <Update mode=\"Client\" Generator=\"ctest-${CTEST_VERSION}\">
-    <Site>${CTEST_SITE}</Site>
-      <BuildName>${CTEST_BUILD_NAME}</BuildName>
-        <BuildStamp>${_tag}-${TRACK}</BuildStamp>
-	<UpdateType>SVN</UpdateType>
-	<Revision>${_svn_WC_REVISION}</Revision>
-        <Path>${_branch}</Path>
+<Site>${CTEST_SITE}</Site>
+<BuildName>${CTEST_BUILD_NAME}</BuildName>
+<BuildStamp>${_tag}-${TRACK}</BuildStamp>
+<UpdateType>GIT</UpdateType>
+<Revision>${_git_WC_SHORTREV}</Revision>
+<Path>${_git_WC_BRANCH}</Path>
 </Update>"
-    )
-ENDIF()
+  )

 #
 # And finally submit:


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -112,6 +112,7 @@
 Comment[sv]=Phonon Gstreamer-gränssnitt
 Comment[th]=โปรแกรมเบื้องหลัง GStreamer ของ Phonon
 Comment[tr]=Phonon GStreamer arka ucu
+Comment[ug]=Phonon GStreamer نىڭ ئارقائۇچى
 Comment[uk]=Модуль використання GStreamer у Phonon
 Comment[x-test]=xxPhonon GStreamer backendxx
 Comment[zh_CN]=Phonon GStreamer 后端


Backport PRIVATE_DEPENDENCIES fix for  install_basic_package_files

Backport https://github.com/robotology/ycm/pull/339

--- cmake/InstallBasicPackageFiles.cmake
+++ cmake/InstallBasicPackageFiles.cmake
@@ -614,7 +614,7 @@
   endif()

   unset(PACKAGE_DEPENDENCIES)
-  if(DEFINED _IBPF_DEPENDENCIES)
+  if(DEFINED _IBPF_DEPENDENCIES OR (DEFINED _IBPF_PRIVATE_DEPENDENCIES AND _need_private_deps))
     set(PACKAGE_DEPENDENCIES "#### Expanded from @PACKAGE_DEPENDENCIES@ by install_basic_package_files() ####\n\ninclude(CMakeFindDependencyMacro)\n")

     foreach(_dep ${_IBPF_DEPENDENCIES})


Tcmalloc off.

Tcmalloc off.

--- indra/cmake/GooglePerfTools.cmake
+++ indra/cmake/GooglePerfTools.cmake
@@ -3,8 +3,8 @@

 # If you want to enable or disable TCMALLOC in viewer builds, this is the place.
 # set ON or OFF as desired.
-set (USE_TCMALLOC ON)
-#set (USE_TCMALLOC OFF) # <FS:ND> tcmalloc removal
+#set (USE_TCMALLOC ON)
+set (USE_TCMALLOC OFF) # <FS:ND> tcmalloc removal

 if (STANDALONE)
   include(FindGooglePerfTools)


ARROW-6635: [C++] Disable glog integration by default

Closes #5829 from pitrou/ARROW-6635-glog-off-by-default and squashes the following commits:

10693883b <Antoine Pitrou> ARROW-6635:  Disable glog integration by default

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: François Saint-Jacques <76801b7d5fe2c448a8401d2246372be49d372480@gmail.com>

--- cpp/cmake_modules/DefineOptions.cmake
+++ cpp/cmake_modules/DefineOptions.cmake
@@ -233,7 +233,7 @@
   define_option(ARROW_WITH_BACKTRACE "Build with backtrace support" ON)

   define_option(ARROW_USE_GLOG "Build libraries with glog support for pluggable logging"
-                ON)
+                OFF)

   define_option(ARROW_WITH_BROTLI "Build with Brotli compression" OFF)
   define_option(ARROW_WITH_BZ2 "Build with BZ2 compression" OFF)


Fixed syntax error in parse_cubin.cmake. I don't know why this didn't come up before...

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@1218 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/parse_cubin.cmake
+++ src/CMake/cuda/parse_cubin.cmake
@@ -98,8 +98,8 @@

   ENDFOREACH(line)

-ELSE(${depend_text} MATCHES ".+")
+ELSE(${file_text} MATCHES ".+")
   # MESSAGE("FOUND NO DEPENDS")
-ENDIF(${depend_text} MATCHES ".+")
+ENDIF(${file_text} MATCHES ".+")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


build

build

--- modules/vld.cmake
+++ modules/vld.cmake
@@ -1,4 +1,4 @@
-if(NOT TARGET vld)
+if(WIN32 AND NOT TARGET vld)

   # Try to find VLD library and include path.
   # Once done this will define


trim whitespace

trim whitespace

--- lib/OpenCogAtomTypes.cmake
+++ lib/OpenCogAtomTypes.cmake
@@ -36,7 +36,7 @@
 ENDIF (NOT PYTHON_FILE)

-# Check if this is for opencog/atomspace directory. If so, do not reference opencog::classserver()
+# Check if this is for opencog/atomspace directory. If so, do not reference opencog::classserver()
 # to avoid infinit recursivity in ClassServer constructor.
 STRING(REGEX MATCH ".*/opencog/atomspace" OPENCOG_ATOMSPACE_MATCHED "${CMAKE_CURRENT_SOURCE_DIR}")
 IF (OPENCOG_ATOMSPACE_MATCHED)
@@ -55,9 +55,9 @@

 # We need to touch the class-server before doing anything.
 # This is in order to guarantee that the main atomspace types
-# get created before other derived types.
+# get created before other derived types.
 #
-# There's still a potentially nasty bug here: if some third types.script
+# There's still a potentially nasty bug here: if some third types.script
 # file depends on types defined in a second file, but the third initializer
 # runs before the second, then any atoms in that third file that inherit
 # from the second will get a type of zero.  This will crash code later on.
@@ -139,7 +139,7 @@
                 ENDIF (NOT ${C} STREQUAL "_")
             ENDFOREACH(I RANGE ${LIST_LENGTH})
         ENDIF (TYPE_NAME STREQUAL "")
-
+
         STRING(REGEX REPLACE "([a-zA-Z]*)(Link|Node)$" "\\1" SHORT_NAME ${TYPE_NAME})
         MESSAGE(STATUS "Atom type name: ${TYPE_NAME} ${SHORT_NAME}")


Fix alignment issue locally

Fix alignment issue locally

Former-commit-id: f17eb8952bf5929dfe5d06cbf98c437dcd07b6cd

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -188,8 +188,8 @@
 #            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MAX_ALIGN_BYTES=16)  # May work to fix CERES segfault?
         else()
             message(STATUS "Applying special Eigen compile definitions for general machines: EIGEN_MAX_ALIGN_BYTES=16")
-            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MALLOC_ALREADY_ALIGNED=0) # May work to fix CERES segfaults!!!
-            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MAX_ALIGN_BYTES=16)  # May work to fix CERES segfault?
+#            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MALLOC_ALREADY_ALIGNED=0) # May work to fix CERES segfaults!!!
+#            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MAX_ALIGN_BYTES=16)  # May work to fix CERES segfault?
         endif()
     else()
         message(FATAL_ERROR "Undefined target: CONAN_PKG::eigen")
@@ -204,11 +204,7 @@
         target_link_libraries(dmrg-eig PUBLIC CONAN_PKG::spdlog)
         target_link_libraries(dmrg-arp PUBLIC CONAN_PKG::spdlog)
     endif()
-    if(TARGET CONAN_PKG::Eigen3)
-        target_link_libraries(dmrg-main PUBLIC CONAN_PKG::Eigen3)
-        target_link_libraries(dmrg-eig PUBLIC CONAN_PKG::Eigen3)
-        target_link_libraries(dmrg-opt PUBLIC CONAN_PKG::Eigen3)
-    elseif(TARGET CONAN_PKG::eigen)
+    if(TARGET CONAN_PKG::eigen)
         target_link_libraries(dmrg-main PUBLIC CONAN_PKG::eigen)
         target_link_libraries(dmrg-eig PUBLIC CONAN_PKG::eigen)
         target_link_libraries(dmrg-opt PUBLIC CONAN_PKG::eigen)


[Conf] Added a backward compatibility clause in FindBoost.cmake

--- config/FindBoost.cmake
+++ config/FindBoost.cmake
@@ -1487,11 +1487,13 @@
     INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB")
 endif()

-cmake_policy(GET CMP0074 _Boost_CMP0074)
-if(NOT "x${_Boost_CMP0074}x" STREQUAL "xNEWx")
-  _Boost_CHECK_SPELLING(Boost_ROOT)
-endif()
-unset(_Boost_CMP0074)
+if(POLICY CMP0074)
+  cmake_policy(GET CMP0074 _Boost_CMP0074)
+  if(NOT "x${_Boost_CMP0074}x" STREQUAL "xNEWx")
+    _Boost_CHECK_SPELLING(Boost_ROOT)
+  endif()
+  unset(_Boost_CMP0074)
+endif(POLICY CMP0074)
 _Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
 _Boost_CHECK_SPELLING(Boost_INCLUDEDIR)


rest-backend: add origin and min-version to FindCppCMS.cmake

--- cmake/Modules/FindCppCMS.cmake
+++ cmake/Modules/FindCppCMS.cmake
@@ -1,3 +1,6 @@
+# Script created on basis of
+# https://theogit.fmi.uni-stuttgart.de/bahrdtdl/oscar/blob/8c6d602d044d726aa3d56138100a14f3d6f4c22a/cmake/FindCPPCMS.cmake
+#
 # Find the cppcms includes and library and the booster include and library
 #
 #  CPPCMS_INCLUDE_DIR  - Where to find cppcms include sub-directory.
@@ -15,8 +18,8 @@
 find_path (CPPCMS_INCLUDE_DIR cppcms/application.h PATHS /usr/include /usr/local/include)
 find_path (BOOSTER_INCLUDE_DIR booster/assert.h PATHS /usr/include /usr/local/include)

-find_library (CPPCMS_LIBRARY NAMES cppcms PATHS /usr/lib /usr/lib64 /usr/local/lib)
-find_library (BOOSTER_LIBRARY NAMES booster PATHS /usr/lib /usr/lib64 /usr/local/lib)
+find_library (CPPCMS_LIBRARY NAMES cppcms PATHS /usr/lib /usr/lib64 /usr/local/lib DOC "version 1.0 or greater is required")
+find_library (BOOSTER_LIBRARY NAMES booster PATHS /usr/lib /usr/lib64 /usr/local/lib DOC "version 1.45 or greater is required")

 # Handle the QUIETLY and REQUIRED arguments and set CPPCMS_FOUND to


remove find libsndfile

remove find libsndfile

--- cmake/Modules/FindCsound.cmake
+++ cmake/Modules/FindCsound.cmake
@@ -3,8 +3,6 @@
 #  CSOUND_FOUND - System has the Csound l;ibrary
 #  CSOUND_INCLUDE_DIRS - The Csound include directories.
 #  CSOUND_LIBRARIES - The libraries needed to use the Csound library.
-
-FIND(sndfile)

 if(APPLE)
 find_path(CSOUND_INCLUDE_DIR csound.h HINTS /Library/Frameworks/CsoundLib64.framework/Headers


cmake: Only set toolchain when APPLE

cmake: Only set toolchain when APPLE

--- cmake/i686-elf-toolchain.cmake
+++ cmake/i686-elf-toolchain.cmake
@@ -1,3 +1,4 @@
+if(APPLE) # Only use toolchain for macaroni
 # This is not an actual crosscompile toolchain
 # but it do make it possible to compile on Mac with
 #
@@ -37,3 +38,4 @@
 #
 # This can be done with /etc/install_binutils.sh
 #set(_CMAKE_TOOLCHAIN_PREFIX ${target}-)
+endif()


cmake: extend linker snippets for pinned sections

This extends the linker snippet code to cover pinned
sections.

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- cmake/modules/extensions.cmake
+++ cmake/modules/extensions.cmake
@@ -1148,6 +1148,11 @@
 #    RAMFUNC_SECTION Inside the RAMFUNC RAMABLE_REGION GROUP, not initialized.
 #    SECTIONS      Near the end of the file. Don't use this when linking into
 #                  RAMABLE_REGION, use RAM_SECTIONS instead.
+#    PINNED_RODATA Similar to RODATA but pinned in memory.
+#    PINNED_RAM_SECTIONS
+#                  Similar to RAM_SECTIONS but pinned in memory.
+#    PINNED_DATA_SECTIONS
+#                  Similar to DATA_SECTIONS but pinned in memory.
 # <sort_key> is an optional key to sort by inside of each location. The key must
 #    be alphanumeric, and the keys are sorted alphabetically. If no key is
 #    given, the key 'default' is used. Keys are case-sensitive.
@@ -1191,6 +1196,10 @@
   set(rodata_path        "${snippet_base}/snippets-rodata.ld")
   set(ramfunc_path       "${snippet_base}/snippets-ramfunc-section.ld")

+  set(pinned_ram_sections_path  "${snippet_base}/snippets-pinned-ram-sections.ld")
+  set(pinned_data_sections_path "${snippet_base}/snippets-pinned-data-sections.ld")
+  set(pinned_rodata_path        "${snippet_base}/snippets-pinned-rodata.ld")
+
   # Clear destination files if this is the first time the function is called.
   get_property(cleared GLOBAL PROPERTY snippet_files_cleared)
   if (NOT DEFINED cleared)
@@ -1202,6 +1211,9 @@
     file(WRITE ${rwdata_path} "")
     file(WRITE ${rodata_path} "")
     file(WRITE ${ramfunc_path} "")
+    file(WRITE ${pinned_ram_sections_path} "")
+    file(WRITE ${pinned_data_sections_path} "")
+    file(WRITE ${pinned_rodata_path} "")
     set_property(GLOBAL PROPERTY snippet_files_cleared true)
   endif()

@@ -1222,6 +1234,12 @@
     set(snippet_path "${rodata_path}")
   elseif("${location}" STREQUAL "RAMFUNC_SECTION")
     set(snippet_path "${ramfunc_path}")
+  elseif("${location}" STREQUAL "PINNED_RAM_SECTIONS")
+    set(snippet_path "${pinned_ram_sections_path}")
+  elseif("${location}" STREQUAL "PINNED_DATA_SECTIONS")
+    set(snippet_path "${pinned_data_sections_path}")
+  elseif("${location}" STREQUAL "PINNED_RODATA")
+    set(snippet_path "${pinned_rodata_path}")
   else()
     message(fatal_error "Must choose valid location for linker snippet.")
   endif()


CMake: Added configuration of test scripts in the bin/ directory.

This adds some helper script templates to the CMake build.
These include simple bash wrappers like `bin/mesos-master.sh`
and similar wrappers which can be found in the autotools build.

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

--- cmake/MesosConfigure.cmake
+++ cmake/MesosConfigure.cmake
@@ -178,3 +178,44 @@

 set(MESOS_PROTOBUF_TARGET mesos-protobufs
     CACHE STRING "Library of protobuf definitions used by Mesos")
+
+# MESOS SCRIPT CONFIGURATION.
+#############################
+if (NOT WIN32)
+  # Create build bin/ directory. We will place configured scripts here.
+  file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+  file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/bin/tmp")
+
+  # Define the variables required to configure these scripts.
+  set(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
+  set(abs_top_builddir "${CMAKE_BINARY_DIR}")
+  set(VERSION "${PACKAGE_VERSION}")
+
+  # Find all scripts to configure. The scripts are in the bin/ directory, and
+  # end with the `.in` suffix. For example `mesos.sh.in`.
+  file(GLOB_RECURSE BIN_FILES "${CMAKE_SOURCE_DIR}/bin/*.in")
+  foreach (BIN_FILE ${BIN_FILES})
+    # Strip the `.in` suffix off. This will be the script's name in the build
+    # bin/ directory. For example, `mesos.sh.in` -> `mesos.sh`.
+    string(REGEX MATCH "(.*).in$" MATCH ${BIN_FILE})
+    get_filename_component(OUTPUT_BIN_FILE "${CMAKE_MATCH_1}" NAME)
+
+    # Configure. Because CMake does not support configuring and setting
+    # permissions, we do this in a two-step process: we first configure the
+    # file, placing the configured file in a temporary directory, and then we
+    # "copy" the configured file to the build `bin` directory, setting the
+    # permissions as we go.
+    #
+    # NOTE: We use the `@ONLY` argument here to avoid trying to substitute
+    # the value of `${@}`, which we frequently use in the scripts.
+    configure_file(
+      ${BIN_FILE}
+      "${CMAKE_BINARY_DIR}/bin/tmp/${OUTPUT_BIN_FILE}"
+      @ONLY)
+
+    file(COPY "${CMAKE_BINARY_DIR}/bin/tmp/${OUTPUT_BIN_FILE}"
+      DESTINATION "${CMAKE_BINARY_DIR}/bin"
+      FILE_PERMISSIONS WORLD_EXECUTE OWNER_READ OWNER_WRITE)
+  endforeach (BIN_FILE)
+  file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/bin/tmp")
+endif (NOT WIN32)


New Version

New Version

--- cmake/OptimumVersion.cmake
+++ cmake/OptimumVersion.cmake
@@ -1,5 +1,5 @@
 set(OPTIMUM_VERSION_MAJOR "0")
-set(OPTIMUM_VERSION_MINOR "1")
+set(OPTIMUM_VERSION_MINOR "9")
 set(OPTIMUM_VERSION_PATCH "0")

 set(OPTIMUM_VERSION "${OPTIMUM_VERSION_MAJOR}.${OPTIMUM_VERSION_MINOR}.${OPTIMUM_VERSION_PATCH}")


qi_create_lib: do not document INTERNAL keyword

Not used anymore anyway

Change-Id: I3ea534cc7231f22f5cb14b0b00bc9625f73eed94
Reviewed-on: http://gerrit.aldebaran.lan/40615
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -178,19 +178,6 @@
 #
 # Warning ! This is quite not the standard CMake behavior
 #
-# **Internal libs**
-#
-# If you use ``INTERNAL``, you will not be able to use the library after it
-# has been installed, even after ``qi_stage_lib()`` has been called
-#
-# Note that you may want to:
-#
-# * make sure no header install rules are created either
-# * use NO_INSTALL if your library is not needed at runtime either
-# * not stage the library at all
-#
-# You can by-pass this behavior by setting ``QI_INSTALL_INTERNAL`` to "ON"
-#
 # \arg:name the target name
 # \argn: sources files, like the SRC group, argn and SRC will be merged
 # \flag:STATIC force a static library
@@ -203,8 +190,6 @@
 #                        Warning: you will NOT be able to create install rules
 #                          for this target.
 # \flag:NO_RPATH Do not set a rpath to $ORIGIN/..lib when linking on linux.
-# \flag: INTERNAL  See below
-#
 # \flag:NO_FPIC Do not set -fPIC on static libraries (will be set for shared lib by CMake anyway)
 # \param:SUBFOLDER The destination subfolder. The install rules generated will be
 #                  sdk/lib/<subfolder>


Update find cublas so it search default path if needed. (#9149)

--- cmake/utils/FindCUDA.cmake
+++ cmake/utils/FindCUDA.cmake
@@ -89,12 +89,16 @@
         ${CUDA_TOOLKIT_ROOT_DIR}/lib64
         ${CUDA_TOOLKIT_ROOT_DIR}/lib
         NO_DEFAULT_PATH)
+      # search default path if cannot find cublas in non-default
+      find_library(CUDA_CUBLAS_LIBRARY cublas)
       find_library(CUDA_CUBLASLT_LIBRARY
         NAMES cublaslt cublasLt
         PATHS
         ${CUDA_TOOLKIT_ROOT_DIR}/lib64
         ${CUDA_TOOLKIT_ROOT_DIR}/lib
         NO_DEFAULT_PATH)
+      # search default path if cannot find cublaslt in non-default
+      find_library(CUDA_CUBLASLT_LIBRARY NAMES cublaslt cublasLt)
     endif(MSVC)

     # find cuDNN


fix cmake script

fix cmake script

--- cmake/vSMCFindThread.cmake
+++ cmake/vSMCFindThread.cmake
@@ -33,8 +33,10 @@
 int main ()
 {
     int r;
-    vsmc::thread::parallel_for(vsmc::thread::BlockedRange<int>(0, 100), say());
-    vsmc::thread::parallel_sum(vsmc::thread::BlockedRange<int>(0, 100), sum(), r);
+    vsmc::thread::parallel_for(
+        vsmc::thread::BlockedRange<int>(0, 100), say());
+    vsmc::thread::parallel_accumulate(
+        vsmc::thread::BlockedRange<int>(0, 100), sum(), r);
     assert(r == 4950);
     return 0;
 }


Updated metis path for library

Updated metis path for library

--- cmake-modules/FindMETIS.cmake
+++ cmake-modules/FindMETIS.cmake
@@ -118,7 +118,7 @@
     set(metis_lib_names "metis")

     # we look into petsc externalpackage (for 3.5.2 version, to be improved)
-    set(METIS_LIBRARY_DIR "${PETSC_DIR}/${PETSC_ARCH}/externalpackages/metis-5.1.0-p1/build/libmetis/")
+    set(METIS_LIBRARY_DIR "${PETSC_DIR}/${PETSC_ARCH}/externalpackages/git.metis/build/libmetis/")

     if (METIS_LIBRARY_DIR)


Fixed typos.

Fixed typos.

Signed-off-by: Etienne Schmitt <25d5031dc1a1d443222aec9a4e916501ae23c255@inria.fr>

--- cmake/CheckSIMDFeatures.cmake
+++ cmake/CheckSIMDFeatures.cmake
@@ -222,10 +222,10 @@
 			message(STATUS "avx support detected.")
 			set(CGOGN_SSE_FLAGS ${CGOGN_SSE_FLAGS} -mavx -mfpmath=sse)
 		elseif(HAVE_SSE4_2_EXTENSIONS)
-			message(STATUS "ss4.2 support detected.")
+			message(STATUS "sse4.2 support detected.")
 			set(CGOGN_SSE_FLAGS ${CGOGN_SSE_FLAGS} -msse4.2 -mfpmath=sse)
 		elseif(HAVE_SSE4_1_EXTENSIONS)
-			message(STATUS "ss4.1 support detected.")
+			message(STATUS "sse4.1 support detected.")
 			set(CGOGN_SSE_FLAGS ${CGOGN_SSE_FLAGS} -msse4.1 -mfpmath=sse)
 		elseif(HAVE_SSSE3_EXTENSIONS)
 			message(STATUS "sse3 support detected.")


cmake: Move ) out of quotes

cmake: Move ) out of quotes

This fixes the cmake invocation.

Signed-off-by: Rafael Ávila de Espíndola <1975039f9046bf513b77c0c5639a0efc25f00e7f@scylladb.com>
Message-Id: <20190501174115.17395-1-1975039f9046bf513b77c0c5639a0efc25f00e7f@scylladb.com>

--- cmake/FindStdFilesystem.cmake
+++ cmake/FindStdFilesystem.cmake
@@ -78,5 +78,5 @@

   set_target_properties (StdFilesystem::filesystem
     PROPERTIES
-      INTERFACE_LINK_LIBRARIES "${StdFilesystem_LIBRARIES})"
+      INTERFACE_LINK_LIBRARIES "${StdFilesystem_LIBRARIES}")
 endif ()


Remove FLANN_STATIC macro

Remove FLANN_STATIC macro

Remove unnecessary macro (FLANN_STATIC).

--- cmake/Modules/FindFLANN.cmake
+++ cmake/Modules/FindFLANN.cmake
@@ -50,7 +50,6 @@
 if(FLANN_USE_STATIC)
   set(FLANN_RELEASE_NAME flann_cpp_s)
   set(FLANN_DEBUG_NAME flann_cpp_s-gd)
-  set(FLANN_DEFINITIONS ${FLANN_DEFINITIONS} "FLANN_STATIC")
 else()
   set(FLANN_RELEASE_NAME flann_cpp)
   set(FLANN_DEBUG_NAME flann_cpp-gd)


Improve the Log4C module.

Improve the Log4C module.

--- cmake/Modules/FindLog4C.cmake
+++ cmake/Modules/FindLog4C.cmake
@@ -16,7 +16,7 @@

 if (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
   # in cache already
-  set(LOG4C_FOUND TRUE)
+  set(LOG4C_FOUND TRUE PARENT_SCOPE)
 else (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)

   find_path(LOG4C_INCLUDE_DIR
@@ -28,7 +28,6 @@
       /opt/local/include
       /sw/include
   )
-  mark_as_advanced(LOG4C_INCLUDE_DIR)

   find_library(LOG4C_LIBRARY
     NAMES
@@ -42,7 +41,7 @@
   mark_as_advanced(LOG4C_LIBRARY)

   if (LOG4C_LIBRARY)
-    set(LOG4C_FOUND TRUE CACHE INTERNAL "Wether the log4c library has been found" FORCE)
+    set(LOG4C_FOUND TRUE PARENT_SCOPE)
   endif (LOG4C_LIBRARY)

   set(LOG4C_INCLUDE_DIRS
@@ -60,16 +59,8 @@
      set(LOG4C_FOUND TRUE)
   endif (LOG4C_INCLUDE_DIRS AND LOG4C_LIBRARIES)

-  if (LOG4C_FOUND)
-    if (NOT Log4C_FIND_QUIETLY)
-      message(STATUS "Found Log4C: ${LOG4C_LIBRARIES}")
-    endif (NOT Log4C_FIND_QUIETLY)
-  else (LOG4C_FOUND)
-    if (Log4C_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find Log4C")
-    endif (Log4C_FIND_REQUIRED)
-  endif (LOG4C_FOUND)
-
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(Log4C DEFAULT_MSG LOG4C_LIBRARIES LOG4C_INCLUDE_DIRS)
   # show the LOG4C_INCLUDE_DIRS and LOG4C_LIBRARIES variables only in the advanced view
   mark_as_advanced(LOG4C_INCLUDE_DIRS LOG4C_LIBRARIES)


error: trying to fix LibAddLib to get macro name

--- cmake/Modules/LibAddLib.cmake
+++ cmake/Modules/LibAddLib.cmake
@@ -20,9 +20,17 @@
 		add_cppheaders (ARG_SOURCES)
 	endif (ARG_CPP)

+	set_additional_compile_definitions (${name})
+
 	if (BUILD_SHARED)
 		add_library (elektra-${name} SHARED ${ARG_SOURCES})
 		add_dependencies (elektra-${name} kdberrors_generated elektra_error_codes_generated ${ARG_LINK_ELEKTRA})
+
+		set_property (TARGET elektra-${name}
+			APPEND
+			PROPERTY COMPILE_DEFINITIONS
+			${ADDITIONAL_COMPILE_DEFINITIONS}
+			)

 		target_link_libraries (elektra-${name} elektra-core ${ARG_LINK_ELEKTRA})
 	endif (BUILD_SHARED)
@@ -37,18 +45,17 @@
 		      PROPERTY "elektra-extension_LIBRARIES"
 			       elektra-${name})

-	set_additional_compile_definitions(${name})
+	if (BUILD_SHARED)
+		set_property (TARGET elektra-${name}
+			APPEND
+			PROPERTY COMPILE_DEFINITIONS
+			${ADDITIONAL_COMPILE_DEFINITIONS}
+			)

-	set_property (TARGET elektra-${name}
-		APPEND
-		PROPERTY COMPILE_DEFINITIONS
-			${ADDITIONAL_COMPILE_DEFINITIONS}
-)
-
-	if (BUILD_SHARED)
 		target_link_libraries (elektra-${name} ${ARG_LINK_LIBRARIES})

 		install (TARGETS elektra-${name} DESTINATION lib${LIB_SUFFIX} EXPORT ElektraTargetsLibelektra)
 	endif (BUILD_SHARED)

+	unset (ADDITIONAL_COMPILE_DEFINITIONS)
 endfunction ()


Fix logic error in OpenCVFindLibsGUI.cmake

When with_gtk is selected but GTK3 is not present the current logic
fails to check for GTK2. This edit corrects this.

--- cmake/OpenCVFindLibsGUI.cmake
+++ cmake/OpenCVFindLibsGUI.cmake
@@ -44,7 +44,8 @@
   if(NOT WITH_GTK_2_X)
     CHECK_MODULE(gtk+-3.0 HAVE_GTK3)
     set(HAVE_GTK HAVE_GTK3)
-  else()
+  endif()
+  if(NOT HAVE_GTK)
     CHECK_MODULE(gtk+-2.0 HAVE_GTK)
     if(HAVE_GTK AND (ALIASOF_gtk+-2.0_VERSION VERSION_LESS MIN_VER_GTK))
       message (FATAL_ERROR "GTK support requires a minimum version of ${MIN_VER_GTK} (${ALIASOF_gtk+-2.0_VERSION} found)")


RollBACK the openblas.cmake

RollBACK the openblas.cmake

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -115,7 +115,11 @@
 # linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)
 SET(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/cblas_dummy.c)
 FILE(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
-ADD_LIBRARY(cblas STATIC ${dummyfile})
+IF(${CBLAS_PROVIDER} EQUAL MKLML)
+    ADD_LIBRARY(cblas SHARED ${dummyfile})
+ELSE()
+    ADD_LIBRARY(cblas STATIC ${dummyfile})
+ENDIF()
 TARGET_LINK_LIBRARIES(cblas ${CBLAS_LIBRARIES})

 IF(NOT ${CBLAS_FOUND})


Fix protoc dependency.

Fix protoc dependency.

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -38,6 +38,10 @@

 set(PROTOBUF_PROTOC_EXECUTABLE ${PROTOFUB_INSTALL_DIR}/bin/protoc)
 list(APPEND PROTOFUB_BUILD_BYPRODUCTS ${PROTOBUF_PROTOC_EXECUTABLE})
+add_executable(protoc IMPORTED)
+set_property(TARGET protoc PROPERTY IMPORTED_LOCATION
+             ${PROTOBUF_PROTOC_EXECUTABLE})
+add_dependencies(protoc ${PROTOBUF_TARGET})

 include (ExternalProject)
 ExternalProject_Add(${PROTOBUF_TARGET}


cmake/modules/FindVIGRA.cmake: Remove lingering references to impex.

--- cmake/modules/FindVIGRA.cmake
+++ cmake/modules/FindVIGRA.cmake
@@ -3,8 +3,8 @@
 # It sets the following variables:
 #  VIGRA_FOUND              - Set to false, or undefined, if vigra isn't found.
 #  VIGRA_INCLUDE_DIR        - Vigra include directory.
-#  VIGRA_VIGRANUMPYCORE_LIBRARY      - Vigra's impex library
-#  VIGRA_VIGRANUMPYCORE_LIBRARY_DIR  - path to Vigra impex library
+#  VIGRA_VIGRANUMPYCORE_LIBRARY      - Vigra's vigranumpycore library
+#  VIGRA_VIGRANUMPYCORE_LIBRARY_DIR  - path to Vigra vigranumpycore library

 # configVersion.hxx only present, after build of Vigra


link post_radii app with CGAL library dir to allow linking in debug mode

--- cmake/modules/find_cgal.cmake
+++ cmake/modules/find_cgal.cmake
@@ -56,6 +56,10 @@
 find_library(CGAL_LIBRARY NAMES ${CGAL_LIBRARY_FILENAME} PATHS ${CGAL_LIBRARY_SEARCH_DIRS})
 find_library(CGAL_CORE_LIBRARY NAMES ${CGAL_CORE_LIBRARY_FILENAME} PATHS ${CGAL_LIBRARY_SEARCH_DIRS})

+get_filename_component(_CGAL_LIBRARY_DIR ${CGAL_LIBRARY} PATH)
+SET(CGAL_LIBRARY_DIR "${_CGAL_LIBRARY_DIR}/" CACHE PATH "Sets path to CGAL libraries")
+
+
 IF (UNIX)
   UNSET(CGAL_CORE_LIBRARY_DEBUG)
   UNSET(CGAL_LIBRARY_DEBUG)


hack to fix MSVC not being able to find BuildInfo

--- cmake/scripts/buildinfo.cmake
+++ cmake/scripts/buildinfo.cmake
@@ -47,6 +47,10 @@
 set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp")
 set(OUTFILE "${ETH_DST_DIR}/BuildInfo.h")

+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+	set(OUTFILE "${ETH_DST_DIR}/CMakeFiles/BuildInfo.h")
+endif()
+
 message("ETH_FATDB: ${ETH_FATDB}")
 configure_file("${INFILE}" "${TMPFILE}")


improving findAndInstallDependencies

improving findAndInstallDependencies

--- misc/CMake/findAndInstallDependencies.cmake
+++ misc/CMake/findAndInstallDependencies.cmake
@@ -16,10 +16,18 @@
 macro(find_and_install_dependencies EXEC_NAME)
   if(Install_Dependencies)

-    if(WIN32)
-	  # if using Visual studio add ${CMAKE_BUILD_TYPE}/ dir between RUNTIME_DIR and EXEC_NAME
-      set(APP "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/${EXEC_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
-      set(GLOB_DIR "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
+    if(WIN32)
+      if (EXISTS "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/${EXEC_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
+        set(APP "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/${EXEC_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
+        set(GLOB_DIR "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
+      else()
+        if (EXISTS "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/${CMAKE_BUILD_TYPE}/${EXEC_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
+          set(APP "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/${CMAKE_BUILD_TYPE}/${EXEC_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
+          set(GLOB_DIR "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/${CMAKE_BUILD_TYPE}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
+        else()
+          message(FATAL_ERROR "Could not find app ${EXEC_NAME}")
+        endif()
+      endif()
     else(WIN32)
       set(APP "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/${EXEC_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
       set(GLOB_DIR "${CMAKE_BINARY_DIR}/${RUNTIME_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")


Make info messages seem less important (#788)

--- deps/drassil/cmake-utils/utils.cmake
+++ deps/drassil/cmake-utils/utils.cmake
@@ -122,7 +122,7 @@

 MACRO(CU_RUN_HOOK hook_name)
   CU_GET_GLOBAL(${hook_name})
-  message("Running cmake hook: ${hook_name}")
+  message(STATUS "Running cmake hook: ${hook_name}")
   if (${hook_name})
       set(HOOK_ARRAY ${${hook_name}})
       FOREACH (hook_file ${HOOK_ARRAY})
@@ -130,7 +130,7 @@
           include("${hook_file}")
       ENDFOREACH()
   else()
-      message("No hooks registered for ${hook_name}")
+      message(STATUS "No hooks registered for ${hook_name}")
   endif()
 ENDMACRO()


[x86/Linux] Fix pow of tryrun (#11099)

[x86/Linux] Fix pow of tryrun (#11099)

x86/Linux has compatible math pow()
This will fix CoreFX System.Tests.MathFTests.Pow() failures

--- cross/x86/tryrun.cmake
+++ cross/x86/tryrun.cmake
@@ -55,7 +55,7 @@
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_COMPATIBLE_POW_EXITCODE
-     1
+     0
      CACHE STRING "Result from TRY_RUN" FORCE)

 SET( HAVE_VALID_NEGATIVE_INF_POW_EXITCODE


add missing newline

add missing newline

--- include/librealsense2/utilities/easylogging/easyloggingpp.cmake
+++ include/librealsense2/utilities/easylogging/easyloggingpp.cmake
@@ -8,4 +8,4 @@
     ${CMAKE_CURRENT_LIST_DIR}/shared-init.cpp
 )

-source_group( "EasyLogging++" FILES ${ELPP_SOURCES} )+source_group( "EasyLogging++" FILES ${ELPP_SOURCES} )


had a freeloader

had a freeloader

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -1,53 +0,0 @@
-# - Locate CEGUI library
-# This module defines
-#  CEGUI_LIBRARY, the library to link against
-#  CEGUI_FOUND, if false, do not try to link to CEGUI
-#  CEGUI_INCLUDE_DIRS, where to find headers.
-
-IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
-  # in cache already
-  SET(CEGUI_FIND_QUIETLY TRUE)
-ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
-
-
-FIND_PATH(CEGUI_INCLUDE_DIRS
-  CEGUI
-  PATHS
-  $ENV{CEGUI_DIR}/include
-  /usr/local/include
-  /usr/include
-  /sw/include
-  /opt/local/include
-  /opt/csw/include
-  /opt/include
-  PATH_SUFFIXES cegui CEGUI
-)
-
-FIND_LIBRARY(CEGUI_LIBRARY
-  NAMES CEGUIBase
-  PATHS
-  $ENV{CEGUI_DIR}/lib
-  /usr/local/lib
-  /usr/lib
-  /usr/local/X11R6/lib
-  /usr/X11R6/lib
-  /sw/lib
-  /opt/local/lib
-  /opt/csw/lib
-  /opt/lib
-  /usr/freeware/lib64
-)
-
-GET_FILENAME_COMPONENT(CEGUI_LIB_DIR ${CEGUI_LIBRARY} PATH CACHE)
-
-IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
-  SET(CEGUI_FOUND "YES")
-  SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
-  IF(NOT CEGUI_FIND_QUIETLY)
-    MESSAGE(STATUS "Found CEGUI: ${CEGUI_LIBRARY}")
-  ENDIF(NOT CEGUI_FIND_QUIETLY)
-ELSE(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
-  IF(NOT CEGUI_FIND_QUIETLY)
-    MESSAGE(STATUS "Warning: Unable to find CEGUI!")
-  ENDIF(NOT CEGUI_FIND_QUIETLY)
-ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)


Add build type in package name

Add build type in package name

--- cmake/Packaging.cmake
+++ cmake/Packaging.cmake
@@ -9,6 +9,7 @@
 set(CPACK_PACKAGE_VERSION_MAJOR "2")
 set(CPACK_PACKAGE_VERSION_MINOR "0")
 set(CPACK_PACKAGE_VERSION_PATCH "0")
+set(CPACK_PACKAGE_NAME "${SFEMOVIE_LIB}-${CMAKE_BUILD_TYPE}")

 if (NOT WINDOWS)
 	set(CPACK_SET_DESTDIR TRUE)


grammar

grammar

--- cmake/UseCyclus.cmake
+++ cmake/UseCyclus.cmake
@@ -91,9 +91,9 @@
     # set cpp path
     # Now check first if the $CPP enrironment variable is defined, if not
     # fallback on the previous behavior, so in order:
-    #   1- if defined uses ${CPP}
-    #   2- if clang++ is present, use it
-    #   3- otherwise use cpp
+    #   1- if defined, uses ${CPP}
+    #   2- if clang++ is present, uses it
+    #   3- otherwise, uses cpp
     IF(DEFINED ENV{CPP})
         SET(SYS_CPP "$ENV{CPP}")
     ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")


[CMAKE] Honor CMAKE_OSX_SYSROOT to compute include dir for libxml2

On MacOS, if CMAKE_OSX_SYSROOT is used and the user has command line tools
installed, we currently get the include path for libxml2 as
/usr/include/libxml2, instead of ${CMAKE_OSX_SYSROOT}/usr/include/libxml2.

Make it consistent on MacOS by prefixing ${CMAKE_OSX_SYSROOT} when
possible.

rdar://problem/41103601

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -148,7 +148,11 @@
       find_package(LibXml2)
       if (LIBXML2_FOUND)
         set(LLVM_LIBXML2_ENABLED 1)
-        include_directories(${LIBXML2_INCLUDE_DIR})
+        if ((CMAKE_OSX_SYSROOT) AND (EXISTS ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR}))
+          include_directories(${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR})
+        else()
+          include_directories(${LIBXML2_INCLUDE_DIR})
+        endif()
         set(LIBXML2_LIBS "xml2")
       endif()
     endif()


[CMAKE] Find ld64 using xcrun

[CMAKE] Find ld64 using xcrun

Given similar reasons from r276710, ld64 scrubs DYLD_* environment if
called from the shim executable /usr/bin/ld.

Add support for finding ld64 via xcrun.

This is needed in order to get LIT to have the full path to the ld4
executable.

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

rdar://problem/24300926

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -548,8 +548,19 @@
 set(LLVM_BINUTILS_INCDIR "" CACHE PATH
 	"PATH to binutils/include containing plugin-api.h for gold plugin.")

-if(APPLE)
-  find_program(LD64_EXECUTABLE NAMES ld DOC "The ld64 linker")
+if(CMAKE_HOST_APPLE AND APPLE)
+  if(CMAKE_XCRUN)
+    execute_process(COMMAND ${CMAKE_XCRUN} -find ld
+      OUTPUT_VARIABLE LD64_EXECUTABLE
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+  else()
+    find_program(LD64_EXECUTABLE NAMES ld DOC "The ld64 linker")
+  endif()
+
+  if(LD64_EXECUTABLE)
+    set(LD64_EXECUTABLE ${LD64_EXECUTABLE} CACHE PATH "ld64 executable")
+    message(STATUS "Found ld64 - ${LD64_EXECUTABLE}")
+  endif()
 endif()

 include(FindOCaml)


Use 'check_symbol_exists' instead of 'check_function_exists' for finding isatty.  This change allows Xcode generated projects to have HAVE_ISATTY to be properly defined.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -94,7 +94,7 @@
 check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
 check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
 check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)
-check_function_exists(isatty HAVE_ISATTY)
+check_symbol_exists(isatty unistd.h HAVE_ISATTY)
 check_symbol_exists(index strings.h HAVE_INDEX)
 check_symbol_exists(isinf cmath HAVE_ISINF_IN_CMATH)
 check_symbol_exists(isinf math.h HAVE_ISINF_IN_MATH_H)


remove test from pcl.dot

remove test from pcl.dot

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@2369 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/dep_graph.cmake
+++ cmake/dep_graph.cmake
@@ -22,9 +22,4 @@
         endforeach(_dep)
       endif()
     endforeach(_ss)
-
-    file(APPEND ${_dot_file}
-        "  \"test\" [style=\"filled\" fillcolor=\"#A3A27C\" shape=\"box\"];\n ")
-    file(APPEND ${_dot_file} "}\n")
 endfunction(MAKE_DEP_GRAPH)
-


Added warnings for unnecessary calls to rosbuild_genmsg and rosbuild_gensrv

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -693,6 +693,11 @@

 # gensrv processes srv/*.srv files into language-specific source files
 macro(rosbuild_gensrv)
+  # Check whether there are any .srv files
+  rosbuild_get_srvs(_srvlist)
+  if(NOT _srvlist)
+    _rosbuild_warn("rosbuild_gensrv() was called, but no .srv files were found")
+  endif(NOT _srvlist)
   # Create dummy target that depends on the autogenerated output from all
   # client libs, which has already been attached to the rospack_gensrv
   # target.
@@ -707,6 +712,11 @@

 # genmsg processes msg/*.msg files into language-specific source files
 macro(rosbuild_genmsg)
+  # Check whether there are any .srv files
+  rosbuild_get_msgs(_msglist)
+  if(NOT _msglist)
+    _rosbuild_warn("rosbuild_genmsg() was called, but no .msg files were found")
+  endif(NOT _msglist)
   # Create dummy target that depends on the autogenerated output from all
   # client libs, which has already been attached to the rospack_genmsg
   # target.


Set HUNTER_DISABLE_SHARED_LIBS to YES for address sanitizer

--- sanitize_address.cmake
+++ sanitize_address.cmake
@@ -19,3 +19,5 @@
 include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake")

 include("${CMAKE_CURRENT_LIST_DIR}/flags/sanitize_address.cmake")
+
+set(HUNTER_DISABLE_SHARED_LIBS YES)


Split off 8.2.44

Split off 8.2.44

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 2 )
-set ( HPCC_POINT 43 )
+set ( HPCC_POINT 45 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.10.0

Split off 7.10.0

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 0 )
+set ( HPCC_POINT 1 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.10.48

Split off 7.10.48

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 47 )
+set ( HPCC_POINT 49 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 4.2.4-rc3 Release Candidate 3

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

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 2 )
 set ( HPCC_POINT 4 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 2 )
+set ( HPCC_SEQUENCE 3 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Fix boost_polygon download

Fix boost_polygon download

--- deps/Boost/Boost.cmake
+++ deps/Boost/Boost.cmake
@@ -135,7 +135,7 @@
         EXCLUDE_FROM_ALL ON
         # GIT_REPOSITORY "https://github.com/prusa3d/polygon"
         # GIT_TAG prusaslicer_gmp
-        https://github.com/prusa3d/polygon/archive/refs/heads/prusaslicer_gmp.zip
+        URL https://github.com/prusa3d/polygon/archive/refs/heads/prusaslicer_gmp.zip
         URL_HASH SHA256=abeb9710f0a7069fb9b22181ae5c56f6066002f125db210e7ffb27032aed6824
         DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/boost_polygon
         DEPENDS dep_Boost


It seems that ADD_INTEGRATION_TEST tests now require GoogleMock to build

--- indra/cmake/LLAddBuildTest.cmake
+++ indra/cmake/LLAddBuildTest.cmake
@@ -1,5 +1,6 @@
 # -*- cmake -*-
 include(LLTestCommand)
+include(GoogleMock)

 MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
   # Given a project name and a list of sourcefiles (with optional properties on each),
@@ -190,6 +191,7 @@

   SET(libraries
     ${library_dependencies}
+    ${GOOGLEMOCK_LIBRARIES}
     ${PTHREAD_LIBRARY}
     )


Nicer formatting on stubs.cmake.

Nicer formatting on stubs.cmake.

--- telemetry/test/telemetry/stubs.cmake
+++ telemetry/test/telemetry/stubs.cmake
@@ -1,5 +1,9 @@
 set_target_properties(telemetry-test-telemetry
         PROPERTIES
         LINK_FLAGS
-        "-Wl,--wrap=kprv_subscriber_read -Wl,--wrap=kprv_subscriber_connect -Wl,--wrap=kprv_send_csp -Wl,--wrap=kprv_server_accept -Wl,--wrap=kprv_publisher_read"
+        "-Wl,--wrap=kprv_subscriber_read \
+         -Wl,--wrap=kprv_subscriber_connect \
+         -Wl,--wrap=kprv_send_csp \
+         -Wl,--wrap=kprv_server_accept \
+         -Wl,--wrap=kprv_publisher_read"
 )


Automatic detection of MKL interface library

--- modules/FindMKL.cmake
+++ modules/FindMKL.cmake
@@ -304,6 +304,35 @@
     list(APPEND MKL_LIBRARIES ${MKL_CORE_LIB})
   endif()

+  # Work out interface layer
+  if (_MKL_IS_64BIT)
+    include(CheckTypeSize)
+    CHECK_TYPE_SIZE("int" _MKL_SIZEOF_INT)
+    if (${_MKL_SIZEOF_INT} EQUAL 4)
+      set(_MKL_INTERFACE "lp64")
+    elseif(${_MKL_SIZEOF_INT} EQUAL 8)
+      set(_MKL_INTERFACE "ilp64")
+      set(MKL_DEFINITIONS "-DMKL_ILP64")
+    endif()
+  endif()
+  if (DEFINED _MKL_INTERFACE)
+    if (${CMAKE_COMPILER_IS_GNUG77})
+      set(_MKL_INTERFACE_LIBRARY "mkl_gf_${_MKL_INTERFACE}")
+    else()
+      set(_MKL_INTERFACE_LIBRARY "mkl_intel_${_MKL_INTERFACE}")
+    endif()
+    find_library(MKL_INTERFACE_LIB
+                 "${_MKL_INTERFACE_LIBRARY}"
+                 HINTS ${_MKL_LIBRARY_SEARCH_DIRS})
+    if("${MKL_INTERFACE_LIB}" STREQUAL "MKL_INTERFACE_LIB-NOTFOUND")
+      set(MKL_FOUND 0)
+    else()
+      list(APPEND MKL_LIBRARIES ${MKL_INTERFACE_LIB})
+    endif()
+    unset(_MKL_IS_64BIT)
+    unset(_MKL_INTERFACE)
+  endif()
+
   # Construct MKL_LIBRARIES
   list(REMOVE_DUPLICATES MKL_LIBRARIES)
 endif()


modules: Remove "Found OculusSDK" message from FindOVR.cmake

Signed-off-by: Squareys <b4e1335d2c774058f7a95112f52894dcc752fd3f@googlemail.com>

--- modules/FindOVR.cmake
+++ modules/FindOVR.cmake
@@ -44,7 +44,6 @@

     if(OVR_SDK_ROOT)
         set(OVR_SDK_ROOT "${OVR_SDK_ROOT}/OculusSDK")
-        message(STATUS "Found OculusSDK: ${OVR_SDK_ROOT}")
     endif()

 endif()


fix CTEST_EXT_TEXT_STYLE_BOLD_RED var name

--- modules/logging.cmake
+++ modules/logging.cmake
@@ -1,7 +1,7 @@
 #
 # The MIT License (MIT)
 #
-# Copyright (c) 2015 Vladislav Vinogradov
+# Copyright (c) 2015-2016 Vladislav Vinogradov
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -42,7 +42,7 @@
     set_ifndef(CTEST_EXT_TEXT_STYLE_MAGENTA        "${CTEST_EXT_TEXT_STYLE_ESC}[35m")
     set_ifndef(CTEST_EXT_TEXT_STYLE_CYAN           "${CTEST_EXT_TEXT_STYLE_ESC}[36m")
     set_ifndef(CTEST_EXT_TEXT_STYLE_WHITE          "${CTEST_EXT_TEXT_STYLE_ESC}[37m")
-    set_ifndef(CTEST_EXT_TEXT_STYLE_BOLDRED        "${CTEST_EXT_TEXT_STYLE_ESC}[1;31m")
+    set_ifndef(CTEST_EXT_TEXT_STYLE_BOLD_RED       "${CTEST_EXT_TEXT_STYLE_ESC}[1;31m")
     set_ifndef(CTEST_EXT_TEXT_STYLE_BOLD_GREEN     "${CTEST_EXT_TEXT_STYLE_ESC}[1;32m")
     set_ifndef(CTEST_EXT_TEXT_STYLE_BOLD_YELLOW    "${CTEST_EXT_TEXT_STYLE_ESC}[1;33m")
     set_ifndef(CTEST_EXT_TEXT_STYLE_BOLD_BLUE      "${CTEST_EXT_TEXT_STYLE_ESC}[1;34m")


COMP: build the pzthon modules shared bz default if the platform supports shared libs
-don't include the init functions for the shared modules in the generated modules header

Alex (from Dave's machine)

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -97,20 +97,20 @@

 MACRO(PYTHON_ADD_MODULE _NAME )
   OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
-  OPTION(PYTHON_MODULE_${_NAME}_SHARED "Add module ${_NAME} shared" FALSE)
-  MARK_AS_ADVANCED(PYTHON_ENABLE_MODULE_${_NAME} PYTHON_MODULE_${_NAME}_SHARED)
+  OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED "Add module ${_NAME} shared" ${VTK_TARGET_SUPPORTS_SHARED_LIBS})
+  MARK_AS_ADVANCED(PYTHON_ENABLE_MODULE_${_NAME} PYTHON_MODULE_${_NAME}_BUILD_SHARED)

   IF(PYTHON_ENABLE_MODULE_${_NAME})
-    IF(PYTHON_MODULE_${_NAME}_SHARED)
+    IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
       SET(PY_MODULE_TYPE MODULE)
-    ELSE(PYTHON_MODULE_${_NAME}_SHARED)
+    ELSE(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
       SET(PY_MODULE_TYPE STATIC)
       IF(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt")
         FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt" ";${_NAME}")
       ELSE(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt")
         FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt" "${_NAME}")
       ENDIF(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt")
-    ENDIF(PYTHON_MODULE_${_NAME}_SHARED)
+    ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)

     IF(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyModulesList.txt")
       FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/PyModulesList.txt" ";${_NAME}")
@@ -124,10 +124,16 @@

 MACRO(PYTHON_WRITE_MODULES_HEADER _filename)
-  FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt" PY_STATIC_MODULES_LIST)
-  FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/PyModulesList.txt"       PY_MODULES_LIST)
-  message(STATUS "modules: ${PY_MODULES_LIST}")
-  message(STATUS "static modules: ${PY_STATIC_MODULES_LIST}")
+  SET(PY_STATIC_MODULES_LIST)
+  SET(PY_MODULES_LIST)
+  IF(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt")
+    FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt" PY_STATIC_MODULES_LIST)
+  ENDIF(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyStaticModulesList.txt")
+  IF(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyModulesList.txt")
+    FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/PyModulesList.txt"       PY_MODULES_LIST)
+  ENDIF(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/PyModulesList.txt")
+#  message(STATUS "modules: ${PY_MODULES_LIST}")
+#  message(STATUS "static modules: ${PY_STATIC_MODULES_LIST}")
   GET_FILENAME_COMPONENT(_name "${_filename}" NAME)
   STRING(REPLACE "." "_" _name "${_name}")
   STRING(TOUPPER ${_name} _name)
@@ -144,9 +150,9 @@

 ")

-  FOREACH(_currentModule ${PY_MODULES_LIST})
+  FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
     FILE(APPEND ${_filename} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
-  ENDFOREACH(_currentModule ${PY_MODULES_LIST})
+  ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})

   FILE(APPEND ${_filename}
 "#ifdef __cplusplus
@@ -156,9 +162,9 @@
 ")

-  FOREACH(_currentModule ${PY_MODULES_LIST})
+  FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
     FILE(APPEND ${_filename} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n  return PyImport_AppendInittab(\"${PYTHON_MODULE_PREFIX}${_currentModule}\", init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
-  ENDFOREACH(_currentModule ${PY_MODULES_LIST})
+  ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})

   FILE(APPEND ${_filename} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n")
   FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})


Remove unneeded conditional

Remove unneeded conditional

The set of the function argument was not directly being propagated to
the parent scope. The variable became a CACHE variable in the
try_compile so it's already exposed in the parent scope after the
first run.

Thanks to  Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
for reporting.

Change-Id: Ib45980da0e233e74ed509fde9a6909338217b236

--- CMake/sitkCheckCXX11.cmake
+++ CMake/sitkCheckCXX11.cmake
@@ -40,9 +40,7 @@
                  "Performing Test ${VARIABLE} failed with the following output:\n"
                  "${OUTPUT}\n")
     endif()
-  else()
-    set("${VARIABLE}" "${cache_var}")
-  endif()
+   endif()
 endfunction()

 #


DCMTK  - Restore correct GIT_REPOSITORY overwritten by mistake

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -41,7 +41,7 @@
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
       BINARY_DIR ${proj}-build
       PREFIX ${proj}${ep_suffix}
-      GIT_REPOSITORY "file:///home/jchris/Projects/sandbox/dcmtk-git/dcmtk"
+      GIT_REPOSITORY "${git_protocol}://git.dcmtk.org/dcmtk.git"
       GIT_TAG ${revision_tag}
       CMAKE_GENERATOR ${gen}
       UPDATE_COMMAND ""


cmake: remove deprecated FindGSL.cmake

cmake: remove deprecated FindGSL.cmake

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -1,59 +0,0 @@
-# - Find gsl
-# Find the native GSL headers and libraries.
-#
-#  GSL_INCLUDE_DIRS - where to find gsl/gsl_linalg.h, etc.
-#  GSL_LIBRARIES    - List of libraries when using gsl.
-#  GSL_FOUND        - True if gsl found.
-#
-# Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-find_package(PkgConfig)
-
-pkg_check_modules(PC_GSL gsl)
-find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${PC_GSL_INCLUDE_DIRS})
-find_library(GSL_LIBRARY NAMES gsl HINTS ${PC_GSL_LIBRARY_DIRS} )
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR)
-
-set(GSL_LIBRARIES "${GSL_LIBRARY}")
-set(GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
-
-if (GSL_FOUND)
-  include(CheckLibraryExists)
-  #adding MATH_LIBRARIES here to allow static libs, this does not harm us as we are anyway using it
-  check_library_exists("${GSL_LIBRARIES};${MATH_LIBRARIES}" gsl_linalg_QR_decomp "" FOUND_QR_DECOMP)
-  if(NOT FOUND_QR_DECOMP)
-    #Some distributions like OpenSUSE need cblas in the linker flags, too
-    find_library(GSLCBLAS_LIBRARY NAMES gslcblas cblas HINTS ${PC_GSL_LIBRARY_DIRS} )
-    find_package_handle_standard_args(GSLCBLAS DEFAULT_MSG GSLCBLAS_LIBRARY)
-    if (GSLCBLAS_FOUND)
-      check_library_exists("${GSLCBLAS_LIBRARY};${MATH_LIBRARIES}" cblas_dsyrk "" FOUND_DSYRK)
-      if(NOT FOUND_DSYRK)
-        message(FATAL_ERROR "Could not find cblas_dsyrk in ${GSLCBLAS_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you are using a static lib (.a) make sure you have specified all dependencies of libcblas in GSLCBLAS_LIBRARY by hand (i.e. -DGSLCBLAS_LIBRARY='/path/to/libcblas.so;/path/to/libm.so')! If your gsl was build against an different version of cblas, specify it in GSLCBLAS_LIBRARY")
-      endif(NOT FOUND_DSYRK)
-      set(GSL_LIBRARIES "${GSL_LIBRARY};${GSLCBLAS_LIBRARY}")
-      check_library_exists("${GSL_LIBRARIES};${MATH_LIBRARIES}" gsl_linalg_QR_lssolve "" FOUND_QR_DECOMP_AGAIN)
-    endif(GSLCBLAS_FOUND)
-  endif(NOT FOUND_QR_DECOMP)
-  if(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
-      message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong.  If you are using a static lib (.a) make sure you have specified all dependencies of libgsl in GSL_LIBRARY by hand (i.e. -DGSL_LIBRARY='/path/to/libgsl.so;/path/to/libm.so') !")
-  endif(NOT FOUND_QR_DECOMP AND NOT FOUND_QR_DECOMP_AGAIN)
-endif (GSL_FOUND)
-
-mark_as_advanced(GSL_INCLUDE_DIR GSL_LIBRARY)


Renamed the OSGSIM cmake variable to OSGSIM_LIBRARY to be consistent with the rest of the variables.

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -1,13 +1,13 @@
 # Locate gdal
 # This module defines
 # OSG_LIBRARY
-# OSG_FOUND, if false, do not try to link to gdal
+# OSG_FOUND, if false, do not try to link to gdal
 # OSG_INCLUDE_DIR, where to find the headers
 #
 # $OSG_DIR is an environment variable that would
 # correspond to the ./configure --prefix=$OSG_DIR
 #
-# Created by Robert Osfield.
+# Created by Robert Osfield.

 FIND_PATH(OSG_INCLUDE_DIR osg/Node
     ${OSG_DIR}/include
@@ -59,7 +59,7 @@
         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
         /usr/freeware/lib64
     )
-
+
     FIND_LIBRARY(${MYLIBRARY}
         NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
         PATHS
@@ -107,7 +107,7 @@
         ENDIF(NOT MYLIBRARY)

     ENDIF( NOT ${MYLIBRARY}_DEBUG )
-
+
 ENDMACRO(FIND_OSG_LIBRARY LIBRARY LIBRARYNAME)

 FIND_OSG_LIBRARY(OSG_LIBRARY osg)
@@ -126,7 +126,7 @@
 FIND_OSG_LIBRARY(OSGPARTICLE_LIBRARY osgParticle)
 FIND_OSG_LIBRARY(OSGSHADOW_LIBRARY osgShadow)
 FIND_OSG_LIBRARY(OSGPRESENTATION_LIBRARY osgPresentation)
-FIND_OSG_LIBRARY(OSGSIM osgSim)
+FIND_OSG_LIBRARY(OSGSIM_LIBRARY osgSim)
 FIND_OSG_LIBRARY(OPENTHREADS_LIBRARY OpenThreads)


Add possible Depthsense SDK FindPackage location.

--- CMakeModules/FindDepthSense.cmake
+++ CMakeModules/FindDepthSense.cmake
@@ -7,6 +7,7 @@
 FIND_PATH( DepthSense_INCLUDE_DIR DepthSense.hxx
   PATHS
       "$ENV{PROGRAMFILES}/SoftKinetic/DepthSenseSDK/include"
+      "$ENV{PROGRAMFILES}/Meta/DepthSenseSDK/include"
       /usr/include
       /usr/local/include
       /opt/local/include
@@ -16,6 +17,7 @@
 FIND_LIBRARY( DepthSense_LIBRARY DepthSense
   PATHS
       "$ENV{PROGRAMFILES}/SoftKinetic/DepthSenseSDK/lib"
+      "$ENV{PROGRAMFILES}/Meta/DepthSenseSDK/lib"
       /usr/lib64
       /usr/lib
       /usr/local/lib


add missing target dependency

add missing target dependency

--- rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
+++ rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
@@ -168,6 +168,18 @@
   VERBATIM
 )

+if(TARGET ${rosidl_generate_interfaces_TARGET}${_target_suffix})
+  message(WARNING "Custom target ${rosidl_generate_interfaces_TARGET}${_target_suffix} already exists")
+else()
+  add_custom_target(
+    ${rosidl_generate_interfaces_TARGET}${_target_suffix}
+    DEPENDS
+    ${_generated_msg_py_files}
+    ${_generated_msg_c_files}
+    ${_generated_srv_files}
+  )
+endif()
+
 macro(set_properties _build_type)
   set_target_properties(${_msg_name}${_pyext_suffix} PROPERTIES
     COMPILE_FLAGS "${_extension_compile_flags}"
@@ -210,6 +222,7 @@

     add_dependencies(
       ${_msg_name}${_pyext_suffix}
+      ${rosidl_generate_interfaces_TARGET}${_target_suffix}
       ${rosidl_generate_interfaces_TARGET}__rosidl_generator_c
     )

@@ -266,18 +279,3 @@
       DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}/${_msg_package_dir2}")
   endif()
 endforeach()
-
-if(TARGET ${rosidl_generate_interfaces_TARGET}${_target_suffix})
-  message(WARNING "Custom target ${rosidl_generate_interfaces_TARGET}${_target_suffix} already exists")
-else()
-  add_custom_target(
-    ${rosidl_generate_interfaces_TARGET}${_target_suffix}
-    DEPENDS
-    ${_generated_msg_py_files}
-    ${_generated_msg_c_files}
-    ${_generated_srv_files}
-    ${_generated_extension_files}
-    ${_extension_dependencies}
-    ${rosidl_generate_interfaces_TARGET}__rosidl_generator_c
-  )
-endif()


fix MinGW incompatibility with BUILD_INTERFACE generator expression

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -627,7 +627,7 @@
 	if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
 		list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
 	endif()
-	if (WIN32)
+	if (WIN32 AND NOT MINGW)
 		# convert Windows paths in include directories to CMake paths
 		if (_includeDirs)
 			set (_paths "")


fix bugs related to handling of interface libraries

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -387,6 +387,24 @@
 	endif()
 	set (${_matchedOptionsVar} ${_matchedOptions} PARENT_SCOPE)
 	set (${_unmatchedOptionsVar} ${_unmatchedOptions} PARENT_SCOPE)
+endfunction()
+
+function (cotire_is_target_supported _target _isSupportedVar)
+	if (NOT TARGET "${_target}")
+		set (${_isSupportedVar} FALSE PARENT_SCOPE)
+		return()
+	endif()
+	get_target_property(_imported ${_target} IMPORTED)
+	if (_imported)
+		set (${_isSupportedVar} FALSE PARENT_SCOPE)
+		return()
+	endif()
+	get_target_property(_targetType ${_target} TYPE)
+	if (NOT _targetType MATCHES "EXECUTABLE|(STATIC|SHARED|MODULE|OBJECT)_LIBRARY")
+		set (${_isSupportedVar} FALSE PARENT_SCOPE)
+		return()
+	endif()
+	set (${_isSupportedVar} TRUE PARENT_SCOPE)
 endfunction()

 function (cotire_get_target_compile_flags _config _language _target _flagsVar)
@@ -3029,10 +3047,16 @@
 	if (NOT _option_CONFIGURATIONS)
 		cotire_get_configuration_types(_option_CONFIGURATIONS)
 	endif()
-	# trivial checks
-	get_target_property(_imported ${_target} IMPORTED)
-	if (_imported)
-		message (WARNING "cotire: imported target ${_target} cannot be cotired.")
+	# check if cotire can be applied to target at all
+	cotire_is_target_supported(${_target} _isSupported)
+	if (NOT _isSupported)
+		get_target_property(_imported ${_target} IMPORTED)
+		get_target_property(_targetType ${_target} TYPE)
+		if (_imported)
+			message (WARNING "cotire: imported ${_targetType} target ${_target} cannot be cotired.")
+		else()
+			message (STATUS "cotire: ${_targetType} target ${_target} cannot be cotired.")
+		endif()
 		return()
 	endif()
 	# resolve alias
@@ -3097,11 +3121,16 @@
 function (cotire_map_libraries _strategy _mappedLibrariesVar)
 	set (_mappedLibraries "")
 	foreach (_library ${ARGN})
-		if (TARGET "${_library}" AND "${_strategy}" MATCHES "COPY_UNITY")
-			# use target's corresponding unity target, if available
-			get_target_property(_libraryUnityTargetName ${_library} COTIRE_UNITY_TARGET_NAME)
-			if (TARGET "${_libraryUnityTargetName}")
-				list (APPEND _mappedLibraries "${_libraryUnityTargetName}")
+		if ("${_strategy}" MATCHES "COPY_UNITY")
+			cotire_is_target_supported(${_library} _isSupported)
+			if (_isSupported)
+				# use target's corresponding unity target, if available
+				get_target_property(_libraryUnityTargetName ${_library} COTIRE_UNITY_TARGET_NAME)
+				if (TARGET "${_libraryUnityTargetName}")
+					list (APPEND _mappedLibraries "${_libraryUnityTargetName}")
+				else()
+					list (APPEND _mappedLibraries "${_library}")
+				endif()
 			else()
 				list (APPEND _mappedLibraries "${_library}")
 			endif()
@@ -3114,6 +3143,10 @@
 endfunction()

 function (cotire_target_link_libraries _target)
+	cotire_is_target_supported(${_target} _isSupported)
+	if (NOT _isSupported)
+		return()
+	endif()
 	get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME)
 	if (TARGET "${_unityTargetName}")
 		get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)


utils: compile options for non MSVC compiler

--- Engine/scripts/utils.cmake
+++ Engine/scripts/utils.cmake
@@ -152,12 +152,21 @@
 		target_compile_options(${_target} PRIVATE "/MP")
 	endif()

-	target_compile_options(
-		${_target} PRIVATE
-		"$<$<CONFIG:Debug>:/D_DEBUG /DET_DEBUG>"
-		"$<$<CONFIG:Develop>:/DET_DEVELOP>"
-		"$<$<CONFIG:Shipping>:/DET_SHIPPING>"
-	)
+	if(MSVC)
+		target_compile_options(
+			${_target} PRIVATE
+			"$<$<CONFIG:Debug>:/D_DEBUG /DET_DEBUG>"
+			"$<$<CONFIG:Develop>:/DET_DEVELOP>"
+			"$<$<CONFIG:Shipping>:/DET_SHIPPING>"
+		)
+	else()
+		target_compile_options(
+			${_target} PRIVATE
+			"$<$<CONFIG:Debug>:-D_DEBUG -DET_DEBUG>"
+			"$<$<CONFIG:Develop>:-DET_DEVELOP>"
+			"$<$<CONFIG:Shipping>:-DET_SHIPPING>"
+		)
+	endif()
 endfunction(targetCompileOptions)


COMP: Suppress the silly warnings for dashboard machines using a CMake 2.4.8 and MSVC90 combination (like today's dash20 submission).

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -123,10 +123,11 @@

 # Disable deprecation warnings for standard C and STL functions in VS2005
 # and later
-IF(CMAKE_COMPILER_2005)
-  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+IF(MSVC80 OR MSVC90)
+  ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
+  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
   ADD_DEFINITIONS(-D_SCL_SECURE_NO_DEPRECATE)
-ENDIF(CMAKE_COMPILER_2005)
+ENDIF(MSVC80 OR MSVC90)

 #-----------------------------------------------------------------------------
 # Add compiler flags VTK needs to work on this platform.  This must be


ENH: avoid rewriting OTBOpenGL.cmake

ENH: avoid rewriting OTBOpenGL.cmake

--- Packaging/patch_cmake_files.cmake
+++ Packaging/patch_cmake_files.cmake
@@ -47,17 +47,17 @@

   install_without_message("${PATCH_STAGE_DIR}" "lib/cmake")

-  file( GLOB otb_opengl
-    "${SUPERBUILD_INSTALL_DIR}/lib/cmake/OTB*/Modules/OTBOpenGL.cmake" )
-  if(EXISTS ${otb_opengl})
-    file(STRINGS "${otb_opengl}" otb_opengl_cmake)
-    set(otb_opengl_cmake_NEW)
-    foreach(line ${otb_opengl_cmake})
-      if( NOT line MATCHES "/usr")
-	list(APPEND otb_opengl_cmake_NEW "${line}\n")
-      endif()
-    endforeach()
-  endif()
-  file(WRITE "${otb_opengl}" ${otb_opengl_cmake_NEW})
+  # file( GLOB otb_opengl
+  #   "${SUPERBUILD_INSTALL_DIR}/lib/cmake/OTB*/Modules/OTBOpenGL.cmake" )
+  # if(EXISTS ${otb_opengl})
+  #   file(STRINGS "${otb_opengl}" otb_opengl_cmake)
+  #   set(otb_opengl_cmake_NEW)
+  #   foreach(line ${otb_opengl_cmake})
+  #     if( NOT line MATCHES "/usr")
+  # 	list(APPEND otb_opengl_cmake_NEW "${line}\n")
+  #     endif()
+  #   endforeach()
+  # endif()
+  # file(WRITE "${otb_opengl}" ${otb_opengl_cmake_NEW})

 endfunction()


COMP: update Bbarolo git

COMP: update Bbarolo git

--- SuperBuild/External_bbarolo.cmake
+++ SuperBuild/External_bbarolo.cmake
@@ -33,7 +33,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/Punzo/Bbarolo"
-    GIT_TAG "22bae8af1b2fe81f5135bd163e7cbd9f1a50ceda"
+    GIT_TAG "01a4fdec4810075e22f606c9018c72d5253cfe29"
     SOURCE_DIR ${${proj}_SOURCE_DIR}
     BINARY_DIR ${${proj}_BINARY_DIR}
     CMAKE_CACHE_ARGS


WRG: cmake warning

WRG: cmake warning

--- CMake/OTBStandaloneModuleMacros.cmake
+++ CMake/OTBStandaloneModuleMacros.cmake
@@ -262,7 +262,7 @@
   set(OTBAPP_BASELINE       ${OTB_DATA_ROOT}/Baseline/OTB-Applications/Images)
   set(OTBAPP_BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB-Applications/Files)

-  if(${BUILD_TESTING})
+  if(BUILD_TESTING)
     enable_testing()
   endif()


COMP: Change superbuild version to official shark repo on github

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -16,7 +16,7 @@

   ExternalProject_Add(SHARK
     PREFIX SHARK
-    GIT_REPOSITORY "https://github.com/inglada/Shark.git"
+    GIT_REPOSITORY "https://github.com/Shark-ML/Shark/"
     GIT_TAG "master"
     SOURCE_DIR ${SHARK_SB_SRC}
     BINARY_DIR ${SHARK_SB_BUILD_DIR}


Update CTest configuration for cdash.das-system-networks.de

Signed-off-by: Peter Hille (png!das-system) <4b8373d016f277527198385ba72fda0feb5da015@das-system-networks.de>

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -6,7 +6,7 @@
 endif(NOT DEFINED CTEST_DROP_METHOD)

 if(CTEST_DROP_METHOD STREQUAL "http")
-  set(CTEST_DROP_SITE "harpy.png.das-system.vpn")
-  set(CTEST_DROP_LOCATION "/cdash/submit.php?project=dsnutil")
+  set(CTEST_DROP_SITE "cdash.das-system-networks.de")
+  set(CTEST_DROP_LOCATION "/submit.php?project=dsnutil")
   set(CTEST_TRIGGER_SITE "http://${CTEST_DROP_SITE}/")
 endif(CTEST_DROP_METHOD STREQUAL "http")


disable .srv generation for C

disable .srv generation for C

--- rosidl_generator_c/cmake/rosidl_generator_c_generate_interfaces.cmake
+++ rosidl_generator_c/cmake/rosidl_generator_c_generate_interfaces.cmake
@@ -17,10 +17,17 @@
 set(_dependencies "")
 foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES})
   foreach(_idl_file ${${_pkg_name}_INTERFACE_FILES})
-    set(_abs_idl_file "${${_pkg_name}_DIR}/../${_idl_file}")
-    normalize_path(_abs_idl_file "${_abs_idl_file}")
-    list(APPEND _dependency_files "${_abs_idl_file}")
-    list(APPEND _dependencies "${_pkg_name}:${_abs_idl_file}")
+    # TODO(wjwwood): Enable support for things others than .msg
+    # Conditionally process interface files if they end with .msg
+    string(LENGTH ${_idl_file} _idl_file_len)
+    math(EXPR _idl_file_ext_pos "${_idl_file_len} - 4")
+    string(SUBSTRING ${_idl_file} ${_idl_file_ext_pos} -1 _idl_file_ext)
+    if (${_idl_file_ext} STREQUAL ".msg")
+      set(_abs_idl_file "${${_pkg_name}_DIR}/../${_idl_file}")
+      normalize_path(_abs_idl_file "${_abs_idl_file}")
+      list(APPEND _dependency_files "${_abs_idl_file}")
+      list(APPEND _dependencies "${_pkg_name}:${_abs_idl_file}")
+    endif()
   endforeach()
 endforeach()


SVN_SILENT made messages (.desktop file)

--- plasma/plasma-applet-kscreen.desktop.cmake
+++ plasma/plasma-applet-kscreen.desktop.cmake
@@ -8,6 +8,7 @@
 Name[es]=Configuración rápida de la pantalla
 Name[fi]=Näyttöasetusten pikasäätö
 Name[fr]=Configuration rapide de l'affichage
+Name[gl]=Configuración rápida da pantalla
 Name[hu]=Gyors kijelző beállítások
 Name[it]=Configurazione rapida dello schermo
 Name[mr]=त्वरीत प्रदर्शकाची संयोजना
@@ -34,6 +35,7 @@
 Comment[es]=Configuración rápida de una nueva pantalla
 Comment[fi]=Näyttöasetusten pikasäätö
 Comment[fr]=Configuration rapide d'un nouvel affichage
+Comment[gl]=Configura rapidamente unha nova pantalla
 Comment[hu]=Egy új kijelző gyors beállítása
 Comment[it]=Configurazione rapida di un nuovo schermo
 Comment[mr]=नवीन प्रदर्शकाची त्वरीत संयोजना


Fix closing parenthesis

Fix closing parenthesis

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -256,7 +256,7 @@

           if(exit_code EQUAL 0)
             execute_process(
-              COMMAND ${CTEST_GIT_COMMAND} diff --quiet HEAD FETCH_HEAD)
+              COMMAND ${CTEST_GIT_COMMAND} diff --quiet HEAD FETCH_HEAD
               WORKING_DIRECTORY "${working_dir}"
               RESULT_VARIABLE exit_code)


STYLE: remove whitespace.

STYLE: remove whitespace.

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -146,7 +146,7 @@
 # and later
 IF(MSVC_VERSION EQUAL 1400 OR MSVC_VERSION GREATER 1400)
   ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
-  ADD_DEFINITIONS(-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
+  ADD_DEFINITIONS(-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
 ENDIF(MSVC_VERSION EQUAL 1400 OR MSVC_VERSION GREATER 1400)

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


COMP: Eliminate compiler warning on AIX xlC dashboards. Allow code to use C++ RTTI typeid and dynamic_cast.

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -53,8 +53,10 @@
       "${VTK_REQUIRED_CXX_FLAGS} -Wl,-woff84 -woff 15 -woff 84 -woff 3439 -woff 1424 -woff 3201")
     SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -woff 3439")
   ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
-#silence duplicate symbol warnings on AIX
   IF(CMAKE_SYSTEM MATCHES "AIX.*")
+    # allow t-ypeid and d-ynamic_cast usage (normally off by default on xlC)
+    SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -qrtti=all")
+    # silence duplicate symbol warnings on AIX
     SET(VTK_REQUIRED_EXE_LINKER_FLAGS "${VTK_REQUIRED_EXE_LINKER_FLAGS} -bhalt:5")
     SET(VTK_REQUIRED_SHARED_LINKER_FLAGS "${VTK_REQUIRED_SHARED_LINKER_FLAGS} -bhalt:5")
     SET(VTK_REQUIRED_MODULE_LINKER_FLAGS "${VTK_REQUIRED_MODULE_LINKER_FLAGS} -bhalt:5")


extend ctest script for SSSE3 and above

extend ctest script for SSSE3 and above

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -209,6 +209,12 @@
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE3)
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSSE3)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE4_1)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON -DEIGEN_TEST_SSE4_1=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE4_2)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON -DEIGEN_TEST_SSE4_1=ON -DEIGEN_TEST_SSE4_2=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES Altivec)
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_ALTIVEC=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES novec)


Buildroot.cmake: Add a note about configs

--- Buildroot.cmake
+++ Buildroot.cmake
@@ -87,6 +87,17 @@
 #
 #   buildroot_target(foo OUTPUT images/rootfs.tar.gz)
 #   add_custom_target(all-foo ALL DEPENDS foo)
+#
+# Configs
+# -------
+#
+# The config you build must be a complete config, not a defconfig or something
+# that would cause the build to ask questions at build time. If the build hangs
+# indefinitely, check the -log.txt file in the build directory: there is
+# probably a menu or config prompt waiting there.
+#
+# To avoid this problem, you should prepare your config file in a Buildroot
+# source checkout with `make defconfig` and/or `make oldconfig`
 #
 # Options
 # -------


i#4370 cmake 3.19: Use proper target lib for rpath (#4584)

PR #4582 hardcoded "dynamorio" as the library to link to, breaking
users (like Dr. Memory) who rely on rpath linking to layers of their
own libraries.  We fix that here.

Tested on Dr. Memory, where drfuzz tests fail without this fix when
using the latest DR.

Issue: #4370


ManageEnvironmentCommon: CMAKE_SYSTEM_PROCESSOR does not see to be defined yet

--- Modules/ManageEnvironmentCommon.cmake
+++ Modules/ManageEnvironmentCommon.cmake
@@ -46,9 +46,15 @@
     "System configuration dir"
     )

-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "64")
+
+## CMAKE_SYSTEM_PROCESSOR does not see to be defined yet
+EXECUTE_PROCESS(COMMAND uname -p
+    OUTPUT_VARIABLE UNAME_P
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+IF("${UNAME_P}" MATCHES "64")
     SET(IS_64 "64" CACHE STRING "IS_64")
-ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "64")
+ENDIF()
 SET(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib${IS_64}"
     CACHE PATH "Library dir"
     )


unused file

unused file

--- quadtree-config.cmake
+++ quadtree-config.cmake
@@ -1,6 +0,0 @@
-
-get_filename_component (QUADTREE_INCLUDE_DIR
-    "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-get_filename_component (QUADTREE_SOURCE_DIR
-    "${CMAKE_CURRENT_LIST_FILE}" PATH)


Fix header install procedure, was completely wrong!

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -108,8 +108,9 @@

 endif(ENABLE_SHARED_LIBRARIES)

-INSTALL(FILES ${${PREFIX}_HEADERS}
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ATK/${${PREFIX}_FOLDER}
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    FILES_MATCHING PATTERN *.h
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ATK/${${PREFIX}_FOLDER}
 )

 endfunction()


cmake: Fix version comparison from previous commit

--- cmake/Modules/FindHoudiniEngine.cmake
+++ cmake/Modules/FindHoudiniEngine.cmake
@@ -83,17 +83,17 @@
     )
 list( APPEND _houdiniengine_required_vars HoudiniEngine_${_houdiniengine_lib} )
 list( APPEND HoudiniEngine_LIBRARIES ${HoudiniEngine_${_houdiniengine_lib}} )
-if ( ${CMAKE_VERSION} VERSION_GREATER "2.8.11" )
+if ( ${CMAKE_VERSION} VERSION_LESS "2.8.12" )
     get_filename_component(
         HoudiniEngine_LIBRARY_DIR
         ${HoudiniEngine_${_houdiniengine_lib}}
-        DIRECTORY
+        PATH
         )
 else ()
     get_filename_component(
         HoudiniEngine_LIBRARY_DIR
         ${HoudiniEngine_${_houdiniengine_lib}}
-        PATH
+        DIRECTORY
         )
 endif ()
 list( APPEND _houdiniengine_required_vars HoudiniEngine_LIBRARY_DIR )


Provide missing definition of uppercase_CMAKE_BUILD_TYPE in HandleLLVMOptions module

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -1,6 +1,10 @@
 # This CMake module is responsible for interpreting the user defined LLVM_
 # options and executing the appropriate CMake commands to realize the users'
 # selections.
+
+# This is commonly needed so make sure it's defined before we include anything
+# else.
+string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)

 include(HandleLLVMStdlib)
 include(AddLLVMDefinitions)


[cmake] Avoid rel+asserts warnings when passing -UNDEBUG

MSVC 2012 gives warning D9025, "overriding /D NDEBUG with -UNDEBUG".
Removing the original definition of NDEBUG silences this.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -21,6 +21,9 @@
   # explicitly undefine it:
   if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
     add_definitions( -UNDEBUG )
+    # Also remove /D NDEBUG to avoid MSVC warnings about conflicting defines.
+    string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " "
+      CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
   endif()
 else()
   if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )


[webgui] search chrome and firefox in default locations

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -340,17 +340,13 @@
 set(perl ${PERL_EXECUTABLE})

 find_program(CHROME_EXECUTABLE NAMES chrome.exe chromium chromium-browser chrome chrome-browser Google\ Chrome
-             PATH_SUFFIXES "Google/Chrome/Application"
-             PATHS "$ENV{PROGRAMFILES}"
-                   "$ENV{PROGRAMFILES\(X86\)}")
+             PATH_SUFFIXES "Google/Chrome/Application")
 if(CHROME_EXECUTABLE)
   set(chromeexe ${CHROME_EXECUTABLE})
 endif()

 find_program(FIREFOX_EXECUTABLE NAMES firefox firefox.exe
-             PATH_SUFFIXES "Mozilla Firefox"
-             PATHS "$ENV{PROGRAMFILES}"
-                  "$ENV{PROGRAMFILES\(X86\)}")
+             PATH_SUFFIXES "Mozilla Firefox")
 if(FIREFOX_EXECUTABLE)
   set(firefoxexe ${FIREFOX_EXECUTABLE})
 endif()


build: track object format with SDK

build: track object format with SDK

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -16,6 +16,7 @@
   message(STATUS "  Version min name: ${SWIFT_SDK_${prefix}_VERSION_MIN_NAME}")
   message(STATUS "  Triple name: ${SWIFT_SDK_${prefix}_TRIPLE_NAME}")
   message(STATUS "  Architectures: ${SWIFT_SDK_${prefix}_ARCHITECTURES}")
+  message(STATUS "  Object Format: ${SWIFT_SDK_${prefix}_OBJECT_FORMAT}")

   foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
     message(STATUS
@@ -96,6 +97,7 @@
   set(SWIFT_SDK_${prefix}_VERSION_MIN_NAME "${version_min_name}")
   set(SWIFT_SDK_${prefix}_TRIPLE_NAME "${triple_name}")
   set(SWIFT_SDK_${prefix}_ARCHITECTURES "${architectures}")
+  set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "MACHO")

   foreach(arch ${architectures})
     set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
@@ -122,6 +124,11 @@
   set(SWIFT_SDK_${prefix}_VERSION_MIN_NAME "")
   set(SWIFT_SDK_${prefix}_TRIPLE_NAME "${triple_name}")
   set(SWIFT_SDK_${prefix}_ARCHITECTURES "${arch}")
+  if("${prefix}" STREQUAL "CYGWIN")
+    set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "COFF")
+  else()
+    set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "ELF")
+  endif()

   set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE "${triple}")


CMake: Remove a commented out check

CMake: Remove a commented out check

--- cmake/setup_compiler_flags_msvc.cmake
+++ cmake/setup_compiler_flags_msvc.cmake
@@ -19,14 +19,6 @@
 # Please read the fat note in setup_compiler_flags.cmake prior to
 # editing this file.
 #
-
-#TODO: this check is not working, my version is 17.0.51106.1 (2012)
-#IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "17.0.0.0" )
-##  MESSAGE(WARNING "\n"
-#    "You're using an old version of the MSVC C++ Compiler!\n"
-#    "It is strongly recommended to use at least version 2012.\n"
-#    )
-#ENDIF()

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


Refs #5926.  Leif made fortify do the right thing, so unding r54709.  Leif says: The RelWithDebInfo target uses -O1 -g, see lines 119 and 120.

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -25,9 +25,7 @@
 ## add TOKU_PTHREAD_DEBUG for debug builds
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1)
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO TOKU_PTHREAD_DEBUG=1)
-## fortify doesn't work with -O0, so we are deprecating it for now.  Sometime we should turn on
-## fortify for -O1 builds, but we don't want it on the release builds.
-## #set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO _FORTIFY_SOURCE=2)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO _FORTIFY_SOURCE=2)

 ## coverage
 option(USE_GCOV "Use gcov for test coverage." OFF)


ENH: add ITKPendingPatches to the directories list to be installed

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -283,6 +283,7 @@
   UtilitiesAdapters/OssimAdapters
   UtilitiesAdapters/TinyXMLAdapters
   UtilitiesAdapters/OGRAdapters
+  UtilitiesAdapters/ITKPendingPatches
   UtilitiesAdapters
   OBIA
   Fuzzy


cmake: actually test -Wcomment

cmake: actually test -Wcomment

This test was testing nothing, as only -Werror was ever
being added to the compiler flags.

You can see the final nitty-gritty compiler invocation in
CMakeFiles/CMakeOutput.log (for successful tests) and
CMakeFiles/CMakeError.log (for failed tests).

Before:
Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o
/usr/bin/clang   -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default  -DC_WCOMMENT_ALLOWS_LINE_WRAP  -Werror   -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o   -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c

After:
Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o
/usr/bin/clang   -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default  -DC_WCOMMENT_ALLOWS_LINE_WRAP  -Werror -Wcomment   -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o   -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -306,7 +306,7 @@
     # Check if -Wcomment is OK with an // comment ending with '\' if the next
     # line is also a // comment.
     set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -Werror -Wcomment)
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror -Wcomment")
     CHECK_C_SOURCE_COMPILES("// \\\\\\n//\\nint main() {return 0;}"
                             C_WCOMMENT_ALLOWS_LINE_WRAP)
     set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})


Disabling an MSVC warning ('var' : definition from the for loop is ignored; the definition from the enclosing scope is used) which will trigger false positives more than true positives.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -240,6 +240,7 @@
     -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
     -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
     -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
+    -wd4258 # Suppress ''var' : definition from the for loop is ignored; the definition from the enclosing scope is used'
     -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data'
     -wd4291 # Suppress ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
     -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'


From Pere: fix ACLiC for CMake builds on Windows

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@42285 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -352,12 +352,16 @@
 install(FILES ${CMAKE_BINARY_DIR}/include/RConfigure.h DESTINATION include)

 #---Configure and install various files----------------------------------------------------------------------
-execute_Process(COMMAND uname -a OUTPUT_VARIABLE BuildNodeInfo OUTPUT_STRIP_TRAILING_WHITESPACE )
+execute_Process(COMMAND hostname OUTPUT_VARIABLE BuildNodeInfo OUTPUT_STRIP_TRAILING_WHITESPACE )

 configure_file(${CMAKE_SOURCE_DIR}/config/rootrc.in ${CMAKE_BINARY_DIR}/etc/system.rootrc @ONLY)
 configure_file(${CMAKE_SOURCE_DIR}/config/RConfigOptions.in include/RConfigOptions.h)
-configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.in include/compiledata.h)
+if(WIN32)
+  configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.win32.in include/compiledata.h)
+else()
+  configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.in include/compiledata.h)
+endif()
 configure_file(${CMAKE_SOURCE_DIR}/config/Makefile-comp.in config/Makefile.comp)
 configure_file(${CMAKE_SOURCE_DIR}/config/Makefile.in config/Makefile.config)
 configure_file(${CMAKE_SOURCE_DIR}/config/mimes.unix.in ${CMAKE_BINARY_DIR}/etc/root.mimes)


build: report the ICU path used for the target

Report the ICU I18N and UC include paths and the library path.  This
makes it obvious when the variable is not defined and more importantly
makes it easier to see what the paths are being used particularly when
cross-compiling for multiple architectures.

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -38,6 +38,15 @@
   message(STATUS "  Version min name: ${SWIFT_SDK_${prefix}_VERSION_MIN_NAME}")
   message(STATUS "  Triple name: ${SWIFT_SDK_${prefix}_TRIPLE_NAME}")
   message(STATUS "  Architectures: ${SWIFT_SDK_${prefix}_ARCHITECTURES}")
+  is_darwin_based_sdk(${prefix} IS_DARWIN_BASED_SDK)
+  if(NOT ${IS_DARWIN_BASED_SDK})
+    foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
+      message(STATUS "  ICU i18n INCLUDE (${arch}): ${SWIFT_${prefix}_${arch}_ICU_I18N_INCLUDE}")
+      message(STATUS "  ICU i18n LIB (${arch}): ${SWIFT_${prefix}_${arch}_ICU_I18N}")
+      message(STATUS "  ICU unicode INCLUDE (${arch}): ${SWIFT_${prefix}_${arch}_ICU_UC_INCLUDE}")
+      message(STATUS "  ICU unicode LIB (${arch}): ${SWIFT_${prefix}_${arch}_ICU_UC}")
+    endforeach()
+  endif()
   message(STATUS "  Object Format: ${SWIFT_SDK_${prefix}_OBJECT_FORMAT}")
   foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
     if(SWIFT_SDK_${prefix}_ARCH_${arch}_LINKER)


Package odb-pgsql: enable cache

Package odb-pgsql: enable cache

--- cmake/projects/odb-pgsql/hunter.cmake
+++ cmake/projects/odb-pgsql/hunter.cmake
@@ -4,6 +4,7 @@
 # !!! DO NOT PLACE HEADER GUARDS HERE !!!

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_configuration_types)
 include(hunter_pick_scheme)
 include(hunter_download)
@@ -21,5 +22,10 @@

 hunter_configuration_types(odb-pgsql CONFIGURATION_TYPES Release)
 hunter_pick_scheme(DEFAULT url_sha1_odb-pgsql_autotools)
-hunter_download(PACKAGE_NAME odb-pgsql)
+hunter_cacheable(odb-pgsql)
+hunter_download(PACKAGE_NAME odb-pgsql
+    PACKAGE_UNRELOCATABLE_TEXT_FILES
+    "lib/libodb-pgsql.la"
+    "lib/pkgconfig/libodb-pgsql.pc"
+)


fixed version check inequality

fixed version check inequality

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -23,15 +23,15 @@
 endif ()

 ## add TOKU_PTHREAD_DEBUG for debug builds
-if (CMAKE_VERSION VERSION_GREATER 2.8)
+if (CMAKE_VERSION VERSION_LESS 3.0)
+  set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1)
+  set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD TOKU_PTHREAD_DEBUG=1)
+  set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD _FORTIFY_SOURCE=2)
+else ()
   set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
     $<$<OR:$<CONFIG:DEBUG>,$<CONFIG:DRD>>:TOKU_PTHREAD_DEBUG=1>
     $<$<CONFIG:DRD>:_FORTIFY_SOURCE=2>
     )
-else ()
-  set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1)
-  set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD TOKU_PTHREAD_DEBUG=1)
-  set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DRD _FORTIFY_SOURCE=2)
 endif ()

 ## coverage


Update CTestConfig.cmake to fix memcheck.supp

--- src/CTestConfig.cmake
+++ src/CTestConfig.cmake
@@ -12,8 +12,9 @@
 # Specify MEMCHECK Option: http://valgrind.org/docs/manual/mc-manual.html
 # Note: We use "--trace-children=yes" to valgrind-ise child processes (follow execve)
 # Note: We turn off "--show-reachable=yes" option.
+SET (MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_SOURCE_DIR}/memcheck.supp")
 SET (VALGRIND_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes --leak-check=full --track-origins=yes")
-SET (MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_SOURCE_DIR}/memcheck.supp")
+SET (MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes --leak-check=full --track-origins=yes")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "cmacslab2.modck.cs.cmu.edu")


cmake: Generate 'java' and 'java_install' targets that also call 'clean'

It's a common thing to call Maven with the 'clean' goal, such as
    mvn clean package
or
    mvn clean install

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -960,12 +960,12 @@

     if (${Maven_FOUND})
       add_custom_target(java
-        COMMAND ${Maven_EXECUTABLE} package
+        COMMAND ${Maven_EXECUTABLE} clean package
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/java
       )

       add_custom_target(java_install
-        COMMAND ${Maven_EXECUTABLE} install
+        COMMAND ${Maven_EXECUTABLE} clean install
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/java
       )
     else()


CodeGenerator: Enable generation of javascript code

Change-Id: I5963ee50c3452a7e796bca76dbf68ef0da21f1fe

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -5,6 +5,7 @@
 generic_find(LIBNAME KurentoModuleCreator VERSION ^4.0.0 REQUIRED)

 include (GNUInstallDirs)
+include (KurentoGitHelpers)

 set (GENERATE_JAVA_CLIENT_PROJECT FALSE CACHE BOOL "Generate java maven client library")
 set (GENERATE_JS_CLIENT_PROJECT FALSE CACHE BOOL "Generate js npm client library")
@@ -18,6 +19,9 @@

 set (KURENTO_MODULES_DIR_INSTALL_PREFIX kurento/modules CACHE PATH "Directory where kurento modules descriptors are installed (relative to \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}). Also .so module files are installed using this prefix, but relative to \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})")
 mark_as_advanced(KURENTO_MODULES_DIR_INSTALL_PREFIX)
+
+set (KURENTO_CLIENT_JS_GIT https://github.com/Kurento/kurento-client-js CACHE STRING "Url of kurento-client-js git repository to get templates from")
+set (KURENTO_CLIENT_JS_BRANCH master CACHE STRING "Branch of kurento-client-js repository to get templates from")

 set (CMAKE_MODULES_INSTALL_DIR
   ${CMAKE_INSTALL_DATAROOTDIR}/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules
@@ -844,9 +848,29 @@

     file(WRITE ${CMAKE_BINARY_DIR}/js_project_name "${VALUE_CODE_API_JS_NODENAME}")

+    #Download kurento-client-js
+    set (KURENTO_CLIENT_JS_DIR ${CMAKE_BINARY_DIR}/kurento-client-js)
+    file(REMOVE_RECURSE ${KURENTO_CLIENT_JS_DIR})
+    file(MAKE_DIRECTORY ${KURENTO_CLIENT_JS_DIR})
+
+    execute_process(
+      COMMAND ${GIT_EXECUTABLE} clone ${KURENTO_CLIENT_JS_GIT} ${KURENTO_CLIENT_JS_DIR}
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    )
+
+    execute_process(
+      COMMAND ${GIT_EXECUTABLE} checkout ${KURENTO_CLIENT_JS_BRANCH}
+      WORKING_DIRECTORY ${KURENTO_CLIENT_JS_DIR}
+    )
+
     execute_code_generator (
       EXEC_PARAMS
         -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js -npm
+    )
+
+    execute_code_generator (
+      EXEC_PARAMS
+        -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js/lib -t ${KURENTO_CLIENT_JS_DIR}/templates
     )

     execute_code_generator (


cmake: Remove debug statement from zlib external project

--- CMakeExternals/zlib.cmake
+++ CMakeExternals/zlib.cmake
@@ -4,15 +4,10 @@
 # Set dependency list
 set(${proj}_DEPENDENCIES "")

-message("===> Building zlib!")
-
 # Include dependent projects if any
 ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

-message("===> Building zlib after dependencies!")
-
 if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-  message("===> Using system zlib!")
   unset(zlib_DIR CACHE)
   find_package(ZLIB REQUIRED)
   set(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS})
@@ -25,7 +20,6 @@
 endif()

 if(NOT DEFINED zlib_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-  message("zlib HERE")
   if(NOT DEFINED git_protocol)
     set(git_protocol "git")
   endif()


ARROW-10489: [C++] Add Intel C++ compiler options for different warning levels

See [Intel Compiler warning flag documentation](https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/error-handling-1/warnings-errors-and-remarks.html).

Closes #9266 from jcmuel/master

Authored-by: Johannes Müller <69505e023259c7c20479ee1c96a39c1bcb8fea19@fico.com>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -267,6 +267,16 @@
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-deprecated-declarations")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-sign-conversion")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-unused-variable")
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+    if(WIN32)
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wall")
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wno-deprecated")
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wno-unused-variable")
+    else()
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall")
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-deprecated")
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-unused-variable")
+    endif()
   else()
     message(FATAL_ERROR "${UNKNOWN_COMPILER_MESSAGE}")
   endif()
@@ -289,6 +299,12 @@
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wpedantic")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wextra")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-unused-parameter")
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+    if(WIN32)
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wall")
+    else()
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall")
+    endif()
   else()
     message(FATAL_ERROR "${UNKNOWN_COMPILER_MESSAGE}")
   endif()
@@ -304,9 +320,14 @@
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /W3")
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
          OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
-         OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
-         OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+         OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall")
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+    if(WIN32)
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wall")
+    else()
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall")
+    endif()
   else()
     message(FATAL_ERROR "${UNKNOWN_COMPILER_MESSAGE}")
   endif()


Android: added filtering of unwanted Android Studio toolchain file flags.

--- toolchains/android-studio.toolchain.cmake
+++ toolchains/android-studio.toolchain.cmake
@@ -21,6 +21,22 @@
 set( TNUN_os_suffix Android )

 set( CMAKE_CROSSCOMPILING true )
+
+# Remove unwanted flags from the official toolchain file
+string( REPLACE "-funwind-tables"          ""    ANDROID_COMPILER_FLAGS         "${ANDROID_COMPILER_FLAGS}" )
+string( REPLACE "-funwind-tables"          ""    CMAKE_C_FLAGS                  "${CMAKE_C_FLAGS}  "        )
+string( REPLACE "-funwind-tables"          ""    CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS}"        )
+string( REPLACE "-funwind-tables"          ""    CMAKE_ASM_FLAGS                "${CMAKE_ASM_FLAGS}"        )
+
+string( REPLACE "-fstack-protector-strong" ""    ANDROID_COMPILER_FLAGS         "${ANDROID_COMPILER_FLAGS}" )
+string( REPLACE "-fstack-protector-strong" ""    CMAKE_C_FLAGS                  "${CMAKE_C_FLAGS}  "        )
+string( REPLACE "-fstack-protector-strong" ""    CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS}"        )
+string( REPLACE "-fstack-protector-strong" ""    CMAKE_ASM_FLAGS                "${CMAKE_ASM_FLAGS}"        )
+
+string( REPLACE "-O2"                      "-O3" ANDROID_COMPILER_FLAGS_RELEASE "${ANDROID_COMPILER_FLAGS_RELEASE}" )
+string( REPLACE "-O2"                      "-O3" CMAKE_C_FLAGS_RELEASE          "${CMAKE_C_FLAGS_RELEASE}  "        )
+string( REPLACE "-O2"                      "-O3" CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}"        )
+string( REPLACE "-O2"                      "-O3" CMAKE_ASM_FLAGS_RELEASE        "${CMAKE_ASM_FLAGS_RELEASE}"        )

 if("${ANDROID_TOOLCHAIN}" STREQUAL "clang")
     include( "${CMAKE_CURRENT_LIST_DIR}/clang.cmake" )


fixed shared build on macosx (fixes #1071)

--- cmake/LighttpdMacros.cmake
+++ cmake/LighttpdMacros.cmake
@@ -7,10 +7,14 @@
   ELSE(BUILD_STATIC)
     ADD_LIBRARY(${LIBNAME} SHARED ${SRCFILES})
     SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} ${LIBNAME})
-    ## Windows likes to link it thisway back to app!
+    ## Windows likes to link it this way back to app!
     IF(WIN32)
         SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES LINK_FLAGS lighttpd.lib)
     ENDIF(WIN32)
+
+    IF(APPLE)
+        SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
+    ENDIF(APPLE)
   ENDIF(BUILD_STATIC)
 ENDMACRO(ADD_AND_INSTALL_LIBRARY)