Update library dependencies.

Update library dependencies.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,9 +1,9 @@
-set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
@@ -12,12 +12,12 @@
 set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
@@ -36,7 +36,7 @@
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmPrinter LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430AsmPrinter LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsAsmPrinter LLVMMipsCodeGen LLVMMipsInfo LLVMPIC16AsmPrinter LLVMPIC16CodeGen LLVMPIC16Info LLVMPTXAsmPrinter LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCAsmPrinter LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcAsmPrinter LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZAsmPrinter LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreAsmPrinter LLVMXCoreCodeGen LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430CodeGen LLVMMSP430Info LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget)
@@ -45,21 +45,21 @@
 set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16CodeGen LLVMPIC16Info LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPIC16CodeGen LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPIC16Passes LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils LLVMipa)
-set(MSVC_LIB_DEPS_LLVMPTXAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPTXCodeGen LLVMPTXInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPIC16Passes LLVMCore LLVMSupport LLVMTransformUtils LLVMipa)
+set(MSVC_LIB_DEPS_LLVMPTXAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPTXInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPTXInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMSystem )
-set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystemZCodeGen LLVMSystemZInfo LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport)
@@ -69,7 +69,7 @@
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreCodeGen LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)


Add 3.4 to the itcl/itk version search.

Add 3.4 to the itcl/itk version search.

svn path=/trunk/; revision=8137

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -94,7 +94,7 @@
         message(STATUS "Looking for itcl.h - found")
         message(STATUS "Looking for itcl library")
 	get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH)
-        set(itcl_library_versions 3.3 3.2 3.1 3.0 2.1 2.0)
+        set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
         foreach(version ${itcl_library_versions})
           find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH}
                        PATH_SUFFIXES itcl${version})
@@ -155,7 +155,7 @@
       if(ITK_INCLUDE_PATH)
         message(STATUS "Looking for itk.h - found")
         message(STATUS "Looking for itk library")
-        set(itk_library_versions 3.3 3.2 3.1 3.0 2.1 2.0)
+        set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
         foreach(version ${itk_library_versions})
           find_library(ITK_LIBRARY itk${version} ${TK_LIBRARY}
                        PATH_SUFFIXES itk${version})


fix postinst scrip (workes now with bash, sh, etc.)

--- cmake/packaging/Packaging.cmake
+++ cmake/packaging/Packaging.cmake
@@ -18,12 +18,14 @@

   set (CPACK_PACKAGING_INSTALL_PREFIX /usr/local/medInria CACHE STRING "Prefix where the package be install on linux plateformes")
   #Write a postinst and prerm script for Linux
-  set( INSTALL_LIBS_DIRECTORIES_STRING "\"${CPACK_PACKAGING_INSTALL_PREFIX}/lib\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/InsightToolkit\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/vtk-5.8\"" )
+  set( INSTALL_LIBS_DIRECTORIES_STRING \"${CPACK_PACKAGING_INSTALL_PREFIX}/lib\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/InsightToolkit\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/vtk-5.8\" )

   set(POSTINST_SCRIPT ${CMAKE_BINARY_DIR}/linux/postinst)
   file(WRITE ${POSTINST_SCRIPT} "\#!/bin/sh\n" )
   file(APPEND ${POSTINST_SCRIPT} "set -e\n")
-  file(APPEND ${POSTINST_SCRIPT} "echo ${INSTALL_LIBS_DIRECTORIES_STRING}>/etc/ld.so.conf.d/medInria.conf\n")
+  file(APPEND ${POSTINST_SCRIPT} "echo ${CPACK_PACKAGING_INSTALL_PREFIX}/lib>/etc/ld.so.conf.d/medInria.conf\n")
+  file(APPEND ${POSTINST_SCRIPT} "echo ${CPACK_PACKAGING_INSTALL_PREFIX}/lib/InsightToolkit>>/etc/ld.so.conf.d/medInria.conf\n")
+  file(APPEND ${POSTINST_SCRIPT} "echo ${CPACK_PACKAGING_INSTALL_PREFIX}/lib/vtk-5.8>>/etc/ld.so.conf.d/medInria.conf\n")
   file(APPEND ${POSTINST_SCRIPT} "ldconfig\n")
   file(APPEND ${POSTINST_SCRIPT} "ln -s ${CPACK_PACKAGING_INSTALL_PREFIX}/share/applications/medInria.desktop /usr/share/applications/medInria.desktop\n")
   file(APPEND ${POSTINST_SCRIPT} "ln -s ${CPACK_PACKAGING_INSTALL_PREFIX}/bin/medInria /usr/bin/medInria\n")


x11: produce x11Config.cmake

x11: produce x11Config.cmake

--- cmake/projects/x11/hunter.cmake
+++ cmake/projects/x11/hunter.cmake
@@ -36,6 +36,7 @@
     x11
     CMAKE_ARGS         # do not use double quotes on CMAKE_ARGS
       DEPENDS_ON_PACKAGES=${x11_dependencies}
+      PKGCONFIG_EXPORT_TARGETS=x11-xcb;x11
 )
 hunter_cacheable(x11)
 hunter_download(


COMP: Update KWStyle's version to avoid compile errors with C++23

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


updated FindCUDA to also work with the ubuntu nvidia-current-updates package

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -579,7 +579,11 @@
     NO_DEFAULT_PATH
     )
   # Search default search paths, after we search our own set of paths.
-  find_library(${_var} NAMES ${_names} PATH_SUFFIXES "nvidia-current" DOC ${_doc})
+  find_library(${_var} NAMES ${_names}
+    PATH_SUFFIXES
+    nvidia-current
+    nvidia-current-updates
+    DOC ${_doc})
 endmacro()

 # CUDA_LIBRARIES


fix(FindJose): fix ugly copy paste...

fix(FindJose): fix ugly copy paste...

--- cmake/FindJose.cmake
+++ cmake/FindJose.cmake
@@ -39,6 +39,6 @@
 )

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Jose REQUIRED_VARS JOSE_INCLUDE_DIRS JANSSON_LIBRARIES)
+find_package_handle_standard_args(Jose REQUIRED_VARS JOSE_INCLUDE_DIRS JOSE_LIBRARIES)

-mark_as_advanced(JOSE_INCLUDE_DIRS JANSSON_LIBRARIES)
+mark_as_advanced(JOSE_INCLUDE_DIRS JOSE_LIBRARIES)


fix: remove CMake warnings loading modules (#3906)

I noticed these with CMake-3.17.1, but may have been present before. We
cannot `include()` a module (aka package) from another because
`find_package_handle_standard_args()` generate warnings. Load the module
using `find_package()` works as expected.

--- cmake/FindgRPC.cmake
+++ cmake/FindgRPC.cmake
@@ -68,7 +68,8 @@
 # Load the module to find protobuf with proper targets. Do not use
 # `find_package()` because we (have to) install this module in non-standard
 # locations.
-include(${CMAKE_CURRENT_LIST_DIR}/FindProtobufWithTargets.cmake)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
+find_package(ProtobufWithTargets)

 # The gRPC::grpc_cpp_plugin target is sometimes defined, but without a
 # IMPORTED_LOCATION


disable-tree-vrp2 with GCC 4.8.0 - see GCC bug 56918

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -267,6 +267,9 @@
       elseif(Vc_GCC_VERSION VERSION_EQUAL 4.7.0)
          UserWarning("GCC 4.7.0 miscompiles at -O3, adding -fno-predictive-commoning to the compiler flags as workaround")
          set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -fno-predictive-commoning")
+      elseif(Vc_GCC_VERSION VERSION_EQUAL 4.8.0)
+         UserWarning("GCC 4.8.0 miscompiles at -O3, adding -fdisable-tree-vrp2 to the compiler flags as workaround")
+         set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -fdisable-tree-vrp2")
       endif()

       vc_check_fpmath()


reflect a failing integration-test to ctest

--- cmake/checkgdb.cmake
+++ cmake/checkgdb.cmake
@@ -6,4 +6,5 @@
 	#		--args ${EXECUTABLE} ${FILE} ${ARGS}
 	#			RESULT_VARIABLE GDB_RESULT)
 	#endif()
+	MESSAGE( FATAL_ERROR "FAIL:  ${ARGS}" )
 endif()


GCC's link option only take a single hyphen.

--- cmake/os/Linux.cmake
+++ cmake/os/Linux.cmake
@@ -33,7 +33,7 @@

 # Ensure we have clean build for shared libraries
 # without unresolved symbols
-SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined")
+SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")

 # 64 bit file offset support flag
 SET(_FILE_OFFSET_BITS 64)


Bugfix: Add -std=c++11 to the candidate pool of possible c++11 flags

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

--- deal.II/cmake/checks/check_for_cxx_features.cmake
+++ deal.II/cmake/checks/check_for_cxx_features.cmake
@@ -27,7 +27,7 @@
 # See if there is a compiler flag to enable C++11 features
 #
 FOREACH(test_flag
-    # "-std=c++11"
+    "-std=c++11"
     "-std=c++0x"
     )


removed obsolete fop build configuration

--- include/zorba/config.h.cmake
+++ include/zorba/config.h.cmake
@@ -147,7 +147,6 @@
 #cmakedefine ZORBA_WITH_BIG_INTEGER
 #cmakedefine ZORBA_WITH_DEBUGGER
 #cmakedefine ZORBA_WITH_FILE_ACCESS
-#cmakedefine ZORBA_WITH_FOP
 #cmakedefine ZORBA_WITH_LIBXML2_SAX
 #cmakedefine ZORBA_WITH_DEBUGGER_CLIENT


Revert of config.h change only.

Revert of config.h change only.

--- include/zorba/config.h.cmake
+++ include/zorba/config.h.cmake
@@ -67,6 +67,30 @@
 #cmakedefine ZORBA_HAVE_MS_INT32
 #cmakedefine ZORBA_HAVE_MS_UINT32
 #cmakedefine ZORBA_HAVE_UINT32_T
+
+#ifdef ZORBA_HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#ifdef ZORBA_HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#ifndef ZORBA_HAVE_INT32_T
+# ifdef ZORBA_HAVE_MS_INT32
+    typedef __int32 int32_t;
+# endif
+#endif
+
+#ifndef ZORBA_HAVE_UINT32_T
+# ifdef ZORBA_HAVE_MS_UINT32
+    typedef unsigned __int32 uint32_t;
+# endif
+#endif /* ZORBA_HAVE_UINT32_T */
+
+#ifndef ZORBA_HAVE_INT64_T
+typedef __int64 int64_t;
+#endif /* ZORBA_HAVE_INT64_T */

 // Compiler
 #cmakedefine CLANG


cmake: Rushed way to add DEPENDENCIES to service

--- etc/service.cmake
+++ etc/service.cmake
@@ -125,10 +125,18 @@
 plugin_config_option(driver DRIVER_LIST)
 plugin_config_option(plugin PLUGIN_LIST)

+# Simple way to build subdirectories before service
+foreach(DEP ${DEPENDENCIES})
+  get_filename_component(DIR_PATH "${DEP}" DIRECTORY BASE_DIR "${CMAKE_SOURCE_DIR}")
+  get_filename_component(DEP_NAME "${DEP}" NAME BASE_DIR "${CMAKE_SOURCE_DIR}")
+  #get_filename_component(BIN_PATH "${DEP}" REALPATH BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+  add_subdirectory(${DIR_PATH})
+  add_dependencies(service ${DEP_NAME})
+endforeach()
+
 # add all extra libs
 foreach(LIBR ${LIBRARIES})
   get_filename_component(LNAME ${LIBR} NAME_WE)
-
   add_library(libr_${LNAME} STATIC IMPORTED)
   set_target_properties(libr_${LNAME} PROPERTIES LINKER_LANGUAGE CXX)
   set_target_properties(libr_${LNAME} PROPERTIES IMPORTED_LOCATION ${LIBR})


Reflex gets the selection wrong if passed as ${_selection_option} and no {_name}.xml is present. Be more explicit instead and use an "else" clause.

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

--- cint/reflex/cmake/modules/ReflexTestMacros.cmake
+++ cint/reflex/cmake/modules/ReflexTestMacros.cmake
@@ -240,13 +240,16 @@
    SET(_abs_name ${CMAKE_CURRENT_SOURCE_DIR}/${_name})

    IF (EXISTS ${_abs_name}.xml)
-      SET(_selection_option SELECTION ${_name}.xml)
+      REFLEX_ADD_SINGLE_TEST(${_name}
+                             HEADERS ${_name}.hpp
+                             SELECTION ${_name}.xml
+                             TEST ${_name}Test.cxx)
+   ELSE (EXISTS ${_abs_name}.xml)
+      REFLEX_ADD_SINGLE_TEST(${_name}
+                             HEADERS ${_name}.hpp
+                             TEST ${_name}Test.cxx)
    ENDIF (EXISTS ${_abs_name}.xml)

-   REFLEX_ADD_SINGLE_TEST(${_name}
-                          HEADERS ${_name}.hpp
-                          ${_selection_option}
-                          TEST ${_name}Test.cxx)

 ENDMACRO (REFLEX_ADD_QUICK_TEST _name)


[minor] fix and improvement

[minor] fix and improvement

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -22,7 +22,7 @@
 set -u
 #set -e
 TIMESTAMP=$(date +%m-%d-%Y_%H-%M-%S)
-LOGFILE=$PWD/run_tests.log.$TIMESTAMP
+LOGFILE=$PWD/$(basename $0 .sh).log.$TIMESTAMP
 WD=$WD/$TIMESTAMP
 ORIGINAL_DIRECTORY=$PWD
 mkdir -p $WD
@@ -175,7 +175,7 @@
     fi
     configs=$(generate_translation_configurations_cuda "$configs")
     local overlap='false true'
-    local multistream='fale true'
+    local multistream='false true'
     local new_configs=""
     local idx=0
     for i in $overlap; do
@@ -343,8 +343,6 @@
     local proc_dim=$(echo $proc_dim_list | cut -d, -f$dim)
     local np=$(($(echo $proc_dim | sed 's/x/*/g')))
     echo "[EXECUTE] Run mpi as \"$MPIRUN -np $np $mfile_option $* --physis-proc $proc_dim\"" >&2
-    # make sure compiled binaries are synched to other nodes
-    sleep 30
     $MPIRUN -np $np $mfile_option $* --physis-proc $proc_dim
 }

@@ -536,6 +534,9 @@
 		if [ "$TARGET" = "mpi" -o "$TARGET" = "mpi-cuda" ]; then
 		    np_target=$MPI_PROC_DIM
 		    echo "[EXECUTE] Trying with process configurations: $np_target"
+                    # Make sure compiled binaries are synched to other nodes
+		    # This is a temporary workaround for the Raccoon cluster.
+		    sleep 30
 		fi
 		for np in $np_target; do
 		    if execute $SHORTNAME $TARGET $np $DIM; then


More patterns for cache cleanup

More patterns for cache cleanup

Fix issue #569

--- cmake/modules/hunter_flush_cache_variables.cmake
+++ cmake/modules/hunter_flush_cache_variables.cmake
@@ -24,6 +24,20 @@
     if(x MATCHES "^.*_Dir$")
       set(cleanup TRUE)
     endif()
+
+    # Issue https://github.com/ruslo/hunter/issues/569 {
+    if(x MATCHES "^Boost_.*_LIBRARY_.*$")
+      set(cleanup TRUE)
+    endif()
+
+    if(x MATCHES "^Boost_LIBRARY_DIR_.*$")
+      set(cleanup TRUE)
+    endif()
+
+    if(x MATCHES "^_Boost_LIBRARY_DIR_.*_LAST$")
+      set(cleanup TRUE)
+    endif()
+    # }

     # Exclude standard variables {
     set(


Make ctest_test PARALLEL_LEVEL configurable

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -111,9 +111,12 @@
 endfunction()

 function(func_test label build_dir)
+  if (NOT TESTING_PARALLEL_LEVEL)
+    set(TESTING_PARALLEL_LEVEL 8)
+  endif()
   ctest_test(BUILD "${build_dir}"
              INCLUDE_LABEL ${label}
-             PARALLEL_LEVEL 8
+             PARALLEL_LEVEL ${TESTING_PARALLEL_LEVEL}
              EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
              RETURN_VALUE res
             )


add 5MW dynamic test case

add 5MW dynamic test case

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -109,3 +109,4 @@
 # BeamDyn regression tests
 bd_regression("static_cantilever_beam" "beamdyn;static")
 bd_regression("isotropic_rollup"       "beamdyn;static")
+bd_regression("5MW_dynamic"            "beamdyn;dynamic")


fix missing quotes

fix missing quotes

--- cake-src/cake.cmake
+++ cake-src/cake.cmake
@@ -498,7 +498,7 @@
 endif()

 # try to load cmake_generator_from_cmakecache from the binary dir
-if(NOT opt_rm_bin AND IS_DIRECTORY ${CAKE_BINARY_DIR} AND EXISTS ${CAKE_BINARY_DIR}/CMakeCache.txt)
+if(NOT opt_rm_bin AND IS_DIRECTORY "${CAKE_BINARY_DIR}" AND EXISTS "${CAKE_BINARY_DIR}/CMakeCache.txt")
 	file(STRINGS ${CAKE_BINARY_DIR}/CMakeCache.txt v REGEX "CMAKE_GENERATOR")
 	string(REGEX MATCH "^[\t ]*CMAKE_GENERATOR:INTERNAL=(.*)$" v ${v})
 	set(cmake_generator_from_cmakecache ${CMAKE_MATCH_1})


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -91,10 +91,10 @@
 	else()
 		set(NO_USE_CACHE_LOCAL ${NOCACHE_LOCAL})
 	endif()
-	if(NOT DEFINED NOCACHE)
+	if(NOT DEFINED NOCACHE_REMOTE)
 		set(NO_USE_CACHE_REMOTE FALSE)
 	else()
-		set(NO_USE_CACHE_REMOTE ${NOCACHE})
+		set(NO_USE_CACHE_REMOTE ${NOCACHE_REMOTE})
 	endif()

 	#######################################################
@@ -133,8 +133,10 @@
 		set(package_cmake_filename ${PACKAGE}-${VERSION}-${CMAKI_PLATFORM}-cmake.tar.gz)
 		set(http_package_cmake_filename ${CMAKI_REPOSITORY}/download.php?file=${package_cmake_filename})
 		# 4. descargo el fichero que se supone tienes los ficheros cmake
-		# TODO: evitar descarga si NO_USE_CACHE_REMOTE es true
-		cmaki_download_file("${http_package_cmake_filename}" "${package_uncompressed_file}")
+		if(NOT ${NO_USE_CACHE_REMOTE})
+			cmaki_download_file("${http_package_cmake_filename}" "${package_uncompressed_file}")
+			message("Downloading ${http_package_cmake_filename} ...")
+		endif()
 		# Si no puede descargar el artefacto ya hecho (es que necesito compilarlo y subirlo)
 		if(NOT "${COPY_SUCCESFUL}" OR ${NO_USE_CACHE_REMOTE})

@@ -386,6 +388,7 @@
 		if(EXISTS "${package_compressed_md5}")
 			file(READ "${package_compressed_md5}" md5sum )
 			string(REGEX MATCH "[0-9a-fA-F]*" md5sum "${md5sum}")
+			# TODO: use md5sum
 			# cmaki_download_file("${http_package_cmake_filename}" "${package_compessed}" "${md5sum}" )
 			cmaki_download_file("${http_package_cmake_filename}" "${package_compessed}")
 			if( NOT "${COPY_SUCCESFUL}" )
@@ -400,7 +403,7 @@

 	if(EXISTS "${package_compessed}")
 		file(MAKE_DIRECTORY "${package_uncompressed_dir}")
-		MESSAGE("Extracting ${package_compessed} into ${package_uncompressed_dir}...")
+		message("Extracting ${package_compessed} into ${package_uncompressed_dir}...")
 		execute_process(
 			COMMAND "${CMAKE_COMMAND}" -E tar zxf "${package_compessed}"
 			WORKING_DIRECTORY "${package_uncompressed_dir}"


trying to fix FFTW3 issue

trying to fix FFTW3 issue

--- SuperBuild/External_SIRF.cmake
+++ SuperBuild/External_SIRF.cmake
@@ -57,12 +57,18 @@
   message(STATUS "HDF5_ROOT in External_SIRF: " ${HDF5_ROOT})
   set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR})

-  if (WIN32)
+  if (WIN32 AND DEFINED "USE_SYSTEM_FFTW3")
     set(extra_args1 "-DFFTW3F_LIBRARY=${FFTW3F_LIBRARY}")
     set(extra_args2 "-DFFTW3_INCLUDE_DIR=${FFTW3_INCLUDE_DIR}")
   else()
     set(extra_args1 "")
     set(extra_args2 "")
+  endif()
+
+  if (WIN32)
+    set(extra_args "-DSIRF_INSTALL_DEPENDENCIES=ON")
+  else()
+    set(extra_args "")
   endif()

   ExternalProject_Add(${proj}
@@ -98,6 +104,7 @@
         -DNiftyReg_Binary_DIR=${NiftyReg_Binary_DIR}
 		${extra_args1}
 		${extra_args2}
+		${extra_args}
 	INSTALL_DIR ${SIRF_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}


Updated VMTK branch to test proposed VMTK changes on the Slicer dashboard

--- SuperBuild/External_VMTK.cmake
+++ SuperBuild/External_VMTK.cmake
@@ -26,7 +26,7 @@
     #GIT_REPOSITORY "${git_protocol}://github.com/vmtk/vmtk.git"
     #GIT_TAG "2cecfb427a45bbb5240de687929954c60ebab06f" # "more debugging test for mac os 10.13" (58c8829) commit broke Python wrapping, so we need to use the one before
     GIT_REPOSITORY "${git_protocol}://github.com/rlizzo/vmtk"
-    GIT_TAG "slicer-fix"
+    GIT_TAG "update_cmake_policies"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build
     CMAKE_CACHE_ARGS


fpta-cmake: add '-flto-thin' for CLANG >= 3.9

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -528,10 +528,15 @@
   endif()

   if(CMAKE_COMPILER_IS_CLANG AND LTO_ENABLED)
-    add_compile_flags("C;CXX" "-flto")
-    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -flto -fverbose-asm -fwhole-program")
-    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -flto -fverbose-asm")
-    set(MODULE_LINKER_FLAGS "${MODULE_LINKER_FLAGS} -flto -fverbose-asm")
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)
+      set(CLANG_LTO_FLAG "-flto")
+    else()
+      set(CLANG_LTO_FLAG "-flto=thin")
+    endif()
+    add_compile_flags("C;CXX" ${CLANG_LTO_FLAG})
+    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} ${CLANG_LTO_FLAG} -fverbose-asm -fwhole-program")
+    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} ${CLANG_LTO_FLAG} -fverbose-asm")
+    set(MODULE_LINKER_FLAGS "${MODULE_LINKER_FLAGS} ${CLANG_LTO_FLAG} -fverbose-asm")
   endif()

   # LY: push C/CXX flags into the cache


* Depressed attempt to fix vulkan on linux aaaaah

--- cmake/setup_configs.cmake
+++ cmake/setup_configs.cmake
@@ -10,7 +10,13 @@
 	message(STATUS "configure_vulkan(${target}): $VULKAN_SDK == $ENV{VULKAN_SDK}")
 	target_link_directories(${target} PUBLIC "$ENV{VULKAN_SDK}/Lib")
 	target_include_directories(${target} PUBLIC "$ENV{VULKAN_SDK}/include")
-	target_link_libraries(${target} PUBLIC vulkan-1 vma)
+	# This is absurd
+	if(WIN32)
+		target_link_libraries(${target} PUBLIC vulkan-1 vma)
+	elseif(UNIX)
+		target_link_libraries(${target} PUBLIC vulkan vma)
+	endif()
+
 endfunction()

 function(configure_debug target)


Do not cache deprecated PYTHON_INCLUDE_PATH.

This variable has been deprecated for years and its presence in
the cache can lead to frustration.  If a user removes the variable
PYTHON_INCLUDE_DIR from their cache (e.g. while trying to debug a
build), then cmake will use PYTHON_INCLUDE_PATH instead of searching
the system for Python.h like it should.  Removing PYTHON_INCLUDE_PATH
from the cache fixes this problem.

Change-Id: I23e5abf8655f31f19daa144489983d2adf206aad

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -70,13 +70,6 @@
     PATH_SUFFIXES python${_CURRENT_VERSION}/config
   )

-  # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
-  # PYTHON_INCLUDE_DIR is not set.
-  IF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
-    SET(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
-      "Path to where Python.h is found" FORCE)
-  ENDIF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
-
   # Only look for include directory if library was found, this ensures
   # that version will be matched between include dir and library
   IF(PYTHON_LIBRARY)
@@ -105,9 +98,8 @@
     )
   ENDIF(PYTHON_LIBRARY)

-  # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
-  SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
-    "Path to where Python.h is found (deprecated)")
+  # For backward compatibility, set PYTHON_INCLUDE_PATH
+  SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")

 ENDFOREACH(_CURRENT_VERSION)


Add osgParticle to list of libraries

Add osgParticle to list of libraries

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -24,7 +24,8 @@
     osgFX
     osgViewer
     osgVolume
-    osgShadow
+    osgShadow
+    osgParticle
     OpenThreads)

 FIND_PATH(OSG_INCLUDE_DIR osg/Node


ctest: rm build dir only if it exists

ctest: rm build dir only if it exists

Avoid a ctest warning by checking that the directory exists prior to
calling CTEST_EMPTY_BINARY_DIRECTORY.

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- test.cmake
+++ test.cmake
@@ -213,7 +213,6 @@
 ################################################################################
 string(REGEX REPLACE "[][ ():,]" "" CTEST_BINARY_DIRECTORY "${CTEST_BUILD_NAME}")
 set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build-${dashboard_model}-${CTEST_BINARY_DIRECTORY}")
-file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")

 # Give user feedback
 ################################################################################
@@ -321,6 +320,8 @@
       ctest_sleep(${START_TIME} 1200 ${CTEST_ELAPSED_TIME})
    endwhile()
 else()
-   CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
+   if(EXISTS "${CTEST_BINARY_DIRECTORY}")
+      CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
+   endif()
    go()
 endif()


ctest: attach configure log files

ctest: attach configure log files

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- test.cmake
+++ test.cmake
@@ -296,6 +296,10 @@
             OPTIONS "${configure_options}"
             APPEND
             RETURN_VALUE res)
+         list(APPEND CTEST_NOTES_FILES
+            #"${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeOutput.log"
+            "${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeError.log"
+            )
          ctest_submit(PARTS Notes Configure)
       endif()
       if(res EQUAL 0)


ENH: Bump versions of ExternalProjects

ENH: Bump versions of ExternalProjects

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -25,25 +25,26 @@

 # Cppcheck version 1.61
-set( Cppcheck_URL
-  ${github_protocol}://github.com/danmar/cppcheck.git )
+set( Cppcheck_URL ${github_protocol}://github.com/danmar/cppcheck.git )
 set( Cppcheck_HASH_OR_TAG 1.61 )

 # TubeTK Image Viewer
-set( ImageViewer_URL ${github_protocol}://github.com/KitwareMedical/ImageViewer.git )
+set( ImageViewer_URL
+  ${github_protocol}://github.com/KitwareMedical/ImageViewer.git )
 set( ImageViewer_HASH_OR_TAG 2f728d05fe159828e6221e1420b9c3a00295315b )

 # JsonCpp
 # ${svn_protocol}://svn.code.sf.net/p/jsoncpp/code/trunk/jsoncpp )
-set( JsonCpp_URL http://midas3.kitware.com/midas/download/bitstream/366544/JsonCpp_r276.tar.gz )
-set( JsonCpp_HASH_OR_TAG 192f0cf2b00798d4f4fb29c99a3aa83c )
+# http://midas3.kitware.com/midas/download/bitstream/366544/JsonCpp_r276.tar.gz
+set( JsonCpp_URL ${git_protocol}://github.com/open-source-parsers/jsoncpp.git )
+set( JsonCpp_HASH_OR_TAG 9234cbbc90d1f6c70dd5a90b4d533779e45c820c )

 # KWStyle
 set( KWStyle_URL
   ${git_protocol}://github.com/Kitware/KWStyle.git )
-set( KWStyle_HASH_OR_TAG d23ea3680dcdd375d6fdab50de9dae7090f73ed6 )
+set( KWStyle_HASH_OR_TAG 22f2e0bd4ec4c94ca85af0ce24747e67a17b4c52 )

-# LIBSVM version 3.17 (minimum version 3.1)
+# LIBSVM version 3.2 (minimum version 3.1)
 set( LIBSVM_URL
   ${git_protocol}://github.com/KitwareMedical/libsvm.git )
 set( LIBSVM_HASH_OR_TAG 55fbd26a0bb53efffe89eb65b3a046c3ecc9965f )
@@ -51,23 +52,23 @@

 ###########################################################
 ###########################################################
-# The following were copied from Slicer on 2015.08.29
+# The following were copied from Slicer on 11/22/2015
 ###########################################################
 ###########################################################

 # Common Toolkit
 set( CTK_URL ${github_protocol}://github.com/commontk/CTK.git )
-set( CTK_HASH_OR_TAG 35a187ff5ae15f1c590a2ac317cd102c5746a81b )
+set( CTK_HASH_OR_TAG 5f581323b6526caf5ff293d9a810a3c9f68343d9 )

 # Insight Segmentation and Registration Toolkit
 set( ITK_URL ${github_protocol}://github.com/Slicer/ITK.git )
-set( ITK_HASH_OR_TAG 0905a43149320d8c2993e83ecf6c8a9d6b2b4232 )
+set( ITK_HASH_OR_TAG 03055046e2693349937339975df4e16b598609c1 )

 # Slicer Execution Model
 set( SlicerExecutionModel_URL
   ${github_protocol}://github.com/Slicer/SlicerExecutionModel.git )
-set( SlicerExecutionModel_HASH_OR_TAG 608c7b06f9402b35f0ec01550a3b9e313582f683 )
+set( SlicerExecutionModel_HASH_OR_TAG 311eff9038be165c1341dab90196fbd7466e715a )

 # Visualization Toolkit (3D Slicer fork)
 set( VTK_URL ${github_protocol}://github.com/Slicer/VTK.git )
-set( VTK_HASH_OR_TAG 716b0f56fc4bd4b9fcca05f386ec375bcd674122 )
+set( VTK_HASH_OR_TAG fe92273888219edca422f3a308761ddcd2882e2b)


Maximum address sanitizer optimization level is -O1

--- flags/sanitize_address.cmake
+++ flags/sanitize_address.cmake
@@ -9,9 +9,18 @@

 set(
     CMAKE_CXX_FLAGS
-    "${CMAKE_CXX_FLAGS} -fsanitize=address"
+    "${CMAKE_CXX_FLAGS} -fsanitize=address -g"
     CACHE
     STRING
     "C++ compiler flags"
     FORCE
 )
+
+set(
+    CMAKE_CXX_FLAGS_RELEASE
+    "-O1"
+    CACHE
+    STRING
+    "C++ compiler flags"
+    FORCE
+)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Fix glow module header in find script

Fix glow module header in find script

--- glow-config.cmake
+++ glow-config.cmake
@@ -98,9 +98,9 @@

 endmacro()

-find(glow   glow/glow.h             ${LIB_PATHS})
-find(utils  glowutils/glowutils.h   ${LIB_PATHS})
-find(window glowwindow/glowwindow.h ${LIB_PATHS})
+find(glow   glow/glow_api.h             ${LIB_PATHS})
+find(utils  glowutils/glowutils_api.h   ${LIB_PATHS})
+find(window glowwindow/glowwindow_api.h ${LIB_PATHS})

 # DEBUG
 #message("GLOW_INCLUDES  = ${GLOW_INCLUDES}")


[CMake] Download TensorBoard dependencies to separate directories to avoid filename conflicts.

--- tensorflow/contrib/cmake/external/tensorboard.cmake
+++ tensorflow/contrib/cmake/external/tensorboard.cmake
@@ -8,7 +8,7 @@
   ExternalProject_Add(${_TB_NAME}
     PREFIX ${_TB_NAME}
     URL ${_TB_URL}
-    DOWNLOAD_DIR "${DOWNLOAD_LOCATION}"
+    DOWNLOAD_DIR "${DOWNLOAD_LOCATION}/${_TB_NAME}"
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND ""
@@ -30,9 +30,9 @@
 function(tb_http_file)
   cmake_parse_arguments(_TB "" "NAME;URL" "" ${ARGN})
   get_filename_component(src_file ${_TB_URL} NAME)
-  file(DOWNLOAD ${_TB_URL} "${DOWNLOAD_LOCATION}/${src_file}")
+  file(DOWNLOAD ${_TB_URL} "${DOWNLOAD_LOCATION}/${_TB_NAME}/${src_file}")

-  set(src_dir "${DOWNLOAD_LOCATION}")
+  set(src_dir "${DOWNLOAD_LOCATION}/${_TB_NAME}")
   set(dst_dir "${CMAKE_CURRENT_BINARY_DIR}/tensorboard_external/${_TB_NAME}/file")

   add_custom_command(


Added debugging output to CMake module

Added debugging output to CMake module

--- source/raptor/FindRAPTOR.cmake
+++ source/raptor/FindRAPTOR.cmake
@@ -44,7 +44,7 @@
               /opt/include
               /usr/freeware/include
               /usr/local/include/raptor2    # Homebrew
-              ~/.linuxbrew/include/raptor2  # linuxbrew
+              $ENV{HOME}/.linuxbrew/include/raptor2  # linuxbrew
               /usr/include/raptor2
              NO_DEFAULT_PATH)

@@ -74,6 +74,11 @@
     if (NOT RAPTOR_LIBRARY)
     find_library(RAPTOR_LIBRARY NAMES raptor2 libraptor2)
     endif ()
+
+    message("Found Raptor at ${RAPTOR_LIBRARY}")
+    message("$ENV{HOME}")
+    file(GLOB_RECURSE include_files LIST_DIRECTORIES true $ENV{HOME}/.linuxbrew/include/*)
+    message("${include_files}")

     if (NOT WIN32)
         find_package(PkgConfig)


Fixed error in CMake module

Fixed error in CMake module

--- source/raptor/FindRAPTOR.cmake
+++ source/raptor/FindRAPTOR.cmake
@@ -76,7 +76,7 @@
     endif ()
     message("Found Raptor at ${RAPTOR_LIBRARY}")
     message("home: $ENV{HOME}")
-    message("user: $ENV{USER}"
+    message("user: $ENV{USER}")
     file(GLOB_RECURSE include_files LIST_DIRECTORIES true home/$ENV{USER}/.linuxbrew/include/*)
     message("${include_files}")


libcmaes and CMA-ES are OFF by default

libcmaes and CMA-ES are OFF by default

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -137,7 +137,7 @@
 ROOT_BUILD_OPTION(ldap ON "LDAP support, requires (Open)LDAP libs")
 ROOT_BUILD_OPTION(mathmore ON "Build the new libMathMore extended math library, requires GSL (vers. >= 1.8)")
 ROOT_BUILD_OPTION(memstat ${memstat_defvalue} "A memory statistics utility, helps to detect memory leaks")
-ROOT_BUILD_OPTION(libcmaes ON "Build the libcmaes minimizer library")
+ROOT_BUILD_OPTION(libcmaes OFF "Build the libcmaes minimizer library")
 ROOT_BUILD_OPTION(minuit2 ${minuit2_defvalue} "Build the new libMinuit2 minimizer library")
 ROOT_BUILD_OPTION(monalisa ON "Monalisa monitoring support, requires libapmoncpp")
 ROOT_BUILD_OPTION(mysql ON "MySQL support, requires libmysqlclient")


Remove 'thread' build option since it has no effect anywhere

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -150,7 +150,6 @@
 ROOT_BUILD_OPTION(sqlite ON "Enable support for SQLite")
 ROOT_BUILD_OPTION(ssl ON "Enable support for SSL encryption via OpenSSL")
 ROOT_BUILD_OPTION(tcmalloc OFF "Use tcmalloc memory allocator")
-ROOT_BUILD_OPTION(thread ON "Enable support for multi-threading (cannot be disabled)")
 ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library")
 ROOT_BUILD_OPTION(tmva-cpu ON "Build TMVA with CPU support for deep learning (requires BLAS)")
 ROOT_BUILD_OPTION(tmva-gpu OFF "Build TMVA with GPU support for deep learning (requries CUDA)")
@@ -296,7 +295,7 @@

 #---Apply minimal or gminimal------------------------------------------------------------------
 foreach(opt ${root_build_options})
-  if(NOT opt MATCHES "thread|builtin_llvm|builtin_clang|shared|explicitlink")
+  if(NOT opt MATCHES "builtin_llvm|builtin_clang|shared|explicitlink")
     if(minimal)
       set(${opt}_defvalue OFF)
     elseif(gminimal AND NOT opt MATCHES "x11|cocoa")


CMake/Clang: fix build type variable

CMake/Clang: fix build type variable

--- modules/acore/cmake/compiler/clang/settings.cmake
+++ modules/acore/cmake/compiler/clang/settings.cmake
@@ -1,5 +1,5 @@
 # Set build-directive (used in core to tell which buildtype we used)
-add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"')
+add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')

 if(WITH_WARNINGS)
   set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors -Wno-mismatched-tags")


Make compiler vars cached vars

Make compiler vars cached vars

This enables overriding them with CMake command line variable
definitions, which is needed to use ccache.

--- toolchain/iOS.cmake
+++ toolchain/iOS.cmake
@@ -46,8 +46,8 @@
 endif (CMAKE_UNAME)

 # Force the compilers to gcc for iOS
-set (CMAKE_C_COMPILER /usr/bin/gcc)
-set (CMAKE_CXX_COMPILER /usr/bin/g++)
+set(CMAKE_C_COMPILER /usr/bin/gcc CACHE STRING "")
+set(CMAKE_CXX_COMPILER /usr/bin/g++ CACHE STRING "")
 set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
 set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
 set(PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE)


cmake: Initialize <projectname>_BUILD_SLICER_EXTENSION with Slicer_DIR if set

Logic adapted from https://github.com/QIICR/dcmqi


More BlueGene tweaks

More BlueGene tweaks

--- Common.cmake
+++ Common.cmake
@@ -95,13 +95,14 @@

 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
   set(LINUX TRUE)
-  add_definitions(-fPIC)

   if(REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
     set(LIB_SUFFIX 64 CACHE STRING "Library directory suffix")
   endif()
   if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
     set(LINUX_PPC 1)
+  else()
+    add_definitions(-fPIC)
   endif()
 endif()
 set(LIBRARY_DIR lib${LIB_SUFFIX})


renamed directory: nginx-sf1r -> nginx-hello-module

--- test.cmake
+++ test.cmake
@@ -1,3 +1,3 @@
 # run Test::Nginx
 set(ENV{TEST_NGINX_BINARY} ${NGINX})
-execute_process(COMMAND ${PROVE} -I${LIB} -I${INC} WORKING_DIRECTORY ${DIR})
+execute_process(COMMAND ${PROVE} -v -I${LIB} -I${INC} WORKING_DIRECTORY ${DIR})


[ice40] Lower packing density target to make routing easier.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- ice40/icestorm.cmake
+++ ice40/icestorm.cmake
@@ -80,7 +80,7 @@
     VPR_ARCH_ARGS "\
       --clock_modeling route \
       --allow_unrelated_clustering off \
-      --target_ext_pin_util 0.7 \
+      --target_ext_pin_util 0.5 \
       --astar_fac 1.0 \
       --router_init_wirelength_abort_threshold 2 \
       --congested_routing_iteration_threshold 0.8"


Remove duplicate comment line

Remove duplicate comment line

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -65,7 +65,6 @@
 #    SIMULATOR_WATCHOS = Build for x86_64 for watchOS Simulator.
 #
 # CMAKE_OSX_SYSROOT: Path to the SDK to use.  By default this is
-#    automatically determined from PLATFORM and xcodebuild, but
 #    automatically determined from PLATFORM and xcodebuild, but
 #    can also be manually specified (although this should not be required).
 #


Update gemmlowp version for cmake build

Update gemmlowp version for cmake build

The gemmlowp has been updated in bazel, though
cmake version was not updated. This fix updates
gemmlowp in cmake so that cmake and bazel versions
are synced.

The fix has been tested on Linux:
```
tensorflow/tools/ci_build/ci_build.sh CMAKE tensorflow/tools/ci_build/builds/cmake.sh
```

Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>

--- tensorflow/contrib/cmake/external/gemmlowp.cmake
+++ tensorflow/contrib/cmake/external/gemmlowp.cmake
@@ -14,8 +14,8 @@
 # ==============================================================================
 include (ExternalProject)

-set(gemmlowp_URL https://github.com/google/gemmlowp/archive/6a2a90822e8546fc2bfa7044de0faf1c1cb4862f.zip)
-set(gemmlowp_HASH SHA256=3447948d219f3270383766bbe08942888c0eb4e0ca6663c0e0548502ec5bb77d)
+set(gemmlowp_URL https://github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip)
+set(gemmlowp_HASH SHA256=b87faa7294dfcc5d678f22a59d2c01ca94ea1e2a3b488c38a95a67889ed0a658)
 set(gemmlowp_BUILD ${CMAKE_CURRENT_BINARY_DIR}/gemmlowp/src/gemmlowp)
 set(gemmlowp_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/gemmlowp/src/gemmlowp)


Explicit test link_libraries are added before test_libraries

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -50,8 +50,8 @@
   endif()

   # Test link libraries
-  target_link_libraries(${PROJECT_NAME}_${NAME} ${TEST_LIBRARIES}
-    ${${NAME}_LINK_LIBRARIES})
+  target_link_libraries(${PROJECT_NAME}_${NAME}
+                    ${${NAME}_LINK_LIBRARIES} ${TEST_LIBRARIES})
   # Per target test command customisation with
   # ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS
   set(RUN_PREFIX ${TEST_PREFIX})


Remove debug messages

Remove debug messages

--- FindGoogleMock.cmake
+++ FindGoogleMock.cmake
@@ -237,7 +237,6 @@

             if (GTEST_SRC_DIR)

-                message ("Adding GTest subdirectory")
                 add_subdirectory (${GTEST_SRC_DIR}
                                   ${CMAKE_CURRENT_BINARY_DIR}/src/gtest)

@@ -287,7 +286,6 @@
                 set (GMOCK_INCLUDE_DIR ${GMOCK_INCLUDE_DIR})
                 set (GTEST_INCLUDE_DIR ${GMOCK_SRC_DIR}/gtest/include)

-                message ("adding GMock subdirectory")
                 add_subdirectory (${GMOCK_SRC_DIR}
                                   ${CMAKE_CURRENT_BINARY_DIR}/src/gmock)


HINTS rather than PATHS.

HINTS rather than PATHS.

	* build-aux/cmake/modules/FindQScintilla2.cmake: Here.

--- build-aux/cmake/modules/FindQScintilla2.cmake
+++ build-aux/cmake/modules/FindQScintilla2.cmake
@@ -29,7 +29,7 @@
   if(NOT QSCINTILLA2_LIBRARY_RELEASE)
     find_library(QSCINTILLA2_LIBRARY_RELEASE
       NAMES qscintilla2
-      PATHS ${QT_LIBRARY_DIR})
+      HINTS ${QT_LIBRARY_DIR})
     if(QSCINTILLA2_LIBRARY_RELEASE)
       message(STATUS "Found qscintilla2 release library: ${QSCINTILLA2_LIBRARY_RELEASE}")
     endif(QSCINTILLA2_LIBRARY_RELEASE)
@@ -38,7 +38,7 @@
   if(NOT QSCINTILLA2_LIBRARY_DEBUG)
     find_library(QSCINTILLA2_LIBRARY_DEBUG
       NAMES qscintilla2d
-      PATHS ${QT_LIBRARY_DIR})
+      HINTS ${QT_LIBRARY_DIR})
     if(QSCINTILLA2_LIBRARY_DEBUG)
       message(STATUS "Found qscintilla2 debug library: ${QSCINTILLA2_LIBRARY_DEBUG}")
     else(QSCINTILLA2_LIBRARY_DEBUG)
@@ -68,7 +68,7 @@
 if(NOT QSCINTILLA2_INCLUDE_DIR)
   find_path(QSCINTILLA2_INCLUDE_DIR
     NAMES Qsci/qsciapis.h
-    PATHS ${QT_INCLUDE_DIR})
+    HINTS ${QT_INCLUDE_DIR})
   if(QSCINTILLA2_INCLUDE_DIR)
     message(STATUS "Found qscintilla2 headers directory: "
       "${QSCINTILLA2_INCLUDE_DIR}")
@@ -85,7 +85,7 @@
   # own lexer).
   find_path(QSCINTILLA2_SCINTILLA_INCLUDE_DIR
     NAMES Qsci/scintilla/include/Scintilla.h
-    PATHS ${QSCINTILLA2_INCLUDE_DIR})
+    HINTS ${QSCINTILLA2_INCLUDE_DIR})
   if(QSCINTILLA2_SCINTILLA_INCLUDE_DIR)
     message(STATUS "Found scintilla header directory: "
       "${QSCINTILLA2_SCINTILLA_INCLUDE_DIR}")


beautification

beautification

--- lib/OpenCogFunctions.cmake
+++ lib/OpenCogFunctions.cmake
@@ -12,79 +12,77 @@
 # 4. Everything should be explicit

 FUNCTION(ADD_GUILE_MODULE SCHEME_FILE)
-# MODULE_FILE: The name of the file that defines the module. It has the same
-#       name as the directory it is in, or the name of the parent directory of
-#       current directory if it is in a folder named 'scm' and used to define
-#       the module.
+    FOREACH(FILE_NAME ${ARGV})
+        # NOTE: Directory paths are not allowed as module names.
+        STRING(REGEX MATCH "([a-z0-9/-]+)/([a-z0-9/-]*)" "" ${FILE_NAME})
+        IF(CMAKE_MATCH_2)
+            MESSAGE(FATAL_ERROR "Only files found in "
+                "${CMAKE_CURRENT_SOURCE_DIR} are allowed")
+        ENDIF()
+        # MODULE_FILE: The name of the file that defines the module. It has
+        #   the same name as the directory it is in, or the name of the parent
+        #   directory of current directory if it is in a folder named 'scm'
+        #   and used to define the module.
+        SET(MODULE_FILE ${FILE_NAME})

-FOREACH(FILE_NAME ${ARGV})
-    # NOTE: Directory paths are not allowed as module names.
-    STRING(REGEX MATCH "([a-z0-9/-]+)/([a-z0-9/-]*)" "" ${FILE_NAME})
-    IF(CMAKE_MATCH_2)
-        MESSAGE(FATAL_ERROR "Only files found in "
-            "${CMAKE_CURRENT_SOURCE_DIR} are allowed")
-    ENDIF()
-    SET(MODULE_FILE ${FILE_NAME})
+        # Check if the file exists
+        IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE})
+            MESSAGE(FATAL_ERROR "${MODULE_FILE} file does not exist in "
+                ${CMAKE_CURRENT_SOURCE_DIR})
+        ENDIF()

-    # Check if the file exists
-    IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE})
-        MESSAGE(FATAL_ERROR "${MODULE_FILE} file does not exist in "
+        # Clean path for specifying module paths
+        # NOTE: Names of modules should be small-letters.
+        # TODO: There can only be 1 folder named `scm` in path but there is no
+        # check for that add it.
+        STRING(REGEX MATCH
+            "^(${CMAKE_HOME_DIRECTORY})/([a-z0-9/-]+)/(scm?)([a-z0-9/-]*)" ""
             ${CMAKE_CURRENT_SOURCE_DIR})
-    ENDIF()

-    # Clean path for specifying module paths
-    # NOTE: Names of modules should be small-letters.
-    # TODO: There can only be 1 folder named `scm` in path but there is no
-    # check for that add it.
-    STRING(REGEX MATCH
-        "^(${CMAKE_HOME_DIRECTORY})/([a-z0-9/-]+)/(scm?)([a-z0-9/-]*)" ""
-        ${CMAKE_CURRENT_SOURCE_DIR})
+        IF(CMAKE_MATCH_0)
+            SET(CLEAN_PATH "${CMAKE_HOME_DIRECTORY}/${CMAKE_MATCH_2}${CMAKE_MATCH_4}")
+        ELSE()
+            SET(CLEAN_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+        ENDIF()

-    IF(CMAKE_MATCH_0)
-        SET(CLEAN_PATH "${CMAKE_HOME_DIRECTORY}/${CMAKE_MATCH_2}${CMAKE_MATCH_4}")
-    ELSE()
-        SET(CLEAN_PATH ${CMAKE_CURRENT_SOURCE_DIR})
-    ENDIF()
+        # Specify the module paths.
+        STRING(REGEX MATCH
+            "^(${CMAKE_HOME_DIRECTORY})/([a-z0-9/-]+)+/([a-z0-9-]+)" ""
+            ${CLEAN_PATH})

-    # Specify the module paths.
-    STRING(REGEX MATCH
-        "^(${CMAKE_HOME_DIRECTORY})/([a-z0-9/-]+)+/([a-z0-9-]+)" ""
-        ${CLEAN_PATH})
+        # MODULE_NAME: it is equal to the current directory name, or the current
+        #   directory's parent-directory name if the current directory is scm.
+        # MODULE_FILE_DIR_PATH: the directory path where the MODULE_FILE is
+        #   installed.
+        # MODULE_FILES_DIR_PATH: the directory path where the files associated
+        #   with the module are installed/symlinked at, with the exception of
+        #   the MODULE_FILE.
+        SET(MODULE_NAME ${CMAKE_MATCH_3})
+        SET(MODULE_FILE_DIR_PATH ${CMAKE_MATCH_2})
+        SET(MODULE_FILES_DIR_PATH ${CMAKE_MATCH_2}/${CMAKE_MATCH_3})
+        SET(GUILE_SYMLINK_DIR "${CMAKE_BINARY_DIR}/opencog/scm")
+        SET(GUILE_INSTALL_DIR "${DATADIR}/scm")

-    # MODULE_NAME: it is equal to the current directory name, or the current
-    #       directory's parent-directory name if the current directory is scm.
-    # MODULE_FILE_DIR_PATH: the directory path where the MODULE_FILE is
-    #       installed.
-    # MODULE_FILES_DIR_PATH: the directory path where the files associated
-    #       with the module are installed/symlinked at, with the exception of
-    #       the MODULE_FILE.
-    SET(MODULE_NAME ${CMAKE_MATCH_3})
-    SET(MODULE_FILE_DIR_PATH ${CMAKE_MATCH_2})
-    SET(MODULE_FILES_DIR_PATH ${CMAKE_MATCH_2}/${CMAKE_MATCH_3})
-    SET(GUILE_SYMLINK_DIR "${CMAKE_BINARY_DIR}/opencog/scm")
-    SET(GUILE_INSTALL_DIR "${DATADIR}/scm")
-
-    # Create symlinks in build directory mirroring the install path structure.
-    # Also configure for install.
-    IF ("${MODULE_NAME}.scm" STREQUAL "${MODULE_FILE}")
-        EXECUTE_PROCESS(
-            COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILE_DIR_PATH}
-            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${MODULE_FILE}"
-        )
-        INSTALL(FILES
-            ${MODULE_FILE}
-            DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILE_DIR_PATH}"
-        )
-    ELSE()
-        EXECUTE_PROCESS(
-            COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILES_DIR_PATH}
-            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILES_DIR_PATH}/${MODULE_FILE}"
-        )
-        INSTALL (FILES
-            ${MODULE_FILE}
-            DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILES_DIR_PATH}"
-        )
-    ENDIF()
-ENDFOREACH(FILE_NAME)
-
+        # Create symlinks in build directory mirroring the install path structure.
+        # Also configure for install.
+        IF ("${MODULE_NAME}.scm" STREQUAL "${MODULE_FILE}")
+            EXECUTE_PROCESS(
+                COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILE_DIR_PATH}
+                COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${MODULE_FILE}"
+            )
+            INSTALL(FILES
+                ${MODULE_FILE}
+                DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILE_DIR_PATH}"
+            )
+        ELSE()
+            EXECUTE_PROCESS(
+                COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILES_DIR_PATH}
+                COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILES_DIR_PATH}/${MODULE_FILE}"
+            )
+            INSTALL (FILES
+                ${MODULE_FILE}
+                DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILES_DIR_PATH}"
+            )
+        ENDIF()
+    ENDFOREACH(FILE_NAME)
 ENDFUNCTION(ADD_GUILE_MODULE)


update

update

--- modules/HdrHistogram.cmake
+++ modules/HdrHistogram.cmake
@@ -10,7 +10,7 @@
     set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4146 /wd4244")
   endif()
   add_library(HdrHistogram ${SOURCE_FILES})
-  target_include_directories(HdrHistogram PRIVATE "zlib" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/zlib")
+  target_include_directories(HdrHistogram PRIVATE "zlib")
   target_link_libraries(HdrHistogram zlib)

   # Module folder


Added missing qt dependencies for tests

Added missing qt dependencies for tests

--- test/cmake/qtest.cmake
+++ test/cmake/qtest.cmake
@@ -2,11 +2,13 @@
 set(CMAKE_AUTORCC ON)
 set(CMAKE_INCLUDE_CURRENT_DIR ON)

+find_package(Qt5Core)
 find_package(Qt5Test)
+find_package(Qt5Sql)

-if(Qt5Test_FOUND)
-    set (EXTRA_LIBS ${EXTRA_LIBS} Qt5::Test)
+if(Qt5Core_FOUND AND Qt5Sql_FOUND AND Qt5Test_FOUND)
+    set (EXTRA_LIBS ${EXTRA_LIBS} Qt5::Core Qt5::Sql Qt5::Test)
 else()
     find_package(Qt4 REQUIRED)
-    set (EXTRA_LIBS ${EXTRA_LIBS} Qt4::Test)
+    set (EXTRA_LIBS ${EXTRA_LIBS} Qt4::Core Qt4::Sql Qt4::Test)
 endif()


correct typo

correct typo

--- cmake/externals/ConfigureExternalProjects.cmake
+++ cmake/externals/ConfigureExternalProjects.cmake
@@ -86,10 +86,10 @@
 foreach (external_project ${external_projects})
     call(${external_project}_project)
     if(update-${external_project})
-      set(update_dependecies ${update_dependecies} update-${external_project})
+      set(update_dependencies ${update_dependencies} update-${external_project})
     endif()
 endforeach()

 add_custom_target(update
-  DEPENDS ${update_dependecies}
+  DEPENDS ${update_dependencies}
   )


cmake: Install internal generated headers

Change-Id: I26bac80e416e73dc85f911062bfb5c74b13578bc

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -428,6 +428,7 @@
     PROPERTY PUBLIC_HEADER
       ${PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS}
       ${SERVER_GENERATED_HEADERS}
+      ${SERVER_INTERNAL_GENERATED_HEADERS}
   )

   set_target_properties(${VALUE_CODE_IMPLEMENTATION_LIB}impl PROPERTIES


Don't print init

Don't print init

--- CMake/FindArmadillo.cmake
+++ CMake/FindArmadillo.cmake
@@ -54,7 +54,8 @@
   /usr/include
   /usr/local/include
   /opt/include
-  /afs/desy.de/user/y/yoon/armadillo-3.800.2/include
+  /afs/desy.de/user/y/yoon/armadillo-3.910.1/include
+  #/afs/desy.de/user/y/yoon/armadillo-3.800.2/include
   PATH_SUFFIXES armadillo armadillo_bits
   )

@@ -66,7 +67,8 @@
   /usr/lib
   /usr/local/lib
   /opt/lib
-  /afs/desy.de/user/y/yoon/armadillo-3.800.2
+  /afs/desy.de/user/y/yoon/armadillo-3.910.1
+  #/afs/desy.de/user/y/yoon/armadillo-3.800.2
 #  /usr/lib64
   PATH_SUFFIXES
   )


add cuda include directory manually

add cuda include directory manually

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -20,6 +20,9 @@
    set(CMAKE_CUDA_STANDARD 14)
    set(CMAKE_CUDA_STANDARD_REQUIRED true)
 endif()
+
+find_package(CUDALibs)
+include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})

 #####################################
 if(ENSEMBLE_GPU_NVT)


type-o in variable name

type-o in variable name

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1285 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -183,10 +183,10 @@
         message (STATUS "trying brute-force search ")

         # take names to be directory names, and include "."
-        set (PKG_NAMES ${PKG_NAMES} ".")
+        set (${PREFIX}_PATH_NAMES ${PKG_NAMES} ".")

         # generate a combination of possible search paths
-        sagase_generate_paths (include_paths library_paths NAMES ${PKG_NAMES} PREFIXES ${PKG_PREFIXES})
+        sagase_generate_paths (include_paths library_paths NAMES ${${PREFIX}_PATH_NAMES} PREFIXES ${PKG_PREFIXES})

         # all C and C++ headers
         set (HEADER_POSTFIXES ".h" ".hpp" ".hh" ".hxx")
@@ -206,9 +206,9 @@
         foreach (component_ ${PKG_COMPONENTS})

             # get header path
-            foreach (pkgname_ ${PKG_NAMES})
+            foreach (pathnames_ ${${PREFIX}_PATH_NAMES})
                 foreach (header_extension_ ${HEADER_POSTFIXES})
-                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pkgname_}/${component_}${header_extension_} ${include_paths})
+                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pathnames_}/${component_}${header_extension_} ${include_paths})

                     if (${PREFIX}_${component_}_INCLUDE_DIR)
                         set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})


Add missing libraries

Add missing libraries

Somehow I keep forgetting to actually link the libraries against the
node modules (probably because this is only required on windows).

--- NodeJS.cmake
+++ NodeJS.cmake
@@ -580,7 +580,7 @@
     target_include_directories(${NAME} PUBLIC ${NODEJS_INCLUDE_DIRS})

     # Add link flags to the module
-    target_link_libraries(${NAME} ${NODEJS_LINK_FLAGS})
+    target_link_libraries(${NAME} ${NODEJS_LINK_FLAGS} ${NODEJS_LIBRARIES})

     # Set required properties for the module to build properly
     # Correct naming, symbol visiblity and C++ standard


Allow command-line overriding of VMCS_PLUGIN_DIR (#309)

--- makefiles/cmake/vmcs.cmake
+++ makefiles/cmake/vmcs.cmake
@@ -15,7 +15,9 @@

 SET(CMAKE_INSTALL_PREFIX "${VMCS_INSTALL_PREFIX}" CACHE INTERNAL "Prefix
     prepended to install directories" FORCE)
-SET(VMCS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_SHARED_LIBRARY_PREFIX}/plugins)
+if(NOT DEFINED VMCS_PLUGIN_DIR)
+  SET(VMCS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_SHARED_LIBRARY_PREFIX}/plugins)
+endif()

 # What kind of system are we?
 if (${UNIX})


Update CMake script for Linux

Update CMake script for Linux

--- toolchains/linux.cmake
+++ toolchains/linux.cmake
@@ -30,13 +30,6 @@
 # compile definitions (adds -DPLATFORM_LINUX)
 set(CORE_COMPILE_DEFS PLATFORM_LINUX)

-if (USE_EXTERNAL_LIBS)
-include(${EXTERNAL_LIBS_DIR}/core-dependencies.cmake)
-include(${EXTERNAL_LIBS_DIR}/glfw.cmake)
-else()
-add_subdirectory(${PROJECT_SOURCE_DIR}/external)
-endif()
-
 # load core library
 add_subdirectory(${PROJECT_SOURCE_DIR}/core)

@@ -46,14 +39,27 @@

   find_package(OpenGL REQUIRED)

+  # Build GLFW.
+  if (USE_SYSTEM_GLFW_LIBS)
+    include(FindPkgConfig)
+    pkg_check_modules(GLFW REQUIRED glfw3)
+  else()
+    # configure GLFW to build only the library
+    set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "Build the GLFW example programs")
+    set(GLFW_BUILD_TESTS OFF CACHE BOOL "Build the GLFW test programs")
+    set(GLFW_BUILD_DOCS OFF CACHE BOOL "Build the GLFW documentation")
+    set(GLFW_INSTALL OFF CACHE BOOL "Generate installation target")
+    add_subdirectory(${PROJECT_SOURCE_DIR}/platforms/common/glfw)
+  endif()
+
   # add sources and include headers
   find_sources_and_include_directories(
-    ${PROJECT_SOURCE_DIR}/linux/src/*.h
-    ${PROJECT_SOURCE_DIR}/linux/src/*.cpp)
+    ${PROJECT_SOURCE_DIR}/platforms/linux/src/*.h
+    ${PROJECT_SOURCE_DIR}/platforms/linux/src/*.cpp)

   add_executable(${EXECUTABLE_NAME}
     ${SOURCES}
-    ${PROJECT_SOURCE_DIR}/core/common/platform_gl.cpp
+    ${PROJECT_SOURCE_DIR}/platforms/common/platform_gl.cpp
     )

   target_link_libraries(${EXECUTABLE_NAME}


build everything and let CTestConfig configure the update commands

--- VCTest.cmake
+++ VCTest.cmake
@@ -4,18 +4,11 @@
 Set(CTEST_BUILD_NAME $ENV{LABEL})
 Set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 Set(CTEST_PROJECT_NAME "VC")
+Set(CTEST_CONTINUOUS_DURATION 1080)
+Set(CTEST_CONTINUOUS_MINIMUM_INTERVAL 20)
+Set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)

-
-Set(CTEST_UPDATE_TYPE git)
-
-#Find_Program(GITCOMMAND git)
-#Mark_As_Advanced(GITCOMMAND)
-
-Set(CTEST_UPDATE_COMMAND "git")
-Set(CTEST_UPDATE_OPTIONS pull)
-
-
-Set(CTEST_CONFIGURE_COMMAND "${CMAKE_EXECUTABLE_NAME} ${CTEST_SOURCE_DIRECTORY} -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=FALSE")
+Set(CTEST_CONFIGURE_COMMAND "${CMAKE_EXECUTABLE_NAME} ${CTEST_SOURCE_DIRECTORY} -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=TRUE -DBUILD_EXAMPLES=TRUE")
 Set(BUILD_COMMAND "make")
 Set(CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors}")


make -k to keep going as far as possible

--- VCTest.cmake
+++ VCTest.cmake
@@ -10,7 +10,7 @@

 Set(CTEST_CONFIGURE_COMMAND "${CMAKE_EXECUTABLE_NAME} ${CTEST_SOURCE_DIRECTORY} -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=TRUE -DBUILD_EXAMPLES=TRUE")
 Set(BUILD_COMMAND "make")
-Set(CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors}")
+Set(CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors} -k")

 if($ENV{ctest_model} STREQUAL "Continuous")
    while(${CTEST_ELAPSED_TIME} LESS 64800)


Inherit C++ flags from build environment

As suggested in : http://stackoverflow.com/questions/36765217/how-to-create-cmake-recipes-in-yocto

--- Build.cmake
+++ Build.cmake
@@ -23,7 +23,7 @@
 IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
    MESSAGE("")
    MESSAGE("cmake for Clang ")
-   SET(CMAKE_CXX_FLAGS "-Wall -std=c++11 -Wunused -D_GLIBCXX_USE_NANOSLEEP")
+   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -Wunused -D_GLIBCXX_USE_NANOSLEEP")
    IF (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++ -pthread")
    ELSE()
@@ -47,9 +47,9 @@
 ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    MESSAGE("cmake for GCC ")
    IF (APPLE)
-       set(CMAKE_CXX_FLAGS "-Wall -Wunused -std=c++11  -pthread -D_GLIBCXX_USE_NANOSLEEP")
+       set(CMAKE_CXX_FLAGS   "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++11  -pthread -D_GLIBCXX_USE_NANOSLEEP")
    ELSEIF (MINGW)
-       set(CMAKE_CXX_FLAGS "-Wall -Wunused -std=c++11  -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
+       set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++11  -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
    ELSE()
        set(PLATFORM_LINK_LIBRIES rt)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -rdynamic -Wunused -std=c++11 -pthread -lrt -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")


- bumped FOTS snapshot to May 2nd - newly added test-case "fn-substring-31" passing - "FOAR0002-5" used to report 'wrongError' now passing after fixes in FOTS Approved: Chris Hillery, Sorin Marian Nasoi

--- test/fots/ImportFOTS.cmake
+++ test/fots/ImportFOTS.cmake
@@ -19,7 +19,7 @@

 # Change this to publish updated FOTS archives
-SET (FOTS_ARCHIVE "FOTS_010513.tgz")
+SET (FOTS_ARCHIVE "FOTS_020513.tgz")

 # Change this to modify which elements in FOTS driver results are output
 # as CDATA


FIX: didable BOOST with HighFive

FIX: didable BOOST with HighFive

--- cmake/DependenciesConfig.cmake
+++ cmake/DependenciesConfig.cmake
@@ -100,6 +100,7 @@
 endmacro(configure_eigen)

 macro(configure_highfive)
+  set(HIGHFIVE_USE_BOOST OFF)
   message ("Dependency check for HighFive...")
   add_definitions(-DHIGHFIVE_USE_EIGEN)
   find_package(HighFive REQUIRED)


Fixed issues in the FindAugeas CMake module

--- cmake/Modules/FindAugeas.cmake
+++ cmake/Modules/FindAugeas.cmake
@@ -27,20 +27,20 @@

   find_library (LIBAUGEAS_LIBRARIES NAMES augeas
     PATHS
-    ${_LIBSYSTEMD_JOURNAL_PC_LIBDIR}
+    ${_LIBAUGEAS_PC_LIBDIR}
   )

   if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES)
     set (LIBAUGEAS_FOUND TRUE)
   endif (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES)

-  if (LIBAUGEAS_FOUND TRUE)
+  if (LIBAUGEAS_FOUND)
     if (NOT LIBAUGEAS_FIND_QUIETLY)
-      message(STATUS "Found augeas: ${LIBSYSTEMD_JOURNAL_LIBRARIES}")
+      message(STATUS "Found augeas: ${LIBAUGEAS_LIBRARIES}")
     endif (NOT LIBAUGEAS_FIND_QUIETLY)
   else (LIBAUGEAS_FOUND)
     if (LIBAUGEAS_FIND_REQUIRED)
-      message(FATAL_ERROR "Could NOT find systemd-journal")
+      message(FATAL_ERROR "Could NOT find augeas")
     endif (LIBAUGEAS_FIND_REQUIRED)
   endif (LIBAUGEAS_FOUND)


fixing the undefined symbol problem under Linux (gcc) by rearranging the order of cycles libraries

The order in which cycles libraries are now synced with the order cycles links them for the standalone application.
This avoids undefined symbols errors when a library is linked before parts of it are requested by later libraries.

--- cmake/modules/FindCycles.cmake
+++ cmake/modules/FindCycles.cmake
@@ -52,7 +52,7 @@

     DOC "Cycles Libraries directory")

-set(CYCLES_LIBS cycles_bvh;cycles_device;cycles_graph;cycles_kernel;cycles_render;cycles_subd;cycles_util;extern_clew;extern_cuew;extern_numaapi)
+set(CYCLES_LIBS cycles_device;cycles_kernel;cycles_render;cycles_bvh;cycles_subd;cycles_graph;cycles_util;extern_clew;extern_cuew;extern_numaapi)

 foreach (lib ${CYCLES_LIBS})
     find_library(${lib}_LIBRARY


Better FindXROOTD.cmake to cope with different versions

--- cmake/modules/FindXROOTD.cmake
+++ cmake/modules/FindXROOTD.cmake
@@ -83,13 +83,20 @@
       list(APPEND XROOTD_LIBRARIES ${XROOTD_XrdNetUtil_LIBRARY})
     endif ()
   else()
-    foreach(l XrdMain XrdUtils XrdClient XrdCl)
+    foreach(l XrdMain XrdUtils XrdClient)
       find_library(XROOTD_${l}_LIBRARY
          NAMES ${l}
          HINTS ${searchpath}
          PATH_SUFFIXES lib)
       list(APPEND XROOTD_LIBRARIES ${XROOTD_${l}_LIBRARY})
     endforeach()
+    if(${xrdversnum} GREATER 300030000)
+      find_library(XROOTD_XrdCl_LIBRARY
+         NAMES XrdCl
+         HINTS ${searchpath}
+         PATH_SUFFIXES lib)
+      list(APPEND XROOTD_LIBRARIES ${XROOTD_XrdCl_LIBRARY})
+    endif()
   endif()

   if(XROOTD_LIBRARIES)
@@ -99,7 +106,6 @@
       message(STATUS "             libraries: ${XROOTD_LIBRARIES}")
     endif()
   else ()
-    message("Herre")
     set(XROOTD_FOUND FALSE)
   endif ()
 endif()
@@ -108,7 +114,8 @@
                  XROOTD_XrdMain_LIBRARY
                  XROOTD_XrdUtils_LIBRARY
                  XROOTD_XrdClient_LIBRARY
-                 XROOTD_XrdNetUtils_LIBRARY
+                 XROOTD_XrdCl_LIBRARY
+                 XROOTD_XrdNetUtil_LIBRARY
                  XROOTD_XrdNet_LIBRARY
                  XROOTD_XrdSys_LIBRARY
                  XROOTD_XrdOuc_LIBRARY


Less confusing message about examples builds failing in _install tree_ if
pkg-config is not found.

svn path=/trunk/; revision=7234

--- cmake/modules/pkg-config.cmake
+++ cmake/modules/pkg-config.cmake
@@ -52,7 +52,7 @@
   set(PKG_CONFIG_ENV PKG_CONFIG_PATH=${PKG_CONFIG_DIR})
 else(PKGCONFIG_EXECUTABLE)
   message(STATUS "Looking for pkg-config - not found")
-  message(STATUS "WARNING: Build of examples will not work.")
+  message(STATUS "WARNING: Build of examples in install tree will not work.")
   # Turn off pkg-config build.  (This means both build methods will be
   # commented out.)
   set(pkg_config_true "#")


v8 3.29.86-90da229-p0

v8 3.29.86-90da229-p0

--- cmake/projects/v8/hunter.cmake
+++ cmake/projects/v8/hunter.cmake
@@ -41,6 +41,17 @@
     397f1fcc8a65c278ac118e1f34e16f8347fb2be5
 )

+hunter_add_version(
+    PACKAGE_NAME
+    v8
+    VERSION
+    3.29.86-90da229-p0
+    URL
+    "https://github.com/hunter-packages/v8/archive/v3.29.86-90da229-p0.tar.gz"
+    SHA1
+    57efac9bc2e7a774fdf2437c403c8ed9642ec5b7
+)
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(v8)
 hunter_download(PACKAGE_NAME v8)


adapt dictionary generation to AliRoot: - allow specifications of extra arguments (needed for ROOT 6)

--- cmake/CMakeALICE.cmake
+++ cmake/CMakeALICE.cmake
@@ -9,6 +9,8 @@
 # @LDNAME LinkDef file name, ex: LinkDef.h
 # @DHDRS  Dictionary headers
 # @DINCDIR Include folders that need to be passed to cint/cling
+# @EXTRADEFINITIONS - optional, extra compile flags specific to library
+#       - used as ${ARGV4}
 macro(generate_dictionary DNAME LDNAME DHDRS DINCDIRS)

     # Creating the INCLUDE path for cint/cling
@@ -16,36 +18,33 @@
         set(INCLUDE_PATH -I${dir} ${INCLUDE_PATH})
     endforeach()

-    # Generate the dictionary
-#    message(STATUS "Generating dictionary ${DNAME} for ${LDNAME}")
+    # Get the list of definitions from the directory to be sent to CINT
+    get_directory_property(tmpdirdefs COMPILE_DEFINITIONS)
+    foreach(dirdef ${tmpdirdefs})
+        set(GLOBALDEFINITIONS -D${dirdef} ${GLOBALDEFINITIONS})
+    endforeach()

-#    message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.cxx")
-#    message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.h")
-#    message(STATUS "bbb${INCLUDE_PATH}bbb")
-#    message(STATUS "${DHDRS} ${LDNAME}")
-#    message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}")
-
-    # Get the definitions from the directory to be sent to CINT
-    get_directory_property(tmpdirdefs DEFINITIONS)
-    string(REPLACE " " ";" tmpdirdefs "${tmpdirdefs}")
+    # Custom definitions specific to library
+    # Received as the forth optional argument
+    separate_arguments(EXTRADEFINITIONS UNIX_COMMAND "${ARGV4}")

     if (ROOT_VERSION_MAJOR LESS 6)
     add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.cxx ${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.h
                        COMMAND LD_LIBRARY_PATH=${ROOT_LIBDIR}:$ENV{LD_LIBRARY_PATH} ${ROOT_CINT}
                        ARGS -f ${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.cxx -c -p
-                       ${tmpdirdefs} ${INCLUDE_PATH}
+                       ${GLOBALDEFINITIONS} ${EXTRADEFINITIONS} ${INCLUDE_PATH}
                        ${DHDRS} ${LDNAME}
                        DEPENDS ${DHDRS} ${LDNAME} ${ROOT_CINT}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                       )
     else (ROOT_VERSION_MAJOR LESS 6)
-    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lib${DNAME}.rootmap ${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.cxx
+      add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lib${DNAME}.rootmap ${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.cxx ${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}_rdict.pcm
                        COMMAND
                          LD_LIBRARY_PATH=${ROOT_LIBDIR}:$ENV{LD_LIBRARY_PATH} ${ROOT_CINT}
                        ARGS
                          -f ${CMAKE_CURRENT_BINARY_DIR}/G__${DNAME}.cxx
                          -rmf ${CMAKE_CURRENT_BINARY_DIR}/lib${DNAME}.rootmap -rml lib${DNAME}
-                         ${tmpdirdefs} ${INCLUDE_PATH} ${DHDRS} ${LDNAME}
+                         ${GLOBALDEFINITIONS} ${EXTRADEFINITIONS} ${INCLUDE_PATH} ${DHDRS} ${LDNAME}
                        DEPENDS
                          ${DHDRS} ${LDNAME} ${ROOT_CINT}
                        WORKING_DIRECTORY


When looking for Eigen3, check also the content of enviroment variable EIGEN3_ROOT

Useful for simplify installation on windows where eigen is installed simply by unzipping it in a folder.

--- cmake/FindEigen3.cmake
+++ cmake/FindEigen3.cmake
@@ -62,6 +62,8 @@
 else (EIGEN3_INCLUDE_DIR)

   find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
+      HINTS
+      ENV EIGEN3_ROOT
       PATHS
       ${CMAKE_INSTALL_PREFIX}/include
       ${KDE4_INCLUDE_DIR}


evaluate octave-setting needed for build and install

--- cmake/FindOctave.cmake
+++ cmake/FindOctave.cmake
@@ -1,6 +1,10 @@
 # Try to find the build flags to compile octave shared objects (oct and mex files)
 # Once done this will define
 #
+# MKOCTFILE_EXECUTABLE - mkoctfile executable
+# OCTAVE_API_VERSION - octave api version
+# OCTAVE_CONFIG_EXECUTABLE - octave-config executable
+# OCTAVE_EXECUTABLE - octave interpreter
 # OCTAVE_FOUND - if Octave is found
 # OCTAVE_CXXFLAGS - extra flags
 # OCTAVE_INCLUDE_DIRS - include directories
@@ -8,14 +12,38 @@
 # OCTAVE_LIBRARY_RELEASE - the release version
 # OCTAVE_LIBRARY_DEBUG - the debug version
 # OCTAVE_LIBRARY - a default library, with priority debug.
+# OCTAVE_OCT_LOCAL_API_FILE_DIR - installation directory
+
+# find octave-config-executable
+set(OCTAVE_CONFIG_EXECUTABLE OCTAVE_CONFIG_EXECUTABLE-NOTFOUND)
+find_program(OCTAVE_CONFIG_EXECUTABLE NAMES octave-config octave-config-3.2.4)

 # use mkoctfile
 set(MKOCTFILE_EXECUTABLE MKOCTFILE_EXECUTABLE-NOTFOUND)
 find_program(MKOCTFILE_EXECUTABLE NAME mkoctfile PATHS)
-mark_as_advanced(MKOCTFILE_EXECUTABLE)

-if(MKOCTFILE_EXECUTABLE)
+if(OCTAVE_CONFIG_EXECUTABLE AND MKOCTFILE_EXECUTABLE)
   set(OCTAVE_FOUND 1)
+
+  execute_process ( COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p LOCALAPIOCTFILEDIR
+    OUTPUT_VARIABLE OCTAVE_OCT_LOCAL_API_FILE_DIR
+    OUTPUT_STRIP_TRAILING_WHITESPACE )
+
+  execute_process ( COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p API_VERSION
+    OUTPUT_VARIABLE OCTAVE_API_VERSION
+    OUTPUT_STRIP_TRAILING_WHITESPACE )
+  STRING(REGEX REPLACE "[a-z\\+-]" "" OCTAVE_API_VERSION ${OCTAVE_API_VERSION})
+
+  execute_process ( COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -v
+    OUTPUT_VARIABLE OCTAVE_VERSION_STRING
+    OUTPUT_STRIP_TRAILING_WHITESPACE )
+
+  find_program(OCTAVE_EXECUTABLE NAMES octave octave-3.2.4)
+
+  message(STATUS "Found Octave:      ${OCTAVE_EXECUTABLE}")
+  message(STATUS "Octave-version:    ${OCTAVE_VERSION_STRING}")
+  message(STATUS "Octave-API:        ${OCTAVE_API_VERSION}")
+  message(STATUS "Octave-installdir: ${OCTAVE_OCT_LOCAL_API_FILE_DIR}")

   execute_process(
     COMMAND ${MKOCTFILE_EXECUTABLE} -p ALL_CXXFLAGS
@@ -69,9 +97,13 @@
   set( OCTAVE_LIBRARY ${_mkoctfile_libs})
   set( OCTAVE_LIBRARY_RELEASE ${OCTAVE_LIBRARY})
   set( OCTAVE_LIBRARY_DEBUG ${OCTAVE_LIBRARY})
-endif(MKOCTFILE_EXECUTABLE)
+endif(OCTAVE_CONFIG_EXECUTABLE AND MKOCTFILE_EXECUTABLE)

 MARK_AS_ADVANCED(
+    MKOCTFILE_EXECUTABLE
+    OCTAVE_API_VERSION
+    OCTAVE_CONFIG_EXECUTABLE
+    OCTAVE_EXECUTABLE
     OCTAVE_LIBRARY_FOUND
     OCTAVE_CXXFLAGS
     OCTAVE_LINK_FLAGS
@@ -80,4 +112,6 @@
     OCTAVE_LIBRARY
     OCTAVE_LIBRARY_RELEASE
     OCTAVE_LIBRARY_DEBUG
+    OCTAVE_OCT_LOCAL_API_FILE_DIR
+    OCTAVE_VERSION_STRING
 )


Add -Wno-missing-field-initializers to silence bogus warnings from GCC in maintainer mode.

--- cmake/maintainer.cmake
+++ cmake/maintainer.cmake
@@ -19,6 +19,15 @@
 MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
   SET(MY_MAINTAINER_WARNINGS
       "-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing")
+
+  CHECK_C_COMPILER_FLAG("-Wno-missing-field-initializers"
+    HAVE_NO_MISSING_FIELD_INITIALIZERS)
+
+  IF (HAVE_NO_MISSING_FIELD_INITIALIZERS)
+    SET(MY_MAINTAINER_WARNINGS
+      "${MY_MAINTAINER_WARNINGS} -Wno-missing-field-initializers")
+  ENDIF()
+
   CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
                         HAVE_DECLARATION_AFTER_STATEMENT)
   IF(HAVE_DECLARATION_AFTER_STATEMENT)


Fix problem with Googletest's LIBRARY_OUTPUT_DIRECTORY (#1135)

The horribly maintained CMake files which are shipped with Googletest
override the library output directory to ${CMAKE_BINARY_DIR}/lib, which
points to the top-level build directory (it should have been
CMAKE_CURRENT_BINARY_DIR).

Unfortunately, that directory is used by setuptools as staging area for
Python modules, and setup.py install will happily install everything it
finds in the lib/ folder, including the libgtest.so binary. Among
others, this has bitten PR2/pr2_mechanism#343 and ros/geometry#223

This PR fixes the output location to something sane(ish).

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -382,15 +382,23 @@
   if(base_dir)
     # overwrite CMake install command to skip install rules for gtest targets
     # which have been added in version 1.8.0
+    # Googletest 1.10 has a INSTALL_GTEST option that we can override,
+    # so we do that, too.
+    option(INSTALL_GTEST "This option must be turned OFF" OFF)
     _use_custom_install()
     set(_CATKIN_SKIP_INSTALL_RULES TRUE)
     add_subdirectory(${base_dir} ${gtest_lib_dir})
     set(_CATKIN_SKIP_INSTALL_RULES FALSE)
+    # Fix output directories, which conflict with Python's setup.py
     set_target_properties(${gtest_libs} ${gtest_main_libs}
-                          PROPERTIES EXCLUDE_FROM_ALL 1)
+                          PROPERTIES EXCLUDE_FROM_ALL 1
+                          LIBRARY_OUTPUT_DIRECTORY ${gtest_lib_dir}/lib
+                          ARCHIVE_OUTPUT_DIRECTORY ${gtest_lib_dir}/lib)
     if(gmock_found)
       set_target_properties(${gmock_libs} ${gmock_main_libs}
-                            PROPERTIES EXCLUDE_FROM_ALL 1)
+                            PROPERTIES EXCLUDE_FROM_ALL 1
+                            LIBRARY_OUTPUT_DIRECTORY ${gtest_lib_dir}/lib
+                            ARCHIVE_OUTPUT_DIRECTORY ${gtest_lib_dir}/lib)
     endif()
   endif()


clarify gtest that a checkout inside the workspace only works for a workspace build not in isolation

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -62,19 +62,24 @@
 if(NOT GTEST_FOUND)
   # only add gtest directory once per workspace
   if(NOT TARGET gtest)
+    # fall back to system installed path (i.e. on Ubuntu)
+    set(_paths "/usr/src/gtest/src")
+    if(CATKIN_TOPLEVEL)
+      # search in the current workspace before
+      list(INSERT _paths 0 "${CMAKE_SOURCE_DIR}/gtest/src")
+    endif()
     find_file(_CATKIN_GTEST_SRC "gtest.cc"
-      PATHS
-      # search in the current workspace
-      "${CMAKE_SOURCE_DIR}/gtest/src"
-      # fall back to system installed path (i.e. on Ubuntu)
-      "/usr/src/gtest/src"
+      PATHS ${_paths}
       NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-    find_file(_CATKIN_GTEST_INCLUDE "gtest/gtest.h"
-      PATHS
-      # search in the current workspace
-      "${CMAKE_SOURCE_DIR}/gtest/include"
-      # fall back to system installed path (i.e. on Ubuntu)
-      "/usr/include/gtest"
+
+    # fall back to system installed path (i.e. on Ubuntu)
+    set(_paths "/usr/include/gtest")
+    if(CATKIN_TOPLEVEL)
+      # search in the current workspace before
+      list(INSERT _paths 0 "${CMAKE_SOURCE_DIR}/gtest/include/gtest")
+    endif()
+    find_file(_CATKIN_GTEST_INCLUDE "gtest.h"
+      PATHS ${_paths}
       NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)

     if(_CATKIN_GTEST_SRC)
@@ -96,7 +101,11 @@
       message(STATUS "Found gtest sources under '${_CATKIN_GTEST_BASE_DIR}': gtests will be built")
     endif()
     if(NOT GTEST_FROM_SOURCE_FOUND)
-      message(STATUS "gtest not found, C++ tests can not be built. You can run 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the source space '${CMAKE_SOURCE_DIR}' of your workspace")
+      if(CATKIN_TOPLEVEL)
+        message(STATUS "gtest not found, C++ tests can not be built. Please install the gtest headers globally in your system or checkout gtest (by running 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the source space '${CMAKE_SOURCE_DIR}' of your workspace) to enable gtests")
+      else()
+        message(STATUS "gtest not found, C++ tests can not be built. Please install the gtest headers globally in your system to enable gtests")
+      endif()
     endif()
   endif()
   if(GTEST_FROM_SOURCE_FOUND)


Disable iterator debugging on WINDOWS

Disable iterator debugging on WINDOWS

--- salome_adm/cmake_files/SalomeSetupPlatform.cmake
+++ salome_adm/cmake_files/SalomeSetupPlatform.cmake
@@ -85,7 +85,7 @@
 IF(WIN32)
   ## Windows specific:
   ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)  # To disable windows warnings for strcpy, fopen, ...
-  ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)  # To disable windows warnings std::copy, std::transform, ...
+  ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)  # To disable windows warnings generated by checked iterators(e.g. std::copy, std::transform, ...)
   ADD_DEFINITIONS(-DWNT -DWIN32)
   ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500)      # Windows 2000 or later API is required
   ADD_DEFINITIONS(-DPPRO_NT)                  # For medfile
@@ -94,10 +94,25 @@
   SET(PLATFORM_LIBS Ws2_32.lib)
   LIST(APPEND PLATFORM_LIBS Userenv.lib)      # At least for GEOM suit

-  # Disable iterator debugging on WINDOWS in Debug Mode
+  # Disable iterator debugging on WINDOWS to avoid runtime error during checking iterators
+    # _SECURE_SCL
+    #             If defined as 1, unsafe iterator use causes a runtime error.
+    #             If defined as 0, checked iterators are disabled.
+    #             The default value for _SECURE_SCL is 1
+    # _SECURE_SCL_THROWS
+    #             If defined as 1, an out of range iterator use causes an exception at runtime.
+    #             If defined as 0, the program is terminated by calling invalid_parameter.
+    #             The default value for _SECURE_SCL_THROWS is 0
+
+  ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
+
+    # The symbol _HAS_ITERATOR_DEBUGGING can be used to turn off the iterator debugging feature in a debug build
+    #             If defined as 1, iterator debugging is enabled.
+    #             If defined as 0, iterator debugging is disabled.
+    #             The default value for _HAS_ITERATOR_DEBUGGING is 1
+
   IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
-    ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
-    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators
+    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0)
   ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")

   IF(MACHINE_IS_64)


[benchmark][cmake] Refactor the swift benchmark helper libraries to use swift_benchmark_library.

rdar://34556274

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -1,6 +1,5 @@

 include(CMakeParseArguments)
-

 # Run a shell command and assign output to a variable or fail with an error.
 # Example usage:
@@ -142,41 +141,19 @@
   endforeach()

   foreach(module_name_path ${BENCH_LIBRARY_MODULES})
-    get_filename_component(module_name "${module_name_path}" NAME)
-
-    set(objfile "${objdir}/${module_name}.o")
-    set(swiftmodule "${objdir}/${module_name}.swiftmodule")
-    set(source "${srcdir}/${module_name_path}.swift")
-    list(APPEND bench_library_objects "${objfile}")
-    add_custom_command(
-        OUTPUT "${objfile}"
-        DEPENDS
-          ${stdlib_dependencies} "${srcdir}/${module_name_path}.swift"
-          ${extra_sources}
-        COMMAND "${SWIFT_EXEC}"
-        ${common_options}
-        "-force-single-frontend-invocation"
-        "-parse-as-library"
-        "-module-name" "${module_name}"
-        "-emit-module" "-emit-module-path" "${swiftmodule}"
-        "-o" "${objfile}"
-        "${source}" ${extra_sources})
-    if (SWIFT_BENCHMARK_EMIT_SIB)
-      set(sibfile "${objdir}/${module_name}.sib")
-      list(APPEND bench_library_sibfiles "${sibfile}")
-      add_custom_command(
-          OUTPUT "${sibfile}"
-          DEPENDS
-            ${stdlib_dependencies} "${srcdir}/${module_name_path}.swift"
-            ${extra_sources}
-          COMMAND "${SWIFT_EXEC}"
-          ${common_options}
-          "-force-single-frontend-invocation"
-          "-parse-as-library"
-          "-module-name" "${module_name}"
-          "-emit-sib"
-          "-o" "${sibfile}"
-          "${source}" ${extra_sources})
+    set(sources "${srcdir}/${module_name_path}.swift")
+
+    swift_benchmark_library(objfile_out sibfile_out
+      MODULE_PATH "${module_name_path}"
+      SOURCE_DIR "${srcdir}"
+      OBJECT_DIR "${objdir}"
+      SOURCES ${sources}
+      LIBRARY_FLAGS ${common_options})
+    precondition(objfile_out)
+    list(APPEND bench_library_objects "${objfile_out}")
+    if (SWIFT_BENCHMARK_EMIT_SUB)
+      precondition(sibfile_out)
+      list(APPEND bench_library_subfiles "${sibfile_out}")
     endif()
   endforeach()


removed: flags for gprof-based profiling; use valgrind/kcachegrind instead

--- share/hugh/cmake/compiler/common-clang-gnu.cmake
+++ share/hugh/cmake/compiler/common-clang-gnu.cmake
@@ -18,11 +18,6 @@
   list(APPEND GLOBAL_LINKER_FLAGS --coverage)
 endif()

-if(${PROJECT_NAME}_PROFILE)
-  set(GLOBAL_COMPILER_FLAGS -pg)
-  list(APPEND GLOBAL_LINKER_FLAGS -pg)
-endif()
-
 # [http://stackoverflow.com/questions/17150075]
 list(APPEND GLOBAL_LINKER_FLAGS -Wl,--no-as-needed)


Tweak wording of error message when device does not appear on list of file
devices.

svn path=/trunk/; revision=7847

--- test/plplot-test.sh.cmake
+++ test/plplot-test.sh.cmake
@@ -227,8 +227,8 @@
 eval pld_device='$'PLD_$device
 if test -z "$pld_device" ; then
 echo '
-Never heard of this file '"$device"'.  Either this is not a legitimate
-file device (i.e. non-interactive) device for PLplot or else
+Never heard of a file device called '"$device"'.  Either this is not a
+legitimate file (i.e. non-interactive) device for PLplot or else
 plplot-test.sh.cmake needs some maintenance to include this file device in
 the list of possible PLplot file devices.
 '


more fixes for CMake to support 2.6.{0.1.2}, >2.6.2 and 2.4

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -4,13 +4,14 @@
 cmake_minimum_required(VERSION 2.4)
 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
 	cmake_policy(VERSION 2.4)
-	#cmake_policy(SET CMP0005 OLD)
-	#cmake_policy(SET CMP0003 OLD)
-	# Note: This throws an error for 2.4: IF had incorrect arguments: POLICY CMP0011
-	# And we must support 2.4 because the Debian pbuilder environemt requires it.
-	#if(POLICY CMP0011)
-	#	cmake_policy(SET CMP0011 OLD)
-	#endif(POLICY CMP0011)
+	if(COMMAND CMAKE_POLICY)
+		cmake_policy(SET CMP0005 OLD)
+		cmake_policy(SET CMP0003 OLD)
+		if(POLICY CMP0011)
+			# We explicitly want to export variables here.
+			cmake_policy(SET CMP0011 OLD)
+		endif(POLICY CMP0011)
+	endif(COMMAND CMAKE_POLICY)
 	include(${OLXROOTDIR}/PCHSupport_26.cmake)
 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)


added MacOSX support in Cmake

added MacOSX support in Cmake

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -167,7 +167,7 @@
 	ELSE(DEBUG)
 		ADD_DEFINITIONS(${OPTIMIZE_COMPILER_FLAG})
 	ENDIF(DEBUG)
-	INCLUDE_DIRECTORIES(${OLXROOTDIR}//libs/hawknl/include
+	INCLUDE_DIRECTORIES(${OLXROOTDIR}/libs/hawknl/include
 				${OLXROOTDIR}/libs/hawknl/src
 				${OLXROOTDIR}/libs/libzip
 				${OLXROOTDIR}/libs/boost_process)
@@ -178,10 +178,6 @@
 	string(REGEX REPLACE "[\r\n]" " " OLXVER "${OLXVER}")
 	MESSAGE( "OLX_VERSION = ${OLXVER}" )

-	EXEC_PROGRAM(sdl-config ARGS --cflags OUTPUT_VARIABLE SDLCFLAGS)
-	string(REGEX REPLACE "[\r\n]" " " SDLCFLAGS "${SDLCFLAGS}")
-	ADD_DEFINITIONS(${SDLCFLAGS})
-
 	ADD_DEFINITIONS("-pthread")

 	SET(OPTIMIZE_COMPILER_FLAG -O3)
@@ -192,6 +188,17 @@
 	SET_SOURCE_FILES_PROPERTIES(	${OLXROOTDIR}/src/common/PhysicsLX56_Projectiles.cpp
 						PROPERTIES COMPILE_FLAGS ${OPTIMIZE_COMPILER_FLAG})
 ENDIF(OPTIM_PROJECTILES)
+
+if(WIN32)
+elseif(APPLE)
+	INCLUDE_DIRECTORIES(/Library/Frameworks/SDL.framework/Headers)
+	INCLUDE_DIRECTORIES(/Library/Frameworks/SDL_image.framework/Headers)
+	INCLUDE_DIRECTORIES(/Library/Frameworks/SDL_mixer.framework/Headers)
+else()
+	EXEC_PROGRAM(sdl-config ARGS --cflags OUTPUT_VARIABLE SDLCFLAGS)
+	string(REGEX REPLACE "[\r\n]" " " SDLCFLAGS "${SDLCFLAGS}")
+	ADD_DEFINITIONS(${SDLCFLAGS})
+endif()

 IF(X11)
@@ -215,10 +222,9 @@
 ENDIF(PYTHON_DED_EMBEDDED)

-
 SET(LIBS SDL SDL_image ${PYTHONLIBS})

-IF(WIN32)
+if(WIN32)
 	SET(LIBS ${LIBS} SDL_mixer wsock32 wininet dbghelp
 				"${OLXROOTDIR}/build/msvc/libs/SDLmain.lib"
 				"${OLXROOTDIR}/build/msvc/libs/libxml2.lib"
@@ -226,15 +232,17 @@
 				"${OLXROOTDIR}/build/msvc/libs/libzip.lib"
 				"${OLXROOTDIR}/build/msvc/libs/zlib.lib"
 				"${OLXROOTDIR}/build/msvc/libs/bgd.lib")
-ELSE(WIN32)
+elseif(APPLE)
+	link_directories(/Library/Frameworks/SDL.framework)
+	link_directories(/Library/Frameworks/SDL_mixer.framework)
+	link_directories(/Library/Frameworks/SDL_image.framework)
+	link_directories(/Library/Frameworks/UnixImageIO.framework)
+else()
 	EXEC_PROGRAM(sdl-config ARGS --libs OUTPUT_VARIABLE SDLLIBS)
 	STRING(REGEX REPLACE "[\r\n]" " " SDLLIBS "${SDLLIBS}")
-
-	SET(LIBS ${LIBS} ${SDLLIBS} pthread xml2 z)
-
-	IF (NOT DEDICATED_ONLY)
-		SET(LIBS ${LIBS} SDL_mixer gd)
-	ENDIF (NOT DEDICATED_ONLY)
+endif()
+
+if(unix)
 	IF (NOT HAWKNL_BUILTIN)
 		SET(LIBS ${LIBS} NL)
 	ENDIF (NOT HAWKNL_BUILTIN)
@@ -251,7 +259,13 @@
 		SET(LIBS ${LIBS} g15daemon_client g15render)
 	ENDIF (G15)

-ENDIF(WIN32)
-
-
-
+	SET(LIBS ${LIBS} ${SDLLIBS} pthread xml2 z)
+endif(unix)
+
+if(apple)
+	SET(LIBS ${LIBS} SDL_mixer UnixImageIO)
+elif(unix)
+	IF (NOT DEDICATED_ONLY)
+		SET(LIBS ${LIBS} SDL_mixer gd)
+	ENDIF (NOT DEDICATED_ONLY)
+endif()


remove TINYUSB_FAMILT_PROJECT_NAME_INCLUDES_BOARD setting

--- hw/bsp/family_common.cmake
+++ hw/bsp/family_common.cmake
@@ -35,11 +35,7 @@

 function(family_get_project_name OUTPUT_NAME DIR)
     get_filename_component(SHORT_NAME ${DIR} NAME)
-    if (TINYUSB_FAMILY_PROJECT_NAME_INCLUDES_BOARD OR NOT DEFINED TINYUSB_FAMILY_PROJECT_NAME_INCLUDES_BOARD)
-        set(${OUTPUT_NAME} ${TINYUSB_FAMILY_PROJECT_NAME_PREFIX}${BOARD}-${SHORT_NAME} PARENT_SCOPE)
-    else()
-        set(${OUTPUT_NAME} ${TINYUSB_FAMILY_PROJECT_NAME_PREFIX}${SHORT_NAME} PARENT_SCOPE)
-    endif()
+    set(${OUTPUT_NAME} ${TINYUSB_FAMILY_PROJECT_NAME_PREFIX}${SHORT_NAME} PARENT_SCOPE)
 endfunction()

 function(family_initialize_project PROJECT DIR)


Use MSVC_VERSION instead of MSVC_TOOLSET_VERSION

Change-Id: Ifcb1e6ee644f71f17d2d84d071ef4d5409fbc3d9
Reviewed-on: http://review.couchbase.org/101604
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetPlatformCCInfo.cmake
+++ cmake/Modules/GetPlatformCCInfo.cmake
@@ -23,7 +23,7 @@
         SET(LCB_CC_STRING "vc12")
     ELSEIF(MSVC_VERSION EQUAL 1900)
         SET(LCB_CC_STRING "vc14")
-    ELSEIF(DEFINED MSVC_TOOLSET_VERSION AND MSVC_TOOLSET_VERSION EQUAL 141)
+    ELSEIF(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
         SET(LCB_CC_STRING "vc15")
     ENDIF()
 ELSE()


Fix builds with llvm/runtimes/compiler-rt after r354365

Compiler-rt doesn't include config-ix which was providing CheckSymbolExists to
the LLVM build. Add it to HandleLLVMOptions to fix this

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -10,6 +10,7 @@
 include(HandleLLVMStdlib)
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)
+include(CheckSymbolExists)

 if(CMAKE_LINKER MATCHES "lld-link\.exe" OR (WIN32 AND LLVM_USE_LINKER STREQUAL "lld") OR LLVM_ENABLE_LLD)
   set(LINKER_IS_LLD_LINK TRUE)


CMake: clean up WASI SDK sysroot paths (#39275)

Paths to WASI SDK sysroot should not assume `/share/wasi-sysroot` directory hierarchy. It's much more flexible to have this part hidden under the more general `SWIFT_WASI_SYSROOT_PATH` variable.

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -378,10 +378,10 @@
         if(NOT arch STREQUAL wasm32)
           message(FATAL_ERROR "unsupported arch for WebAssembly: ${arch}")
         endif()
-        set(SWIFT_SDK_WASI_ARCH_wasm32_PATH "${SWIFT_WASI_SDK_PATH}/share/wasi-sysroot")
+        set(SWIFT_SDK_WASI_ARCH_wasm32_PATH "${SWIFT_WASI_SYSROOT_PATH}")
         set(SWIFT_SDK_WASI_ARCH_wasm32_TRIPLE "wasm32-unknown-wasi")
-        set(SWIFT_SDK_WASI_ARCH_wasm32_LIBC_INCLUDE_DIRECTORY "${SWIFT_WASI_SDK_PATH}/share/wasi-sysroot/include")
-        set(SWIFT_SDK_WASI_ARCH_wasm32_LIBC_ARCHITECTURE_INCLUDE_DIRECTORY "${SWIFT_WASI_SDK_PATH}/share/wasi-sysroot/include")
+        set(SWIFT_SDK_WASI_ARCH_wasm32_LIBC_INCLUDE_DIRECTORY "${SWIFT_WASI_SYSROOT_PATH}/include")
+        set(SWIFT_SDK_WASI_ARCH_wasm32_LIBC_ARCHITECTURE_INCLUDE_DIRECTORY "${SWIFT_WASI_SYSROOT_PATH}/include")
       else()
         message(FATAL_ERROR "unknown Unix OS: ${prefix}")
       endif()


[opt-remark] Add support for emitting opt-remark bitstream artifacts when building benchmarks with cmake.

I didn't do this for swiftpm as well since when I tried passing this via
unsafeFlags to swiftpm, swiftpm just created the opt-remarks in my source
directory instead of next to the .o in the build directory. A problem for
another time.

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -367,12 +367,17 @@
       "-F" "${sdk}/../../../Developer/Library/Frameworks"
       "-sdk" "${sdk}"
       "-no-link-objc-runtime")
+
+    # If we are not compiling at -Onone and are performing WMO, always emit
+    # optimization-records.
+    if(NOT ${optflag} STREQUAL "Onone" AND "${bench_flags}" MATCHES "-whole-module.*")
+      list(APPEND common_options "-save-optimization-record=bitstream")
+    endif()
   endif()

   set(opt_view_main_dir)
   if(SWIFT_BENCHMARK_GENERATE_OPT_VIEW AND LLVM_HAVE_OPT_VIEWER_MODULES)
     if(NOT ${optflag} STREQUAL "Onone" AND "${bench_flags}" MATCHES "-whole-module.*")
-      list(APPEND common_options "-save-optimization-record")
       set(opt_view_main_dir "${objdir}/opt-view")
     endif()
   endif()


nodev6 needs yet another directory deduped

* see issue https://github.com/smanders/externpro/issues/80

--- projects/node.cmake
+++ projects/node.cmake
@@ -91,6 +91,7 @@
       set(dedupeDirs
         ${npmDst}/${nm}/init-package-json/${nm}/glob/${nm}
         ${npmDst}/${nm}/node-gyp/${nm}/npmlog/${nm}
+        ${npmDst}/${nm}/npm-registry-client/${nm}/npmlog/${nm}
         ${npmDst}/${nm}/read-package-json/${nm}/glob/${nm}
         )
     endif()


workaround file permissions (#873)

workaround file permissions (#873)

--- Tensile/Source/TensileCreateLibrary.cmake
+++ Tensile/Source/TensileCreateLibrary.cmake
@@ -50,8 +50,7 @@
   message(STATUS "Tensile_COMPILER            from TensileCreateLibraryCmake : ${Tensile_COMPILER}")
   message(STATUS "Tensile_ARCHITECTURE        from TensileCreateLibraryCmake : ${Tensile_ARCHITECTURE}")

-  set(Tensile_CREATE_COMMAND "${Tensile_ROOT}/bin/TensileCreateLibrary")
-
+  set(Tensile_CREATE_COMMAND "python3" "${Tensile_ROOT}/bin/TensileCreateLibrary")

   set(Tensile_SOURCE_PATH "${PROJECT_BINARY_DIR}/Tensile")
   message(STATUS "Tensile_SOURCE_PATH=${Tensile_SOURCE_PATH}")