updated to match FindROOT.cmake in CMakeModules

--- FindROOT.cmake
+++ FindROOT.cmake
@@ -1,14 +1,38 @@
-#####################################
+###############################################################################
 # cmake module for finding ROOT
 #
-# returns:
-#   ROOT_FOUND
-#   ROOT_INCLUDE_DIRS
-#   ROOT_LIBRARIES
-#   ROOT_DEFINITIONS
+# Following cmake variables are returned by this module:
+#
+#   ROOT_FOUND              # set to TRUE if ROOT was successfully found
+#   ROOT_INCLUDE_DIRS       # list of directories where ROOT headers live
+#   ROOT_LIBRARIES          # list of all ROOT libraries (including components)
+#   ROOT_DEFINITIONS        # definitions set by this module (-DUSE_ROOT ...)
+#   ROOT_${COMPONENT}_FOUND # for ROOT components, e.g. Minuit2 MathMore ...
+#
+#
+#   Please note that by convention components should be entered exactly as
+#   the library names, i.e. the component name equivalent to the library
+#   $ROOTSYS/lib/libMathMore.so should be called MathMore and NOT:
+#       mathmore or Mathmore or MATHMORE
+#
+#   However to follow the usual cmake convention it is agreed that the
+#   ROOT_${COMPONENT}_FOUND variables are ALL uppercase, i.e. the MathMore
+#   component returns: ROOT_MATHMORE_FOUND and NOT ROOT_MathMore_FOUND
+#
+#
+# The additional ROOT components can be defined directly in the cmake commando:
+# FIND_PACKAGE( ROOT COMPONENTS MathMore Gdml Geo ...)
+#
+# Or in the variable ROOT_USE_COMPONENTS before calling find_package, i.e.:
+# SET( ROOT_USE_COMPONENTS MathMore Gdml Geo )
+# FIND_PACKAGE( ROOT )
+#
+# The Minuit2 component is always added for backwards compatibility.
 #
 # @author Jan Engels, DESY
-#####################################
+###############################################################################
+
+

 SET( ROOT_FOUND FALSE )
 MARK_AS_ADVANCED( ROOT_FOUND )
@@ -16,22 +40,33 @@
 # Threads library is needed for root
 #FIND_PACKAGE( Threads REQUIRED)

-# include dirs
-SET( ROOT_INCLUDE_DIR ROOT_INCLUDE_DIR-NOTFOUND )
-MARK_AS_ADVANCED( ROOT_INCLUDE_DIR )
-
-# set env ROOTSYS for running root-config
-SET( ENV{ROOTSYS} "${ROOT_HOME}" )
-
-# also try to get include dir from root-config
+# set ROOTSYS for running root-config
+IF( DEFINED ROOT_HOME )
+    SET( ENV{ROOTSYS} "${ROOT_HOME}" )
+ENDIF()
+
+
+
+
+# ==============================================
+# ===          ROOT_INCLUDE_DIR              ===
+# ==============================================
+
+# get include dir from root-config output
 EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
     ARGS --incdir
     OUTPUT_VARIABLE ROOT_INC_DIR
-    RETURN_VALUE incdir_ret )
-# if command fails clean up variable
-IF( incdir_ret )
+    RETURN_VALUE exit_code
+)
+IF( NOT exit_code EQUAL 0 )
+    # clear ROOT_INC_DIR if root-config exits with error
+    # it could have garbage output
     SET( ROOT_INC_DIR )
 ENDIF()
+
+
+SET( ROOT_INCLUDE_DIR ROOT_INCLUDE_DIR-NOTFOUND )
+MARK_AS_ADVANCED( ROOT_INCLUDE_DIR )

 FIND_PATH( ROOT_INCLUDE_DIR
     NAMES TH1.h
@@ -43,68 +78,125 @@
             " -- failed to find ROOT include directory!!" )
 ENDIF()

-# libraries
-SET( ROOT_LIB_NAMES )
+
+
+
+# ==============================================
+# ===            ROOT_LIBRARIES              ===
+# ==============================================
+
+# check if this flag is set to FALSE at the end of
+# this module to make sure all libraries were found
 SET( ROOT_FINDLIB_FAILED FALSE )
-MARK_AS_ADVANCED( ROOT_LIB_NAMES ROOT_FINDLIB_FAILED )
-
-# get lib names from 'root-config' output
-EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
-    ARGS --noauxlibs --libs
-#    ARGS --noauxlibs --glibs
-    OUTPUT_VARIABLE out_tmp
-    RETURN_VALUE out_ret )
-
-#SET( out_tmp  "-L/data/ilcsoft/root/trunk/lib -lCore -lCint -lRIO -lNet  -lHist  -lTree -lMathCore")
-
-# check if everything went ok
-IF( NOT out_ret )
-    # create a list out of the output
-    SEPARATE_ARGUMENTS( out_tmp )
-    # remove first item -L compiler flag
-    LIST( REMOVE_AT out_tmp 0 )
-    # extract libnames from -l compiler flags
-    FOREACH( lib ${out_tmp} )
-        STRING( REGEX REPLACE "^-.(.*)$" "\\1" libname "${lib}")
-        LIST( APPEND ROOT_LIB_NAMES ${libname} )
-    ENDFOREACH()
-
-    # check for ROOT Minuit2
-    EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
-        ARGS --has-minuit2
-        OUTPUT_VARIABLE has_minuit
-        RETURN_VALUE has_minuit_ret )
-    IF( NOT has_minuit_ret )
-        # determine if Minuit2 is included with ROOT
-        IF( has_minuit STREQUAL "yes" )
-            LIST( APPEND ROOT_LIB_NAMES "Minuit2" )
-        ENDIF()
-    ENDIF()
-
-    IF( NOT ROOT_FIND_QUIETLY )
-        MESSAGE( STATUS "Check for ROOT: detected libraries: ${ROOT_LIB_NAMES}" )
-    ENDIF()
-ELSE()
-    #IF( NOT ROOT_FIND_QUIETLY )
-    #    MESSAGE( STATUS "Error trying to execute root-config --noauxlibs --glibs!!" )
-    #    MESSAGE( STATUS "${out_tmp}" )
-    #ENDIF()
-    # ensure that detection fails
-    SET( ROOT_FINDLIB_FAILED TRUE )
-ENDIF()
-
-# also try to get library dir from root-config
+MARK_AS_ADVANCED( ROOT_FINDLIB_FAILED )
+
+
+# get library dir from root-config output
 EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
     ARGS --libdir
     OUTPUT_VARIABLE ROOT_LIB_DIR
-    RETURN_VALUE libdir_ret )
-# if command fails clean up variable
-IF( libdir_ret )
+    RETURN_VALUE exit_code
+)
+IF( NOT exit_code EQUAL 0 )
+    # clear ROOT_LIB_DIR if root-config exits with error
+    # it could have garbage output
     SET( ROOT_LIB_DIR )
 ENDIF()

-# find libraries
-FOREACH( libname ${ROOT_LIB_NAMES} )
+
+
+# ========== look for standard root libraries =================
+
+# standard root libraries (without components)
+SET( ROOT_LIB_NAMES )
+SET( ROOT_LIBS )
+MARK_AS_ADVANCED( ROOT_LIB_NAMES ROOT_LIBS )
+
+# get standard root libraries from 'root-config --libs' output
+EXEC_PROGRAM( "${ROOT_HOME}/bin/root-config" "${ROOT_HOME}/bin"
+    #ARGS --noauxlibs --glibs
+    ARGS --noauxlibs --libs
+    OUTPUT_VARIABLE cmd_output
+    RETURN_VALUE exit_code
+)
+IF( exit_code EQUAL 0 )
+
+    # create a list out of the output
+    SEPARATE_ARGUMENTS( cmd_output )
+
+    # remove first item -L compiler flag
+    LIST( REMOVE_AT cmd_output 0 )
+
+    FOREACH( lib ${cmd_output} )
+
+        # extract libnames from -l compiler flags
+        STRING( REGEX REPLACE "^-.(.*)$" "\\1" libname "${lib}")
+
+        # append all library names into a list
+        LIST( APPEND ROOT_LIB_NAMES ${libname} )
+
+        SET( ROOT_LIB_${libname} ROOT_LIB_${libname}-NOTFOUND )
+        MARK_AS_ADVANCED( ROOT_LIB_${libname} )
+
+        FIND_LIBRARY( ROOT_LIB_${libname}
+            NAMES ${libname}
+            PATHS ${ROOT_HOME}/lib ${ROOT_LIB_DIR}
+            NO_DEFAULT_PATH
+        )
+
+        IF( NOT ROOT_LIB_${libname} )
+            SET( ROOT_FINDLIB_FAILED TRUE )
+            IF( NOT ROOT_FIND_QUIETLY )
+                MESSAGE( STATUS "Check for ROOT: ${ROOT_HOME}"
+                        " -- failed to find ROOT library: ${libname}" )
+            ENDIF()
+        ELSE()
+            LIST( APPEND ROOT_LIBS ${ROOT_LIB_${libname}} )
+        ENDIF()
+
+    ENDFOREACH()
+
+    IF( NOT ROOT_FIND_QUIETLY )
+        MESSAGE( STATUS "Check for ROOT: detected libraries: ${ROOT_LIB_NAMES}" )
+    ENDIF()
+
+ELSE()
+    SET( ROOT_FINDLIB_FAILED TRUE )
+ENDIF()
+
+
+
+# ========== look for additional root components =================
+
+SET( ROOT_COMPONENT_LIBS )
+MARK_AS_ADVANCED( ROOT_COMPONENT_LIBS )
+
+# Minuit2 is always included (for backwards compatibility )
+LIST( APPEND ROOT_FIND_COMPONENTS Minuit2 )
+
+# append components defined in the variable ROOT_USE_COMPONENTS
+IF( DEFINED ROOT_USE_COMPONENTS )
+    LIST( APPEND ROOT_FIND_COMPONENTS ${ROOT_USE_COMPONENTS} )
+ENDIF()
+
+# REMOVE_DUPLICATES is only available in cmake versions >= 2.6
+# it is not a problem if a component is duplicated in the list, this is just done
+# for consistency and to display the message below without duplicate components
+IF( ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.6 OR
+    ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6 )
+    IF( ROOT_FIND_COMPONENTS )
+        LIST(REMOVE_DUPLICATES ROOT_FIND_COMPONENTS)
+    ENDIF()
+ENDIF()
+
+IF( NOT ROOT_FIND_QUIETLY )
+    MESSAGE( STATUS "Check for ROOT: additional components: ${ROOT_FIND_COMPONENTS}" )
+ENDIF()
+
+FOREACH( libname ${ROOT_FIND_COMPONENTS} )
+
+    # name of the component in upper case
+    STRING( TOUPPER ${libname} upper_component_name)

     SET( ROOT_LIB_${libname} ROOT_LIB_${libname}-NOTFOUND )
     MARK_AS_ADVANCED( ROOT_LIB_${libname} )
@@ -112,32 +204,43 @@
     FIND_LIBRARY( ROOT_LIB_${libname}
         NAMES ${libname}
         PATHS ${ROOT_HOME}/lib ${ROOT_LIB_DIR}
-        NO_DEFAULT_PATH )
+        NO_DEFAULT_PATH
+    )

     IF( NOT ROOT_LIB_${libname} )
-        SET( ROOT_FINDLIB_FAILED TRUE )
+        #SET( ROOT_FINDLIB_FAILED TRUE )
         IF( NOT ROOT_FIND_QUIETLY )
             MESSAGE( STATUS "Check for ROOT: ${ROOT_HOME}"
-                    " -- failed to find ROOT ${libname} library!!" )
+                    " -- failed to find ROOT component: ${libname}" )
         ENDIF()
     ELSE()
-        LIST( APPEND ROOT_LIBS ${ROOT_LIB_${libname}} )
+        SET( ROOT_${upper_component}_FOUND TRUE )
+        LIST( APPEND ROOT_COMPONENT_LIBS ${ROOT_LIB_${libname}} )
     ENDIF()
 ENDFOREACH()

-FIND_LIBRARY( DL_LIB NAMES ${CMAKE_DL_LIBS} dl )
-IF( NOT DL_LIB AND NOT ROOT_FIND_QUIETLY )
-    MESSAGE( STATUS "Check for ROOT: failed to find libdl.so" )
-ELSE()
-    MESSAGE( STATUS "Check for ROOT: using dl library: ${DL_LIB}" )
-ENDIF()
+
+# ====== DL LIBRARY ==================================================
+# comment out this code due to cmake bug in 64 bit:
+# see: http://public.kitware.com/mantis/view.php?id=10813
+#
+#FIND_LIBRARY( DL_LIB NAMES ${CMAKE_DL_LIBS} dl )
+#IF( NOT DL_LIB AND NOT ROOT_FIND_QUIETLY )
+#    MESSAGE( STATUS "Check for ROOT: failed to find libdl.so" )
+#    SET( ROOT_FINDLIB_FAILED TRUE )
+#ELSE()
+#    MESSAGE( STATUS "Check for ROOT: using dl library: ${DL_LIB}" )
+#ENDIF()
+
+

 # set variables and display results
-IF( ROOT_INCLUDE_DIR AND NOT ROOT_FINDLIB_FAILED AND DL_LIB )
+IF( ROOT_INCLUDE_DIR AND NOT ROOT_FINDLIB_FAILED )
     SET( ROOT_FOUND TRUE )
     SET( ROOT_INCLUDE_DIRS ${ROOT_INCLUDE_DIR} )
     #SET( ROOT_LIBRARIES ${ROOT_LIBS} ${DL_LIB} ${CMAKE_THREAD_LIBS_INIT} )
-    SET( ROOT_LIBRARIES ${ROOT_LIBS} ${DL_LIB} )
+    #SET( ROOT_LIBRARIES ${ROOT_LIBS} ${ROOT_COMPONENT_LIBS} ${DL_LIB} )
+    SET( ROOT_LIBRARIES ${ROOT_LIBS} ${ROOT_COMPONENT_LIBS} )
     SET( ROOT_DEFINITIONS "-DUSEROOT -DUSE_ROOT -DMARLIN_USE_ROOT" )
     MARK_AS_ADVANCED( ROOT_LIBRARIES ROOT_DEFINITIONS )
     MESSAGE( STATUS "Check for ROOT: ${ROOT_HOME} -- works" )
@@ -149,3 +252,4 @@
         MESSAGE( STATUS "Check for ROOT -- failed!! skip this package..." )
     ENDIF()
 ENDIF()
+


SuperBuild: set default when creating option to avoid override

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -4,11 +4,10 @@
 # internal variables
 macro(SETUP_SYSTEM_LIBRARY)
   cmake_parse_arguments(NEW_SYSLIB  "" "PROJECT;DEFAULT" "" ${ARGN})
-  option(USE_SYSTEM_${NEW_SYSLIB_PROJECT} "Use a system build of ${NEW_SYSLIB_PROJECT}.")
-  set(USE_SYSTEM_${NEW_SYSLIB_PROJECT} OFF)
-  if(NEW_SYSLIB_DEFAULT)
-    set(USE_SYSTEM_${NEW_SYSLIB_PROJECT} ON)
-  endif()
+  option(USE_SYSTEM_${NEW_SYSLIB_PROJECT}
+    "  Use a system build of ${NEW_SYSLIB_PROJECT}."
+    ${NEW_SYSLIB_DEFAULT}
+    )
   set(SYSTEM_${NEW_SYSLIB_PROJECT}_CMAKE_CACHE)
 endmacro(SETUP_SYSTEM_LIBRARY)


Disable global constructors and exit-time destructors warnings

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -196,8 +196,8 @@
 			add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal")
 			add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor")
 			add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow")
-			add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations")
-			add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough")
+			add_flags_cxx("-Wno-exit-time-destructors -Wno-error=missing-variable-declarations")
+			add_flags_cxx("-Wno-global-constructors -Wno-implicit-fallthrough")
 			add_flags_cxx("-Wno-missing-noreturn -Wno-error=unreachable-code -Wno-error=undef")
 		endif()
 	endif()


update FriBidi to 0.19.7

update FriBidi to 0.19.7

--- packages/fribidi.cmake
+++ packages/fribidi.cmake
@@ -1,7 +1,7 @@
 ExternalProject_Add(fribidi
     DEPENDS gcc
-    URL "http://fribidi.org/download/fribidi-0.19.6.tar.bz2"
-    URL_HASH SHA256=cba8b7423c817e5adf50d28ec9079d14eafcec9127b9e8c8f1960c5ad585e17d
+    URL "http://fribidi.org/download/fribidi-0.19.7.tar.bz2"
+    URL_HASH SHA256=08222a6212bbc2276a2d55c3bf370109ae4a35b689acbc66571ad2a670595a8e
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure
         --host=${TARGET_ARCH}
         --prefix=${MINGW_INSTALL_PREFIX}


removed separate processes because it caues errors under linux

--- build/script.cmake
+++ build/script.cmake
@@ -5,4 +5,4 @@

 ## execute all tests in test directory
-test_execute_glob_separate_process("${CMAKE_CURRENT_LIST_DIR}/../tests/**.cmake" --recurse)+test_execute_glob("${CMAKE_CURRENT_LIST_DIR}/../tests/**.cmake" --recurse)


Use the build option prefix for option names.

--- CMake/ctkMacroSetupExternalPlugins.cmake
+++ CMake/ctkMacroSetupExternalPlugins.cmake
@@ -47,7 +47,7 @@
   ctkMacroValidateBuildOptions("${CMAKE_CURRENT_BINARY_DIR}" "${CTK_DGRAPH_EXECUTABLE}" "${plugin_dirswithoption}")

   FOREACH(plugin ${plugin_subdirs})
-    IF(BUILD_${plugin})
+    IF(${MY_BUILD_OPTION_PREFIX}${plugin})
       ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/${plugin})
     ENDIF()
   ENDFOREACH()


Tweak OpenJPEG include file search rules to prefer newer versions when multiple are installed (#1578)

--- src/cmake/modules/FindOpenJpeg.cmake
+++ src/cmake/modules/FindOpenJpeg.cmake
@@ -64,8 +64,10 @@
      /usr/local/include/openjpeg-2.0
      /usr/local/include/openjpeg
      /usr/local/include
+     /usr/include/openjpeg-2.2
+     /usr/include/openjpeg-2.1
+     /usr/include/openjpeg-1.5
      /usr/include/openjpeg
-     /usr/include/openjpeg-1.5
      /usr/local/include/openjpeg-1.5
      /usr/include
      /opt/local/include)


BUG: update expat version in Superbuild (security issue)

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(EXPAT
   PREFIX EXPAT
-  URL "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz"
-  URL_MD5 dd7dab7a5fea97d2a6a43f511449b7cd
+  URL "http://downloads.sourceforge.net/project/expat/expat/2.3.0/expat-2.3.0.tar.gz"
+  URL_MD5 fb89c9a3dcc1e00e0fe0d0200af692dc
   BINARY_DIR ${EXPAT_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Fix it. Now we can use mini_version

Fix it. Now we can use mini_version

svn path=/trunk/kdesupport/strigi/; revision=811100

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -19,6 +19,8 @@
 if(NOT CLUCENE_MAX_SUPPORTED_VERSION)
   set(CLUCENE_MAX_SUPPORTED_VERSION "0.9.17")
 endif(NOT CLUCENE_MAX_SUPPORTED_VERSION)
+
+MESSAGE(STATUS "min version ${CLUCENE_MIN_VERSION}")

 IF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)
@@ -57,7 +59,7 @@
   IF(WIN32)
     SET(TRIAL_LIBRARY_PATHS ${CLUCENE_INCLUDE_DIR})
   ENDIF(WIN32)
-
+  set(CLUCENE_GOOD_VERSION TRUE)
   FIND_PATH(CLUCENE_LIBRARY_DIR
       NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS} NO_DEFAULT_PATH)
   IF (CLUCENE_LIBRARY_DIR)
@@ -68,24 +70,26 @@
       STRING(REGEX REPLACE "_CL_VERSION +\"(.*)\"" "\\1" CLUCENE_VERSION ${CLMATCH})
 	  IF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
 	    MESSAGE(ERROR " CLucene version ${CLUCENE_VERSION} is less than the required minimum ${CLUCENE_MIN_VERSION}")
+            set(CLUCENE_GOOD_VERSION FALSE)
 	  ENDIF (CLUCENE_VERSION STRLESS "${CLUCENE_MIN_VERSION}")
 	  IF (CLUCENE_VERSION STREQUAL "${CLUCENE_MAX_SUPPORTED_VERSION}")
 	    MESSAGE(FATAL_ERROR "CLucene version ${CLUCENE_MAX_SUPPORTED_VERSION} is not supported.")
+            set(CLUCENE_GOOD_VERSION FALSE)
 	  ENDIF (CLUCENE_VERSION STREQUAL "${CLUCENE_MAX_SUPPORTED_VERSION}")
     ENDIF (CLMATCH)
   ENDIF (CLUCENE_LIBRARY_DIR)

-IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR)
+IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
   SET(CLucene_FOUND 1)
   IF(NOT CLucene_FIND_QUIETLY)
     MESSAGE(STATUS "Found CLucene: ${CLUCENE_LIBRARY}")
   ENDIF(NOT CLucene_FIND_QUIETLY)
-ELSE(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR)
+ELSE(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
   SET(CLucene_FOUND 0)
   IF(CLucene_FIND_REQUIRED)
     MESSAGE(FATAL_ERROR "Could not find CLucene.")
   ENDIF(CLucene_FIND_REQUIRED)
-ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR)
+ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)

 MARK_AS_ADVANCED(
   CLUCENE_INCLUDE_DIR


-- Provide a path to 64-bit libary version of log4cpp

--- cmake/FindLog4cpp.cmake
+++ cmake/FindLog4cpp.cmake
@@ -20,7 +20,7 @@
 SET(Log4cpp_NAMES log4cpp)
 FIND_LIBRARY(Log4cpp_LIBRARY
   NAMES ${Log4cpp_NAMES}
-  PATHS /usr/lib /usr/local/lib /opt/local/lib
+  PATHS /usr/local/lib64/lib /usr/lib /usr/local/lib /opt/local/lib
 )

 IF (Log4cpp_INCLUDE_DIR AND Log4cpp_LIBRARY)


Made cache.json from openvino optional on cmake install on macOS as it doesn't exist

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -300,6 +300,7 @@
 		install(FILES ${PROJECT_BINARY_DIR}/lib/plugins.xml ${PROJECT_BINARY_DIR}/lib/cache.json
 			DESTINATION fast/lib/
 			COMPONENT fast
+			OPTIONAL
 		)
 	endif()
 endif()


Registry.

Registry.

--- cmake/ectoInstall.cmake
+++ cmake/ectoInstall.cmake
@@ -8,6 +8,7 @@
   include/ecto/log.hpp
   include/ecto/module.hpp
   include/ecto/plasm.hpp
+  include/ecto/registry.hpp
   include/ecto/spore.hpp
   include/ecto/strand.hpp
   include/ecto/tendril.hpp


Add: functions to add a subsubsystem

Add: functions to add a subsubsystem

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -34,6 +34,43 @@
     PCL_ADD_SUBSYSTEM(${_name} ${_desc})
 endmacro(PCL_SUBSYS_OPTION)

+###############################################################################
+# Add an option to build a subsystem or not.
+# _var The name of the variable to store the option in.
+# _parent The name of the parent subsystem
+# _name The name of the option's target subsubsystem.
+# _desc The description of the subsubsystem.
+# _default The default value (TRUE or FALSE)
+# ARGV5 The reason for disabling if the default is FALSE.
+macro(PCL_SUBSUBSYS_OPTION _var _parent _name _desc _default)
+  set(_opt_name "BUILD_${_parent}_${_name}")
+  PCL_GET_SUBSYS_HYPERSTATUS(parent_status ${_parent})
+  if(NOT ("${parent_status}" STREQUAL "AUTO_OFF") AND NOT ("${parent_status}" STREQUAL "OFF"))
+    PCL_GET_SUBSYS_HYPERSTATUS(subsys_status ${_parent}_${_name})
+    if(NOT ("${subsys_status}" STREQUAL "AUTO_OFF"))
+      option(${_opt_name} ${_desc} ${_default})
+      if((NOT ${_default} AND NOT ${_opt_name}) OR ("${_default}" STREQUAL "AUTO_OFF"))
+        set(${_var} FALSE)
+        if(${ARGC} GREATER 5)
+          set(_reason ${ARGV5})
+        else(${ARGC} GREATER 5)
+          set(_reason "Disabled by default.")
+        endif(${ARGC} GREATER 5)
+        PCL_SET_SUBSYS_STATUS(${_parent}_${_name} FALSE ${_reason})
+        PCL_DISABLE_DEPENDIES(${_parent}_${_name})
+      elseif(NOT ${_opt_name})
+        set(${_var} FALSE)
+        PCL_SET_SUBSYS_STATUS(${_parent}_${_name} FALSE "Disabled manually.")
+        PCL_DISABLE_DEPENDIES(${_parent}_${_name})
+      else(NOT ${_default} AND NOT ${_opt_name})
+        set(${_var} TRUE)
+        PCL_SET_SUBSYS_STATUS(${_parent}_${_name} TRUE)
+        PCL_ENABLE_DEPENDIES(${_parent}_${_name})
+      endif((NOT ${_default} AND NOT ${_opt_name}) OR ("${_default}" STREQUAL "AUTO_OFF"))
+    endif(NOT ("${subsys_status}" STREQUAL "AUTO_OFF"))
+  endif(NOT ("${parent_status}" STREQUAL "AUTO_OFF") AND NOT ("${parent_status}" STREQUAL "OFF"))
+  PCL_ADD_SUBSUBSYSTEM(${_parent} ${_name} ${_desc})
+endmacro(PCL_SUBSUBSYS_OPTION)

 ###############################################################################
 # Make one subsystem depend on one or more other subsystems, and disable it if
@@ -82,6 +119,54 @@
     endif(${_var} AND (NOT ("${subsys_status}" STREQUAL "AUTO_OFF")))
 endmacro(PCL_SUBSYS_DEPEND)

+###############################################################################
+# Make one subsystem depend on one or more other subsystems, and disable it if
+# they are not being built.
+# _var The cumulative build variable. This will be set to FALSE if the
+#   dependencies are not met.
+# _parent The parent subsystem name.
+# _name The name of the subsubsystem.
+# ARGN The subsystems and external libraries to depend on.
+macro(PCL_SUBSUBSYS_DEPEND _var _parent _name)
+    set(options)
+    set(parentArg)
+    set(nameArg)
+    set(multiValueArgs DEPS EXT_DEPS OPT_DEPS)
+    cmake_parse_arguments(SUBSYS "${options}" "${parentArg}" "${nameArg}" "${multiValueArgs}" ${ARGN} )
+    if(SUBSUBSYS_DEPS)
+        SET_IN_GLOBAL_MAP(PCL_SUBSYS_DEPS ${_parent}_${_name} "${SUBSUBSYS_DEPS}")
+    endif(SUBSUBSYS_DEPS)
+    if(SUBSUBSYS_EXT_DEPS)
+        SET_IN_GLOBAL_MAP(PCL_SUBSYS_EXT_DEPS ${_parent}_${_name} "${SUBSUBSYS_EXT_DEPS}")
+    endif(SUBSUBSYS_EXT_DEPS)
+    if(SUBSUBSYS_OPT_DEPS)
+        SET_IN_GLOBAL_MAP(PCL_SUBSYS_OPT_DEPS ${_parent}_${_name} "${SUBSUBSYS_OPT_DEPS}")
+    endif(SUBSUBSYS_OPT_DEPS)
+    GET_IN_MAP(subsys_status PCL_SUBSYS_HYPERSTATUS ${_parent}_${_name})
+    if(${_var} AND (NOT ("${subsys_status}" STREQUAL "AUTO_OFF")))
+        if(SUBSUBSYS_DEPS)
+        foreach(_dep ${SUBSUBSYS_DEPS})
+            PCL_GET_SUBSYS_STATUS(_status ${_dep})
+            if(NOT _status)
+                set(${_var} FALSE)
+                PCL_SET_SUBSYS_STATUS(${_parent}_${_name} FALSE "Requires ${_dep}.")
+            else(NOT _status)
+                PCL_GET_SUBSYS_INCLUDE_DIR(_include_dir ${_dep})
+                include_directories(${PROJECT_SOURCE_DIR}/${_include_dir}/include)
+            endif(NOT _status)
+        endforeach(_dep)
+        endif(SUBSUBSYS_DEPS)
+        if(SUBSUBSYS_EXT_DEPS)
+        foreach(_dep ${SUBSUBSYS_EXT_DEPS})
+            string(TOUPPER "${_dep}_found" EXT_DEP_FOUND)
+            if(NOT ${EXT_DEP_FOUND} OR (NOT ("${EXT_DEP_FOUND}" STREQUAL "TRUE")))
+                set(${_var} FALSE)
+                PCL_SET_SUBSYS_STATUS(${_parent}_${_name} FALSE "Requires external library ${_dep}.")
+            endif(NOT ${EXT_DEP_FOUND} OR (NOT ("${EXT_DEP_FOUND}" STREQUAL "TRUE")))
+        endforeach(_dep)
+        endif(SUBSUBSYS_EXT_DEPS)
+    endif(${_var} AND (NOT ("${subsys_status}" STREQUAL "AUTO_OFF")))
+endmacro(PCL_SUBSUBSYS_DEPEND)

 ###############################################################################
 # Add a set of include files to install.
@@ -494,6 +579,15 @@
 ###############################################################################
 # Reset the subsystem status map.
 macro(PCL_RESET_MAPS)
+    foreach(_ss ${PCL_SUBSYSTEMS})
+        string(TOUPPER "PCL_${_ss}_SUBSYS" PCL_SUBSYS_SUBSYS)
+	if (${PCL_SUBSYS_SUBSYS})
+            string(TOUPPER "PCL_${_ss}_SUBSYS_DESC" PCL_PARENT_SUBSYS_DESC)
+	    set(${PCL_SUBSYS_SUBSYS_DESC} "" CACHE INTERNAL "" FORCE)
+	    set(${PCL_SUBSYS_SUBSYS} "" CACHE INTERNAL "" FORCE)
+	endif (${PCL_SUBSYS_SUBSYS})
+    endforeach(_ss)
+
     set(PCL_SUBSYS_HYPERSTATUS "" CACHE INTERNAL
         "To Build Or Not To Build, That Is The Question." FORCE)
     set(PCL_SUBSYS_STATUS "" CACHE INTERNAL
@@ -519,6 +613,20 @@
         FORCE)
     SET_IN_GLOBAL_MAP(PCL_SUBSYS_DESC ${_name} ${_desc})
 endmacro(PCL_ADD_SUBSYSTEM)
+
+###############################################################################
+# Register a subsubsystem.
+# _name Subsystem name.
+# _desc Description of the subsystem
+macro(PCL_ADD_SUBSUBSYSTEM _parent _name _desc)
+  string(TOUPPER "PCL_${_parent}_SUBSYS" PCL_PARENT_SUBSYS)
+  string(TOUPPER "PCL_${_parent}_SUBSYS_DESC" PCL_PARENT_SUBSYS_DESC)
+  set(_temp ${${PCL_PARENT_SUBSYS}})
+  list(APPEND _temp ${_name})
+  set(${PCL_PARENT_SUBSYS} ${_temp} CACHE INTERNAL "Internal list of ${_parenr} subsystems"
+    FORCE)
+  set_in_global_map(${PCL_PARENT_SUBSYS_DESC} ${_name} ${_desc})
+endmacro(PCL_ADD_SUBSUBSYSTEM)

 ###############################################################################
@@ -537,12 +645,37 @@
 endmacro(PCL_SET_SUBSYS_STATUS)

 ###############################################################################
+# Set the status of a subsystem.
+# _name Subsystem name.
+# _status TRUE if being built, FALSE otherwise.
+# ARGN[0] Reason for not building.
+macro(PCL_SET_SUBSUBSYS_STATUS _parent _name _status)
+    if(${ARGC} EQUAL 4)
+        set(_reason ${ARGV2})
+    else(${ARGC} EQUAL 4)
+        set(_reason "No reason")
+    endif(${ARGC} EQUAL 4)
+    SET_IN_GLOBAL_MAP(PCL_SUBSYS_STATUS ${_parent}_${_name} ${_status})
+    SET_IN_GLOBAL_MAP(PCL_SUBSYS_REASONS ${_parent}_${_name} ${_reason})
+endmacro(PCL_SET_SUBSUBSYS_STATUS)
+
+
+###############################################################################
 # Get the status of a subsystem
 # _var Destination variable.
 # _name Name of the subsystem.
 macro(PCL_GET_SUBSYS_STATUS _var _name)
     GET_IN_MAP(${_var} PCL_SUBSYS_STATUS ${_name})
 endmacro(PCL_GET_SUBSYS_STATUS)
+
+###############################################################################
+# Get the status of a subsystem
+# _var Destination variable.
+# _name Name of the subsystem.
+macro(PCL_GET_SUBSUBSYS_STATUS _var _parent _name)
+    GET_IN_MAP(${_var} PCL_SUBSYS_STATUS ${_parent}_${_name})
+endmacro(PCL_GET_SUBSUBSYS_STATUS)
+

 ###############################################################################
 # Set the hyperstatus of a subsystem and its dependee
@@ -612,7 +745,33 @@
     foreach(_ss ${PCL_SUBSYSTEMS})
         PCL_GET_SUBSYS_STATUS(_status ${_ss})
         if(_status)
-            message(STATUS "  ${_ss}")
+	    set(message_text "  ${_ss}")
+	    string(TOUPPER "PCL_${_ss}_SUBSYS" PCL_SUBSYS_SUBSYS)
+	    if (${PCL_SUBSYS_SUBSYS})
+	        set(will_build)
+		foreach(_sub ${${PCL_SUBSYS_SUBSYS}})
+		    PCL_GET_SUBSYS_STATUS(_sub_status ${_ss}_${_sub})
+		    if (_sub_status)
+		        set(will_build "${will_build}\n       |_ ${_sub}")
+		    endif (_sub_status)
+		endforeach(_sub)
+		if (NOT ("${will_build}" STREQUAL ""))
+		  set(message_text  "${message_text}\n       building: ${will_build}")
+		endif (NOT ("${will_build}" STREQUAL ""))
+		set(wont_build)
+		foreach(_sub ${${PCL_SUBSYS_SUBSYS}})
+		    PCL_GET_SUBSYS_STATUS(_sub_status ${_ss}_${_sub})
+		    PCL_GET_SUBSYS_HYPERSTATUS(_sub_hyper_status ${_ss}_${sub})
+		    if (NOT _sub_status OR ("${_sub_hyper_status}" STREQUAL "AUTO_OFF"))
+		        GET_IN_MAP(_reason PCL_SUBSYS_REASONS ${_ss}_${_sub})
+		        set(wont_build "${wont_build}\n       |_ ${_sub}: ${_reason}")
+		    endif (NOT _sub_status OR ("${_sub_hyper_status}" STREQUAL "AUTO_OFF"))
+		endforeach(_sub)
+		if (NOT ("${wont_build}" STREQUAL ""))
+		    set(message_text  "${message_text}\n       not building: ${wont_build}")
+		endif (NOT ("${wont_build}" STREQUAL ""))
+	    endif (${PCL_SUBSYS_SUBSYS})
+	    message(STATUS "${message_text}")
         endif(_status)
     endforeach(_ss)


cmake: set.cmake: fix qi_persistent_{pre,ap}pend_uniq functions

Because qi_persistent_prepend_uniq and qi_perssistent_append_uniq are
functions, they must store their result in their parent scope;
otherwise, the result is lost as soon as the function is exited.

Change-Id: I6fd107b4d8ba7e6edec931e31f28218839ab2c1a
Reviewed-on: http://gerrit.aldebaran.lan:8080/9748
Reviewed-by: cgestes <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Reviewed-by: smartin <edaf33f3e53483e687d304aa81a03bb5a17b9ddf@aldebaran-robotics.com>
Tested-by: smartin <edaf33f3e53483e687d304aa81a03bb5a17b9ddf@aldebaran-robotics.com>

--- cmake/qibuild/set.cmake
+++ cmake/qibuild/set.cmake
@@ -50,6 +50,7 @@
       qi_persistent_append("${_name}" ${_value})
     endif()
   endforeach()
+  set("${_name}" "${${_name}}" PARENT_SCOPE)
 endfunction()

 function(qi_persistent_prepend_uniq _name)
@@ -59,6 +60,7 @@
       qi_persistent_prepend("${_name}" ${_value})
     endif()
   endforeach()
+  set("${_name}" "${${_name}}" PARENT_SCOPE)
 endfunction()

 ## DEPRECATED ##


COMP: Adapting it to the new number of parameters. Only templated over the image type.       Dimension can be extracted from the image type.

--- Wrapping/WrapITK/Modules/Base/wrap_itkFlatStructuringElement.cmake
+++ Wrapping/WrapITK/Modules/Base/wrap_itkFlatStructuringElement.cmake
@@ -1,3 +1,5 @@
 WRAP_CLASS("itk::FlatStructuringElement")
-  SET(WRAPPER_TEMPLATES "${itk_Wrap_StructuringElement}")
+  WRAP_IMAGE_FILTER_USIGN_INT(2)
+  WRAP_IMAGE_FILTER_SIGN_INT(2)
+  WRAP_IMAGE_FILTER_REAL(2)
 END_WRAP_CLASS()


Lots more warnings

Lots more warnings

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -192,7 +192,16 @@
 			add_flags_cxx("-D__extern_always_inline=inline")
 			add_flags_cxx("-Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")
 			add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation")
-		endif()
-	endif()
-
-endmacro()
+			add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-error=padded")
+			add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal")
+			add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor")
+			add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow")
+			add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations")
+			add_flags_cxx("-Wno-error=cast-align -Wno-error=unused-macros")
+			add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough")
+			add_flags_cxx("-Wno-missing-noreturn -Wno-error=unreachable-code -Wno-error=undef")
+			add_flags_cxx("-Wno-error=format-nonliteral")
+		endif()
+	endif()
+
+endmacro()


CMake: improve printout of modules to be built

--- cmake/allpix.cmake
+++ cmake/allpix.cmake
@@ -15,13 +15,14 @@
     # Build all modules by default if not specified otherwise
     OPTION(BUILD_${_allpix_module_dir} "Build module in directory ${_allpix_module_dir}?" ON)

+    # Put message
+    MESSAGE(STATUS "Building module " ${BUILD_${_allpix_module_dir}} "\t- " ${_allpix_module_dir})
+
     # Quit the file if not building this file or all modules
     IF(NOT (BUILD_${_allpix_module_dir} OR BUILD_ALL_MODULES))
         RETURN()
     ENDIF()

-    # Put message
-    MESSAGE( STATUS "Building module: " ${_allpix_module_dir} )

     # Prepend with the allpix module prefix to create the name of the module
     SET(${name} "AllpixModule${_allpix_module_dir}")


macros

macros

--- cmake/macros.cmake
+++ cmake/macros.cmake
@@ -3,36 +3,3 @@
 		find_program(${ARGN})
 	endmacro()
 endif()
-
-#------------Define function Read file------------
-macro( readSettingFile KEY DEFAULT_RESULT STRING_RESULT_OUT)
-
-	unset(STRING_RESULT)
-	# Read the file
-	file( READ "${CMAKE_SOURCE_DIR}/buildconfig.txt" LIB_PATH_STR )
-
-	# Set the variable "Esc" to the ASCII value 27 - basically something
-	# which is unlikely to conflict with anything in the file contents.
-	string(ASCII 27 Esc)
-
-	# Turn the contents into a list of strings, each ending with an Esc.
-	# This allows us to preserve blank lines in the file since CMake
-	# automatically prunes empty list items during a foreach loop.
-	string(REGEX REPLACE "\n" "${Esc};" LIB_PATH_LINES "${LIB_PATH_STR}")
-
-	foreach(LINE ${LIB_PATH_LINES})
-		if("${LINE}" MATCHES "${KEY}")
-			#remove the key, leave the content untouch
-			string(REPLACE "${KEY}" "" STRING_RESULT ${LINE})
-			# Swap the appended Esc character back out in favour of a line feed
-			string(REGEX REPLACE "${Esc}" "" STRING_RESULT ${STRING_RESULT})
-		endif()
-	endforeach()
-
-	if("${STRING_RESULT}" STREQUAL "")
-		set( STRING_RESULT ${DEFAULT_RESULT} )
-	endif()
-
-
-	#message( STATIC "---GTA Sa-----" "[${STRING_RESULT}]" )
-endmacro()


get build config from file

get build config from file

--- cmake/macros.cmake
+++ cmake/macros.cmake
@@ -3,3 +3,36 @@
 		find_program(${ARGN})
 	endmacro()
 endif()
+
+#------------Define function Read file------------
+macro( readSettingFile KEY DEFAULT_RESULT STRING_RESULT_OUT)
+
+	unset(STRING_RESULT)
+	# Read the file
+	file( READ "${CMAKE_SOURCE_DIR}/buildconfig.txt" LIB_PATH_STR )
+
+	# Set the variable "Esc" to the ASCII value 27 - basically something
+	# which is unlikely to conflict with anything in the file contents.
+	string(ASCII 27 Esc)
+
+	# Turn the contents into a list of strings, each ending with an Esc.
+	# This allows us to preserve blank lines in the file since CMake
+	# automatically prunes empty list items during a foreach loop.
+	string(REGEX REPLACE "\n" "${Esc};" LIB_PATH_LINES "${LIB_PATH_STR}")
+
+	foreach(LINE ${LIB_PATH_LINES})
+		if("${LINE}" MATCHES "${KEY}")
+			#remove the key, leave the content untouch
+			string(REPLACE "${KEY}" "" STRING_RESULT ${LINE})
+			# Swap the appended Esc character back out in favour of a line feed
+			string(REGEX REPLACE "${Esc}" "" STRING_RESULT ${STRING_RESULT})
+		endif()
+	endforeach()
+
+	if("${STRING_RESULT}" STREQUAL "")
+		set( STRING_RESULT ${DEFAULT_RESULT} )
+	endif()
+
+
+	#message( STATIC "---GTA Sa-----" "[${STRING_RESULT}]" )
+endmacro()


Add -msse3 where needed for DYNAMIC_ARCH builds

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -67,8 +67,11 @@
         set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3 -mavx2")
       endif()
     elseif (${CMAKE_C_COMPILER_ID} STREQUAL "CLANG")
+      set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse -msse3 -mavx2")
+    endif()
+  endif()
+  if (${TARGET} STREQUAL "HASWELL" AND NOT NO_AVX2)
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3 -mavx2")
-    endif()
   endif()
   if (${TARGET} STREQUAL "ZEN" AND NOT NO_AVX2)
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3 -mavx2")
@@ -76,25 +79,19 @@
   if (${TARGET} STREQUAL "SANDYBRIDGE" AND NOT NO_AVX)
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3 -mavx")
   endif()
-  if (${TARGET} STREQUAL "BARCELONA")
+  if (${TARGET} STREQUAL "BARCELONA" OR ${TARGET} STREQUAL "STEAMROLLER" OR ${TARGET} STREQUAL "BULLDOZER" OR ${TARGET} STREQUAL "EXCAVATOR")
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
   endif()
-  if (${TARGET} STREQUAL "STEAMROLLER")
+  if (${TARGET} STREQUAL "PILEDRIVER" OR ${TARGET} STREQUAL "BOBCAT" OR ${TARGET} STREQUAL "OPTERON_SSE3")
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
   endif()
-  if (${TARGET} STREQUAL "EXCAVATOR")
+  if (${TARGET} STREQUAL "PRESCOTT" OR ${TARGET} STREQUAL "NANO")
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
   endif()
-  if (${TARGET} STREQUAL "PILEDRIVER")
+  if (${TARGET} STREQUAL "NEHALEM" OR ${TARGET} STREQUAL "ATOM")
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
   endif()
-  if (${TARGET} STREQUAL "PRESCOTT")
-      set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
-  endif()
-  if (${TARGET} STREQUAL "NEHALEM")
-      set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
-  endif()
-  if (${TARGET} STREQUAL "CORE2")
+  if (${TARGET} STREQUAL "CORE2" OR ${TARGET} STREQUAL "PENRYN" OR ${TARGET} STREQUAL "DUNNINGTON")
       set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
   endif()
   if (DEFINED HAVE_SSE)


Update dejavufont url

Update dejavufont url

--- SuperBuild/CMake/External_font.cmake
+++ SuperBuild/CMake/External_font.cmake
@@ -30,11 +30,10 @@
   file( MD5 "${DOWNLOAD_LOCATION}/dejavu-fonts-ttf-2.37.tar.bz2" MD5_FONT )
 endif()

-SET(CMAKE_TLS_VERIFY "OFF")
 if ( NOT ( "${MD5_FONT}" STREQUAL "d0efec10b9f110a32e9b8f796e21782c" ) )
 MESSAGE("DOWNLOADING FONTS")
 file(DOWNLOAD
-  "https://netix.dl.sourceforge.net/project/dejavu/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2"
+  "https://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2"
   ${DOWNLOAD_LOCATION}/dejavu-fonts-ttf-2.37.tar.bz2
   EXPECTED_MD5 d0efec10b9f110a32e9b8f796e21782c)
 endif()


add -std=c++11

add -std=c++11

--- compilers/GNU.CXX.cmake
+++ compilers/GNU.CXX.cmake
@@ -1,6 +1,6 @@
 if(NOT DEFINED ENV{CXXFLAGS})
     if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
         set(CMAKE_CXX_FLAGS_RELEASE "-O3")
         set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
     endif()


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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

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


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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

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


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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- 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   23)
+SET(KWSYS_DATE_STAMP_DAY   24)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Silence warning when debuggee quit already.

--- heaptrack.sh.cmake
+++ heaptrack.sh.cmake
@@ -136,7 +136,7 @@
 output="$output.gz"
 "$INTERPRETER" < $pipe | gzip -c > "$output" &
 debuggee=$!
-trap "kill $debuggee > /dev/null" EXIT
+trap "kill $debuggee 2> /dev/null" EXIT

 echo "starting application, this might take some time..."
 echo "output will be written to $output"


BUG: correct openjpeg download name

BUG: correct openjpeg download name

--- SuperBuild/CMake/External_openjpeg.cmake
+++ SuperBuild/CMake/External_openjpeg.cmake
@@ -40,7 +40,7 @@
   PREFIX OPENJPEG
   URL "https://github.com/uclouvain/openjpeg/archive/v2.3.1.tar.gz"
   URL_MD5 3b9941dc7a52f0376694adb15a72903f
-  DOWNLOAD_NAME openjpeg_v2.3.0.tar.gz
+  DOWNLOAD_NAME openjpeg_v2.3.1.tar.gz
   BINARY_DIR ${OPENJPEG_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


ENABLE_DEBUG enables undefinied behavior sanitizer

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -58,6 +58,11 @@
 	set (CXX_EXTRA_FLAGS "${CXX_EXTRA_FLAGS} -Wold-style-cast")

 	message (STATUS "Clang detected")
+
+	if (ENABLE_DEBUG)
+		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=integer")
+		set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=undefined -fsanitize=integer")
+	endif()
 endif()

 if (CMAKE_COMPILER_IS_GNUCXX)


Squashed '3rdparty/github/cmake-utils/' changes from e6038fe..c5dec90

c5dec90 Enable NTRACE only when exactly in Debug build mode, version 1.0.0

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: c5dec90e7f45c5b6950efe60fe99eba6a2c0e7ab

--- cmake/MyPackageLibrary.cmake
+++ cmake/MyPackageLibrary.cmake
@@ -47,7 +47,7 @@
   # ... Tracing
   #
   STRING (TOUPPER ${PROJECT_NAME} _PROJECTNAME)
-  IF ((NOT CMAKE_BUILD_TYPE MATCHES Debug) AND (NOT CMAKE_BUILD_TYPE MATCHES RelWithDebInfo))
+  IF (NOT CMAKE_BUILD_TYPE MATCHES Debug)
     FOREACH (_target ${PROJECT_NAME} ${PROJECT_NAME}_static)
       TARGET_COMPILE_DEFINITIONS(${_target} PRIVATE -D${_PROJECTNAME}_NTRACE)
     ENDFOREACH ()


fix mkl detection

fix mkl detection

--- cmake/ShogunFindLAPACK.cmake
+++ cmake/ShogunFindLAPACK.cmake
@@ -38,7 +38,7 @@
         endif()
       endif()
     endif()
-  ELSEIF(EXISTS "${LAPACK_LIBRARIES}" AND "${LAPACK_LIBRARIES}" MATCHES ".*/.*mkl_.*")
+  ELSEIF("${LAPACK_LIBRARIES}" MATCHES ".*/.*mkl_.*")
     # in case MKL is available enable Eigen to use it.
     # for more fine grained control and details see:
     # https://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html


Embree v2.14 will support individually enabled ISAs

--- cmake/configure_embree.cmake
+++ cmake/configure_embree.cmake
@@ -52,25 +52,32 @@
   ENDIF()
 ENDIF()

-SET(EMBREE_ISA_SUPPORTS_SSE4   FALSE)
-SET(EMBREE_ISA_SUPPORTS_AVX    FALSE)
-SET(EMBREE_ISA_SUPPORTS_AVX2   FALSE)
-SET(EMBREE_ISA_SUPPORTS_AVX512 FALSE)
-
-IF (${EMBREE_MAX_ISA} STREQUAL "SSE4.1")
-  SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
-ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX")
-  SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
-  SET(EMBREE_ISA_SUPPORTS_AVX  TRUE)
-ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX2")
-  SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
-  SET(EMBREE_ISA_SUPPORTS_AVX  TRUE)
-  SET(EMBREE_ISA_SUPPORTS_AVX2 TRUE)
-ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX512KNL")
-  SET(EMBREE_ISA_SUPPORTS_SSE4   TRUE)
-  SET(EMBREE_ISA_SUPPORTS_AVX    TRUE)
-  SET(EMBREE_ISA_SUPPORTS_AVX2   TRUE)
-  SET(EMBREE_ISA_SUPPORTS_AVX512 TRUE)
+IF (${EMBREE_MAX_ISA} STREQUAL "NONE")
+  SET(EMBREE_ISA_SUPPORTS_SSE4   ${EMBREE_ISA_SSE42})
+  SET(EMBREE_ISA_SUPPORTS_AVX    ${EMBREE_ISA_AVX})
+  SET(EMBREE_ISA_SUPPORTS_AVX2   ${EMBREE_ISA_AVX2})
+  SET(EMBREE_ISA_SUPPORTS_AVX512 ${EMBREE_ISA_AVX512KNL})
+ELSE()
+  SET(EMBREE_ISA_SUPPORTS_SSE4   FALSE)
+  SET(EMBREE_ISA_SUPPORTS_AVX    FALSE)
+  SET(EMBREE_ISA_SUPPORTS_AVX2   FALSE)
+  SET(EMBREE_ISA_SUPPORTS_AVX512 FALSE)
+
+  IF (${EMBREE_MAX_ISA} STREQUAL "SSE4.1")
+    SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
+  ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX")
+    SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
+    SET(EMBREE_ISA_SUPPORTS_AVX  TRUE)
+  ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX2")
+    SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
+    SET(EMBREE_ISA_SUPPORTS_AVX  TRUE)
+    SET(EMBREE_ISA_SUPPORTS_AVX2 TRUE)
+  ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX512KNL")
+    SET(EMBREE_ISA_SUPPORTS_SSE4   TRUE)
+    SET(EMBREE_ISA_SUPPORTS_AVX    TRUE)
+    SET(EMBREE_ISA_SUPPORTS_AVX2   TRUE)
+    SET(EMBREE_ISA_SUPPORTS_AVX512 TRUE)
+  ENDIF()
 ENDIF()

 IF(NOT EMBREE_ISA_SUPPORTS_SSE4)


Build clang-headers when building clang tools.

Summary:
clang tools require clang headers to work on real project, e.g. when we
build clangd via `ninja clangd`, we expect the binary can run on
real-world project (without running another command `ninja clang-headers`).

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, ilya-biryukov, ioeric, kadircet, cfe-commits

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@343459 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -131,6 +131,7 @@
   endif()

   add_clang_executable(${name} ${ARGN})
+  add_dependencies(${name} clang-headers)

   if (CLANG_BUILD_TOOLS)
     if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR


build: CF, CVP, DAE over flag computation

Perform some constant folding, constant value propagation, dead argument
elimination over the flag computation methods.  This reduces the
unnecessary parameters and more clearly and succinctly describes what is
happening.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -75,17 +75,9 @@
 # _add_host_variant_c_compile_link_flags(
 #   ANALYZE_CODE_COVERAGE analyze_code_coverage
 #   RESULT_VAR_NAME result_var_name
-#   DEPLOYMENT_VERSION_OSX version # If provided, overrides the default value of the OSX deployment target set by the Swift project for this compilation only.
-#   DEPLOYMENT_VERSION_MACCATALYST version
-#   DEPLOYMENT_VERSION_IOS version
-#   DEPLOYMENT_VERSION_TVOS version
-#   DEPLOYMENT_VERSION_WATCHOS version
 # )
 function(_add_host_variant_c_compile_link_flags)
-  set(oneValueArgs RESULT_VAR_NAME ANALYZE_CODE_COVERAGE
-    DEPLOYMENT_VERSION_OSX DEPLOYMENT_VERSION_MACCATALYST DEPLOYMENT_VERSION_IOS DEPLOYMENT_VERSION_TVOS DEPLOYMENT_VERSION_WATCHOS
-    MACCATALYST_BUILD_FLAVOR
-  )
+  set(oneValueArgs RESULT_VAR_NAME ANALYZE_CODE_COVERAGE)
   cmake_parse_arguments(CFLAGS
     ""
     "${oneValueArgs}"
@@ -93,30 +85,13 @@
     ${ARGN})

   get_maccatalyst_build_flavor(maccatalyst_build_flavor
-    "${SWFIT_HOST_VARIANT_SDK}" "${CFLAGS_MACCATALYST_BUILD_FLAVOR}")
+    "${SWFIT_HOST_VARIANT_SDK}" "")

   set(result ${${CFLAGS_RESULT_VAR_NAME}})

   is_darwin_based_sdk("${SWIFT_HOST_VARIANT_SDK}" IS_DARWIN)
   if(IS_DARWIN)
-    # Check if there's a specific OS deployment version needed for this invocation
-    if(SWIFT_HOST_VARIANT_SDK STREQUAL OSX)
-      if(DEFINED maccatalyst_build_flavor)
-        set(DEPLOYMENT_VERSION ${CFLAGS_DEPLOYMENT_VERSION_MACCATALYST})
-      else()
-        set(DEPLOYMENT_VERSION ${CFLAGS_DEPLOYMENT_VERSION_OSX})
-      endif()
-    elseif(SWIFT_HOST_VARIANT_SDK MATCHES "^IOS")
-      set(DEPLOYMENT_VERSION ${CFLAGS_DEPLOYMENT_VERSION_IOS})
-    elseif(SWIFT_HOST_VARIANT_SDK MATCHES "^TVOS")
-      set(DEPLOYMENT_VERSION ${CFLAGS_DEPLOYMENT_VERSION_TVOS})
-    elseif(SWIFT_HOST_VARIANT_SDK MATCHES "^WATCHOS")
-      set(DEPLOYMENT_VERSION ${CFLAGS_DEPLOYMENT_VERSION_WATCHOS})
-    endif()
-
-    if("${DEPLOYMENT_VERSION}" STREQUAL "")
-      set(DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
-    endif()
+    set(DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
   endif()

   # MSVC, clang-cl, gcc don't understand -target.
@@ -185,10 +160,7 @@

 function(_add_host_variant_c_compile_flags)
-  set(oneValueArgs
-    DEPLOYMENT_VERSION_OSX DEPLOYMENT_VERSION_MACCATALYST DEPLOYMENT_VERSION_IOS DEPLOYMENT_VERSION_TVOS DEPLOYMENT_VERSION_WATCHOS
-    RESULT_VAR_NAME
-    MACCATALYST_BUILD_FLAVOR)
+  set(oneValueArgs RESULT_VAR_NAME)
   cmake_parse_arguments(CFLAGS
     ""
     "${oneValueArgs}"
@@ -199,13 +171,7 @@

   _add_host_variant_c_compile_link_flags(
     ANALYZE_CODE_COVERAGE FALSE
-    DEPLOYMENT_VERSION_OSX "${CFLAGS_DEPLOYMENT_VERSION_OSX}"
-    DEPLOYMENT_VERSION_MACCATALYST "${CFLAGS_DEPLOYMENT_VERSION_MACCATALYST}"
-    DEPLOYMENT_VERSION_IOS "${CFLAGS_DEPLOYMENT_VERSION_IOS}"
-    DEPLOYMENT_VERSION_TVOS "${CFLAGS_DEPLOYMENT_VERSION_TVOS}"
-    DEPLOYMENT_VERSION_WATCHOS "${CFLAGS_DEPLOYMENT_VERSION_WATCHOS}"
-    RESULT_VAR_NAME result
-    MACCATALYST_BUILD_FLAVOR "${CFLAGS_MACCATALYST_BUILD_FLAVOR}")
+    RESULT_VAR_NAME result)

   is_build_type_optimized("${CMAKE_BUILD_TYPE}" optimized)
   if(optimized)
@@ -358,10 +324,7 @@

 function(_add_host_variant_link_flags)
   set(oneValueArgs
-  DEPLOYMENT_VERSION_OSX DEPLOYMENT_VERSION_MACCATALYST DEPLOYMENT_VERSION_IOS DEPLOYMENT_VERSION_TVOS DEPLOYMENT_VERSION_WATCHOS
-  RESULT_VAR_NAME ENABLE_LTO LTO_OBJECT_NAME LINK_LIBRARIES_VAR_NAME LIBRARY_SEARCH_DIRECTORIES_VAR_NAME
-  MACCATALYST_BUILD_FLAVOR
-  )
+  RESULT_VAR_NAME ENABLE_LTO LTO_OBJECT_NAME LINK_LIBRARIES_VAR_NAME LIBRARY_SEARCH_DIRECTORIES_VAR_NAME)
   cmake_parse_arguments(LFLAGS
     ""
     "${oneValueArgs}"
@@ -374,13 +337,7 @@

   _add_host_variant_c_compile_link_flags(
     ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
-    DEPLOYMENT_VERSION_OSX "${LFLAGS_DEPLOYMENT_VERSION_OSX}"
-    DEPLOYMENT_VERSION_MACCATALYST "${LFLAGS_DEPLOYMENT_VERSION_MACCATALYST}"
-    DEPLOYMENT_VERSION_IOS "${LFLAGS_DEPLOYMENT_VERSION_IOS}"
-    DEPLOYMENT_VERSION_TVOS "${LFLAGS_DEPLOYMENT_VERSION_TVOS}"
-    DEPLOYMENT_VERSION_WATCHOS "${LFLAGS_DEPLOYMENT_VERSION_WATCHOS}"
-    RESULT_VAR_NAME result
-    MACCATALYST_BUILD_FLAVOR  "${LFLAGS_MACCATALYST_BUILD_FLAVOR}")
+    RESULT_VAR_NAME result)
   if(SWIFT_HOST_VARIANT_SDK STREQUAL LINUX)
     list(APPEND link_libraries "pthread" "dl")
   elseif(SWIFT_HOST_VARIANT_SDK STREQUAL FREEBSD)
@@ -482,7 +439,7 @@
   endif()

   get_maccatalyst_build_flavor(maccatalyst_build_flavor
-    "${SWIFT_HOST_VARIANT_SDK}" "${LFLAGS_MACCATALYST_BUILD_FLAVOR}")
+    "${SWIFT_HOST_VARIANT_SDK}" "")

   set("${LFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)
   set("${LFLAGS_LINK_LIBRARIES_VAR_NAME}" "${link_libraries}" PARENT_SCOPE)


build: use `-isystem` on non-Darwin targets

The use of `-isysroot` is a Darwin specific behaviour.  It is used to switch to
a platform SDK, however, other targets use the `--sysroot` flag.  Windows uses a
custom mechanism which is a set of system header paths.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -85,8 +85,19 @@
     ${${CFLAGS_RESULT_VAR_NAME}}
     "-target" "${SWIFT_SDK_${CFLAGS_SDK}_ARCH_${CFLAGS_ARCH}_TRIPLE}")

-  list(APPEND result
-    "-isysroot" "${SWIFT_SDK_${CFLAGS_SDK}_PATH}")
+  if("${CFLAGS_SDK}" STREQUAL "OSX" OR
+     "${CFLAGS_SDK}" STREQUAL "TVOS" OR
+     "${CFLAGS_SDK}" STREQUAL "TVOS_SIMULATOR" OR
+     "${CFLAGS_SDK}" STREQUAL "IOS" OR
+     "${CFLAGS_SDK}" STREQUAL "IOS_SIMULATOR" OR
+     "${CFLAGS_SDK}" STREQUAL "WATCHOS" OR
+     "${CFLAGS_SDK}" STREQUAL "WATCHOS_SIMULATOR")
+    list(APPEND result "-isysroot" "${SWIFT_SDK_${CFLAGS_SDK}_PATH}")
+  else()
+    if(NOT "${SWIFT_SDK_${CFLAGS_SDK}_PATH}" STREQUAL "/")
+      list(APPEND result "--sysroot=${SWIFT_SDK_${CFLAGS_SDK}_PATH}")
+    endif()
+  endif()

   if("${CFLAGS_SDK}" STREQUAL "ANDROID")
     list(APPEND result


[CMake] Add a comment to tablegen's copy_if_different. Ninja reports every action by default.

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -33,7 +33,7 @@
         ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
         ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
     DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
-    COMMENT ""
+    COMMENT "Updating ${ofn}..."
     )

   # `make clean' must remove all those generated files:


Add OxStd to OxConfig.cmake

Add OxStd to OxConfig.cmake

--- OxConfig.cmake
+++ OxConfig.cmake
@@ -1,2 +1,3 @@
 set(Ox_INCLUDE_DIRS ${CMAKE_FIND_ROOT_PATH}/include/)
+set(OxStd_LIBRARY ${CMAKE_FIND_ROOT_PATH}/lib/ox/libOxStd.a)
 set(OxFs_LIBRARY ${CMAKE_FIND_ROOT_PATH}/lib/ox/libOxFs.a)


cmake: do not check if sdkconfig exists

cmake: do not check if sdkconfig exists

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -331,10 +331,6 @@

     if(SDKCONFIG)
         get_filename_component(sdkconfig "${SDKCONFIG}" ABSOLUTE)
-        if(NOT EXISTS "${sdkconfig}")
-            message(FATAL_ERROR "SDKCONFIG '${sdkconfig}' does not exist.")
-        endif()
-        set(sdkconfig ${SDKCONFIG})
     else()
         set(sdkconfig "${CMAKE_CURRENT_LIST_DIR}/sdkconfig")
     endif()


Fix typo in CMake

Fix typo in CMake

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -25,7 +25,7 @@
     "${OGRE_BINARY_DIR}/../iOSDependencies"
     "${OGRE_SOURCE_DIR}/../iOSDependencies"
   )
-elif(OGRE_BUILD_PLATFORM_ANDROID)
+elseif(OGRE_BUILD_PLATFORM_ANDROID)
   set(OGRE_DEP_SEARCH_PATH
     ${OGRE_DEPENDENCIES_DIR}
     ${ENV_OGRE_DEPENDENCIES_DIR}


def files from configdefinitions are already installed in that module

--- install_java.cmake
+++ install_java.cmake
@@ -87,37 +87,6 @@
 install(FILES
     chain/src/main/resources/configdefinitions/chains.def
     config-provisioning/src/main/resources/configdefinitions/flavors.def
-    configdefinitions/src/vespa/application-id.def
-    configdefinitions/src/vespa/attributes.def
-    configdefinitions/src/vespa/cluster-info.def
-    configdefinitions/src/vespa/cluster-list.def
-    configdefinitions/src/vespa/configserver.def
-    configdefinitions/src/vespa/fleetcontroller.def
-    configdefinitions/src/vespa/ilscripts.def
-    configdefinitions/src/vespa/indexschema.def
-    configdefinitions/src/vespa/lb-services.def
-    configdefinitions/src/vespa/load-type.def
-    configdefinitions/src/vespa/messagetyperouteselectorpolicy.def
-    configdefinitions/src/vespa/model.def
-    configdefinitions/src/vespa/orchestrator.def
-    configdefinitions/src/vespa/persistence.def
-    configdefinitions/src/vespa/rank-profiles.def
-    configdefinitions/src/vespa/routing-provider.def
-    configdefinitions/src/vespa/routing.def
-    configdefinitions/src/vespa/sentinel.def
-    configdefinitions/src/vespa/slobroks.def
-    configdefinitions/src/vespa/specialtokens.def
-    configdefinitions/src/vespa/stor-devices.def
-    configdefinitions/src/vespa/stor-distribution.def
-    configdefinitions/src/vespa/stor-filestor.def
-    configdefinitions/src/vespa/stor-memfilepersistence.def
-    configdefinitions/src/vespa/summary.def
-    configdefinitions/src/vespa/summarymap.def
-    configdefinitions/src/vespa/upgrading.def
-    configdefinitions/src/vespa/ymon.def
-    configdefinitions/src/vespa/zookeeper-server.def
-    configdefinitions/src/vespa/zookeepers.def
-    configdefinitions/src/vespa/dispatch.def
     container-accesslogging/src/main/resources/configdefinitions/access-log.def
     container-core/src/main/resources/configdefinitions/application-metadata.def
     container-core/src/main/resources/configdefinitions/container-document.def


fix openvdb platform forwarding on Windows

--- deps/deps-windows.cmake
+++ deps/deps-windows.cmake
@@ -309,6 +309,7 @@
     GIT_TAG v1.17.0
     DEPENDS dep_zlib
     CMAKE_GENERATOR "${DEP_MSVC_GEN}"
+    CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
     CMAKE_ARGS
         -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
         -DBUILD_SHARED_LIBS=OFF
@@ -332,6 +333,7 @@
     GIT_TAG v2.4.0
     DEPENDS dep_zlib
     CMAKE_GENERATOR "${DEP_MSVC_GEN}"
+    CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
     CMAKE_ARGS
         -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
         -DBUILD_SHARED_LIBS=OFF
@@ -352,6 +354,7 @@
     GIT_TAG v6.2.1
     DEPENDS dep_blosc dep_openexr dep_tbb
     CMAKE_GENERATOR "${DEP_MSVC_GEN}"
+    CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
     CMAKE_ARGS
         -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
         -DCMAKE_DEBUG_POSTFIX=d


cmake: add linenoise

cmake: add linenoise

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -34,6 +34,7 @@
 OPTION(OPTIM_PROJECTILES "Enable optimisations for projectiles" Yes)
 OPTION(MEMSTATS "Enable memory statistics and debugging" No)
 OPTION(BREAKPAD "Google Breakpad support" Yes)
+OPTION(LINENOISE "builtin Linenose support (readline/libedit replacement)" Yes)
 OPTION(DISABLE_JOYSTICK "Disable joystick support" No)
 OPTION(BOOST_LINK_STATIC "Link boost-libs statically" No)
 OPTION(MINGW_CROSS_COMPILE "Cross-compile Windows .EXE using i586-mingw32msvc-cc compiler" No)
@@ -97,6 +98,7 @@
 MESSAGE( "STLPORT = ${STLPORT}" )
 MESSAGE( "GCOREDUMPER = ${GCOREDUMPER}" )
 MESSAGE( "BREAKPAD = ${BREAKPAD}" )
+MESSAGE( "LINENOISE = ${LINENOISE}" )
 MESSAGE( "CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}" )
 MESSAGE( "CMAKE_C_FLAGS = ${CMAKE_C_FLAGS}" )
 MESSAGE( "CMAKE_CXX_COMPILER = ${CMAKE_CXX_COMPILER}" )
@@ -150,6 +152,12 @@
 ELSE (BREAKPAD)
 	ADD_DEFINITIONS(-DNBREAKPAD)
 ENDIF (BREAKPAD)
+
+IF (LINENOISE)
+	ADD_DEFINITIONS(-DHAVE_LINENOISE)
+	INCLUDE_DIRECTORIES(${OLXROOTDIR}/libs/linenoise)
+	SET(ALL_SRCS ${OLXROOTDIR}/libs/linenoise/linenoise.c ${ALL_SRCS})
+ENDIF (LINENOISE)

 IF (DISABLE_JOYSTICK)
 	ADD_DEFINITIONS(-DDISABLE_JOYSTICK)


Increase test timeout to 10 minutes...

Increase test timeout to 10 minutes...

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

--- tests/cmake/setup_testsuite.cmake
+++ tests/cmake/setup_testsuite.cmake
@@ -99,10 +99,10 @@
 ENDIF()

 #
-# Set a default time limit of 180 seconds:
+# Set a default time limit of 600 seconds:
 #

-SET_IF_EMPTY(TEST_TIME_LIMIT 180)
+SET_IF_EMPTY(TEST_TIME_LIMIT 600)

 #
 # And finally, enable testing:


replaced CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR for Android toolchain (#1590)

--- toolchains/android.cmake
+++ toolchains/android.cmake
@@ -8,17 +8,16 @@
 set(LIB_NAME tangram) # in order to have libtangram.so

 add_library(${LIB_NAME} SHARED
-  ${CMAKE_SOURCE_DIR}/platforms/common/platform_gl.cpp
-  ${CMAKE_SOURCE_DIR}/platforms/android/tangram/src/main/cpp/jniExports.cpp
-  ${CMAKE_SOURCE_DIR}/platforms/android/tangram/src/main/cpp/androidPlatform.cpp
-  ${CMAKE_SOURCE_DIR}/platforms/android/tangram/src/main/cpp/sqlite3ndk.cpp)
+  ${PROJECT_SOURCE_DIR}/platforms/common/platform_gl.cpp
+  ${PROJECT_SOURCE_DIR}/platforms/android/tangram/src/main/cpp/jniExports.cpp
+  ${PROJECT_SOURCE_DIR}/platforms/android/tangram/src/main/cpp/androidPlatform.cpp
+  ${PROJECT_SOURCE_DIR}/platforms/android/tangram/src/main/cpp/sqlite3ndk.cpp)

 target_include_directories(${LIB_NAME} PUBLIC
-  ${CMAKE_SOURCE_DIR}/core/deps/SQLiteCpp/sqlite3) # sqlite3ndk.cpp needs sqlite3.h
+  ${PROJECT_SOURCE_DIR}/core/deps/SQLiteCpp/sqlite3) # sqlite3ndk.cpp needs sqlite3.h

 target_link_libraries(${LIB_NAME}
   PUBLIC
   ${CORE_LIBRARY}
-  # android libaries
+  # android libraries
   GLESv2 log z atomic android)
-


test cycluscore->libs

test cycluscore->libs

--- src/CMake/UseCyclus.cmake
+++ src/CMake/UseCyclus.cmake
@@ -183,8 +183,8 @@
       )

     ADD_LIBRARY(${lib_root}Tests ${${lib_root}_TEST_CC})
-    TARGET_LINK_LIBRARIES(${lib_root}Tests dl cycluscore ${CYCLUS_GTEST_LIBRARIES})
-    SET_TARGET_PROPERTIES(${lib_root}Tests PROPERTIES LINKER_LANGUAGE C)
+    TARGET_LINK_LIBRARIES(${lib_root}Tests dl ${LIBS} ${CYCLUS_GTEST_LIBRARIES})
+    SET_TARGET_PROPERTIES(${lib_root}Tests PROPERTIES LINKER_LANGUAGE CXX)
     SET(
       "${lib_root}_TEST_LIB"
       "${lib_root}Tests"


Cleanup Clang compiler flags

Cleanup Clang compiler flags

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

--- deal.II/cmake/setup_compiler_flags_gnu.cmake
+++ deal.II/cmake/setup_compiler_flags_gnu.cmake
@@ -74,21 +74,16 @@

 IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   #
-  # Like many other compilers, clang produces warnings for array
-  # accesses out of bounds, even if they are in code that's dead
-  # for this dimension. Suppress this.
+  # *Boy*, clang seems to be the very definition of "pedantic" in
+  # "-pedantic" mode, so disable a bunch of harmless warnings
+  # (that are mainly triggered in third party headers so that we cannot
+  # easily fix them...)
   #
-  # There are a number of other warnings we get that can't easily
-  # be worked around and that are definitely not useful. Suppress
-  # those too.
-  #
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-array-bounds")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-parentheses")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-delete-non-virtual-dtor")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unneeded-internal-declaration")
+  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-delete-non-virtual-dtor") # not harmless but needed for boost <1.50.0
+  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
+  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-newline-eof")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-function")
   ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-unused-variable")
-  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-long-long")
 ENDIF()


Correcting the definition for crosscomponents

--- clrdefinitions.cmake
+++ clrdefinitions.cmake
@@ -1,4 +1,4 @@
-if(WIN32 AND CLR_CMAKE_PLATFORM_ARCH_I386 AND BUILD_JIT32)
+if(WIN32 AND CLR_CMAKE_TARGET_ARCH_I386 AND BUILD_JIT32)
   set(CLR_BUILD_JIT32 1)
 else()
   set(CLR_BUILD_JIT32 0)
@@ -7,7 +7,7 @@
 if (WIN32)
   set(FEATURE_EVENT_TRACE 1)
 endif()
-if(CLR_CMAKE_PLATFORM_LINUX AND CLR_CMAKE_PLATFORM_ARCH_AMD64)
+if(CLR_CMAKE_PLATFORM_LINUX AND CLR_CMAKE_TARGET_ARCH_AMD64)
   set(FEATURE_EVENT_TRACE 1)
 endif()

@@ -66,12 +66,12 @@
   add_definitions(-DWINVER=0x0602)
   add_definitions(-D_WIN32_WINNT=0x0602)
   add_definitions(-DWIN32_LEAN_AND_MEAN=1)
-  if(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_I386)
-    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+  if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
     # Only enable edit and continue on windows x86 and x64
     # exclude Linux, arm & arm64
     add_definitions(-DEnC_SUPPORTED)
-  endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_I386)
+  endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
 endif(WIN32)

 # Features - please keep them alphabetically sorted
@@ -120,10 +120,10 @@
 add_definitions(-DFEATURE_HOST_ASSEMBLY_RESOLVER)
 add_definitions(-DFEATURE_HOSTED_BINDER)
 add_definitions(-DFEATURE_ICASTABLE)
-if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
+if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
   add_definitions(-DFEATURE_IMPLICIT_TLS)
   set(FEATURE_IMPLICIT_TLS 1)
-endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
+endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
 add_definitions(-DFEATURE_ISYM_READER)
 add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
 add_definitions(-DFEATURE_MANAGED_ETW)
@@ -151,9 +151,9 @@
   set(FEATURE_READYTORUN 1)
 endif(NOT DEFINED CLR_CMAKE_TARGET_ARCH_ARM64)

-if (CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_I386)
+if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
   add_definitions(-DFEATURE_REJIT)
-endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_I386)
+endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)

 add_definitions(-DFEATURE_STANDALONE_SN)
 add_definitions(-DFEATURE_STRONGNAME_DELAY_SIGNING_ALLOWED)


Fix copy-paste error

Fix copy-paste error

--- cmake/Cppcheck.cmake
+++ cmake/Cppcheck.cmake
@@ -21,7 +21,7 @@
     set_target_properties(${check_target}
         PROPERTIES
         FOLDER "Maintenance"
-        EXCLUDE_FROM_DEFAULT_BUILD 1)
+        EXCLUDE_FROM_DEFAULT_BUILD 1
     )

     add_dependencies(${check_target} ${target})


distinguishing between different versions of ikos

--- cmake/FindIKOS.cmake
+++ cmake/FindIKOS.cmake
@@ -6,13 +6,14 @@
   find_library(IKOS_DBM_LIB NAMES dbm PATHS ${IKOS_ROOT}/lib NO_DEFAULT_PATH)
   include (FindPackageHandleStandardArgs)

-  find_package_handle_standard_args(IKOS REQUIRED_VARS IKOS_INCLUDE_DIR IKOS_DBM_LIB)
+  find_package_handle_standard_args(IKOS REQUIRED_VARS IKOS_INCLUDE_DIR)
   mark_as_advanced(IKOS_ROOT IKOS_INCLUDE_DIR IKOS_DBM_LIB)
   # start from 1 to make cmakedefine happy
   set (IKOS_MAJOR_VERSION 1)
-  if (EXISTS ${IKOS_ROOT}/lib/dbm/dbm.cpp)
+  if (IKOS_DBM_LIB)
+    set (IKOS_MINOR_VERSION 2)
+  else()
     set (IKOS_MINOR_VERSION 1)
-  else()
-    set (IKOS_MINOR_VERSION 2)
+    set (IKOS_DBM_LIB CACHE FILEPATH "" FORCE)
   endif()
 endif()


CMake: Do not explicitly require libpq

CMake: Do not explicitly require libpq

It should be sufficient to require libpqxx that should use proper
libpq by its own.

Former-commit-id: 37b0ae2284781a7a07dc146097245a38b93d237c

--- cmake/FindPQXX.cmake
+++ cmake/FindPQXX.cmake
@@ -1,13 +1,12 @@
 if(NOT PQXX_FOUND)
   find_path(PQXX_INCLUDE_DIR pqxx/pqxx)
   find_library(PQXX_LIBRARY pqxx)
-  find_library(PQ_LIBRARY pq)
-  mark_as_advanced(PQXX_INCLUDE_DIR PQXX_LIBRARY PQ_LIBRARY)
+  mark_as_advanced(PQXX_INCLUDE_DIR PQXX_LIBRARY)

   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(PQXX DEFAULT_MSG
-    PQXX_LIBRARY PQ_LIBRARY PQXX_INCLUDE_DIR)
+    PQXX_LIBRARY PQXX_INCLUDE_DIR)

   set(PQXX_INCLUDE_DIRS ${PQXX_INCLUDE_DIR})
-  set(PQXX_LIBRARIES ${PQXX_LIBRARY} ${PQ_LIBRARY})
+  set(PQXX_LIBRARIES ${PQXX_LIBRARY})
 endif(NOT PQXX_FOUND)


cmake build reworked: qore creates cmake support files during configuration; modules using cmake just do not use FindQore.cmake in internal trees but use system-wide QoreConfig.cmake

git-svn-id: 164eff1e616d16b0bd77b7c0d93f4c22f1ceceea@6201 1b0b35fe-f740-4c1b-b404-a338b32e513b

--- cmake/FindQore.cmake
+++ cmake/FindQore.cmake
@@ -1,150 +0,0 @@
-#
-# Cmake module for Qore programming language
-#
-# (c) 2009 Qore Technologies, http://qoretechnologies.com
-#
-# QORE_FOUND - system has it
-# QORE_INCLUDE_DIR
-# QORE_LIBRARY
-# QORE_MODULES_DIR
-#
-# QORE_EXECUTABLE
-# QORE_QPP_EXECUTABLE
-#
-
-SET(QORE_FOUND FALSE)
-
-
-MACRO (QORE_WRAP_QPP _cpp_files _inputs )
-  message(STATUS "QPP: ${QORE_QPP_EXECUTABLE}")
-  message(STATUS "QPP2: ${_inputs}")
-
-  FOREACH (it ${_inputs})
-    message(STATUS "QPP1: ${it}")
-    GET_FILENAME_COMPONENT(_outfile ${it} NAME_WE)
-    GET_FILENAME_COMPONENT(_infile ${it} ABSOLUTE)
-    SET(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/${_outfile}.cpp)
-    SET(_doxfile ${CMAKE_CURRENT_BINARY_DIR}/${_outfile}.dox.h)
-    message(STATUS "QPP processing: ${_infile} -> ${_cppfile} ${_doxfile}")
-    ADD_CUSTOM_COMMAND(OUTPUT ${_cppfile} ${_doxfile}
-      COMMAND ${QORE_QPP_EXECUTABLE}
-      ARGS --output=${_cppfile} --dox-output=${_doxfile} ${_infile}
-      MAIN_DEPENDENCY ${_infile}
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-      )
-    SET(${_cpp_files} ${${_cpp_files}} ${_cppfile})
-  ENDFOREACH (it)
-
-  message(STATUS "QPP files: ${${_cpp_files}}")
-
-ENDMACRO (QORE_WRAP_QPP)
-
-
-
-FIND_PATH (QORE_INCLUDE_DIR qore/Qore.h
-    /usr/include
-    /usr/include/qore
-    /usr/local/include
-    /usr/local/include/qore
-    /opt/qore/include/qore
-    /opt/qore/include
-    ${QORE_INCLUDE_PATH}
-)
-
-FIND_LIBRARY (QORE_LIBRARY
-    NAMES libqore libqore.so libqore.dylib
-    PATHS
-      /usr/lib
-      /usr/local/lib
-	  /opt/qore/lib
-	  ${QORE_LIBRARY_PATH}
-    )
-
-IF (QORE_LIBRARY AND QORE_INCLUDE_DIR)
-    SET(QORE_LIBRARIES ${QORE_LIBRARY})
-    SET(QORE_FOUND TRUE)
-ENDIF (QORE_LIBRARY AND QORE_INCLUDE_DIR)
-
-
-# get Qore version form 'qore --short-version' command etc
-FIND_PROGRAM(QORE_EXECUTABLE NAMES qore DOC "Searching for qore executable")
-IF (NOT QORE_EXECUTABLE)
-    MESSAGE( FATAL_ERROR "Cannot find 'qore' executable. Check if it's in your PATH" )
-ENDIF (NOT QORE_EXECUTABLE)
-
-FIND_PROGRAM(QORE_QPP_EXECUTABLE NAMES qpp DOC "Searching for qore qpp preprocessor")
-IF (NOT QORE_QPP_EXECUTABLE)
-    MESSAGE( FATAL_ERROR "Cannot find 'qpp' executable. Check if it's in your PATH" )
-ENDIF (NOT QORE_QPP_EXECUTABLE)
-
-
-IF (QORE_MIN_VERSION)
-    #now parse the parts of the user given version string into variables
-    # qore version is taken from qore executable - format major.minor.patch-build
-    STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qore_version "${QORE_MIN_VERSION}")
-    IF (NOT req_qore_version)
-        MESSAGE( FATAL_ERROR "Invalid Qore version string given: \"${QORE_MIN_VERSION}\", expected e.g. \"0.7.3\"")
-    ENDIF (NOT req_qore_version)
-
-    # now parse the parts of the user given version string into variables
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qore_major_v "${QORE_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qore_minor_v "${QORE_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qore_patch_v "${QORE_MIN_VERSION}")
-
-    EXEC_PROGRAM(${QORE_EXECUTABLE} ARGS "--short-version" OUTPUT_VARIABLE QORE_VERSION)
-    IF (NOT QORE_VERSION)
-        MESSAGE( FATAL_ERROR "Unknown Qore version. No data taken from 'qore --short-version'" )
-    ELSE (NOT QORE_VERSION)
-        MESSAGE( STATUS "Qore version: ${QORE_VERSION}" )
-    ENDIF (NOT QORE_VERSION)
-
-    # compare requested version with the one found
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+\\-[0-9]+" "\\1" qore_major_v "${QORE_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+\\-[0-9]+" "\\1" qore_minor_v "${QORE_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)\\-[0-9]+" "\\1" qore_patch_v "${QORE_VERSION}")
-    # compute an overall version number which can be compared at once
-    MATH(EXPR req_v "${req_qore_major_v}*10000 + ${req_qore_minor_v}*100 + ${req_qore_patch_v}")
-    MATH(EXPR found_v "${qore_major_v}*10000 + ${qore_minor_v}*100 + ${qore_patch_v}")
-    #MESSAGE (STATUS "${req_qore_major_v} ${req_qore_minor_v} ${req_qore_patch_v}")
-    #MESSAGE (STATUS "${qore_major_v} ${qore_minor_v} ${qore_patch_v}")
-    # and decide finally
-    IF (found_v LESS req_v)
-        SET (QORE_FOUND FALSE)
-        MESSAGE (STATUS "Requested Qore version is bigger than found. ${QORE_MIN_VERSION} vs ${QORE_VERSION}" )
-    ENDIF (found_v LESS req_v)
-
-ENDIF (QORE_MIN_VERSION)
-
-# module install dir
-EXEC_PROGRAM(${QORE_EXECUTABLE} ARGS "--module-dir" OUTPUT_VARIABLE QORE_MODULES_DIR)
-IF (NOT QORE_MODULES_DIR)
-    MESSAGE( FATAL_ERROR "Unknown Qore modules location. No data taken from 'qore --module-dir'" )
-ELSE (NOT QORE_MODULES_DIR)
-    MESSAGE( STATUS "Qore modules dir: ${QORE_MODULES_DIR}" )
-ENDIF (NOT QORE_MODULES_DIR)
-
-# module API version
-IF (NOT QORE_API_VERSION)
-    EXEC_PROGRAM(${QORE_EXECUTABLE} ARGS "--latest-module-api" OUTPUT_VARIABLE QORE_API_VERSION)
-ENDIF (NOT QORE_API_VERSION)
-IF (NOT QORE_API_VERSION)
-    MESSAGE( FATAL_ERROR "Unknown Qore module API version. No data taken from 'qore --latest-module-api'. It can be specified manually with -DQORE_API_VERSION")
-ELSE (NOT QORE_API_VERSION)
-    MESSAGE( STATUS "Qore module API version: ${QORE_API_VERSION}")
-ENDIF (NOT QORE_API_VERSION)
-
-
-IF (QORE_FOUND)
-    MESSAGE(STATUS "Found Qore lib: ${QORE_LIBRARY}")
-    MESSAGE(STATUS "      includes: ${QORE_INCLUDE_DIR}")
-ELSE (QORE_FOUND)
-    MESSAGE(STATUS "E! Found Qore lib: ${QORE_LIBRARY}")
-    MESSAGE(STATUS "E!      includes: ${QORE_INCLUDE_DIR}")
-
-  IF (Qore_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find Qore library")
-  ENDIF (Qore_FIND_REQUIRED)
-ENDIF (QORE_FOUND)
-
-MARK_AS_ADVANCED(QORE_INCLUDE_DIR QORE_LIBRARY)
-


fix: avoid warnings in newer CMake versions (#283)

Newer versions of CMake warn about using
`find_package_handle_standard_args()` through an include (correctly so),
so use `find_package()` instead.

--- cmake/FindgRPC.cmake
+++ cmake/FindgRPC.cmake
@@ -65,10 +65,9 @@
 # gRPC always requires Thread support.
 find_package(Threads REQUIRED)

-# 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)
+# Load the module to find protobuf with proper targets.
+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


print detected compiler

print detected compiler

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -26,14 +26,19 @@
    set(VC_COMPILER_IS_GCC false)
    if(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$")
       set(VC_COMPILER_IS_INTEL true)
+      message(STATUS "Detected Compiler: Intel")
    elseif(CMAKE_CXX_COMPILER MATCHES "/(opencc|openCC)$")
       set(VC_COMPILER_IS_OPEN64 true)
-   elseif(CMAKE_CXX_COMPILER MATCHES "/clang$")
+      message(STATUS "Detected Compiler: Open64")
+   elseif(CMAKE_CXX_COMPILER MATCHES "/clang\\+\\+$")
       set(VC_COMPILER_IS_CLANG true)
+      message(STATUS "Detected Compiler: Clang")
    elseif(MSVC)
       set(VC_COMPILER_IS_MSVC true)
+      message(STATUS "Detected Compiler: MSVC")
    elseif(CMAKE_COMPILER_IS_GNUCXX)
       set(VC_COMPILER_IS_GCC true)
+      message(STATUS "Detected Compiler: GCC")

       # check the GCC version
       exec_program(${CMAKE_C_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE VC_GCC_VERSION)


ci: fix MSVC /O flag for CI.

ci: fix MSVC /O flag for CI.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -201,16 +201,14 @@

   # For CI enable optimization for Debug builds to avoid tests timeout.
   if (NOT "${CI}" STREQUAL "")
-    if(CC_HAS_DEBUG_FRENDLY_OPTIMIZATION)
+    if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
+      #string(CONCAT CMAKE_C_FLAGS_DEBUG "")
+      #string(CONCAT CMAKE_CXX_FLAGS_DEBUG "")
+    elseif(CC_HAS_DEBUG_FRENDLY_OPTIMIZATION)
       #string(CONCAT CMAKE_C_FLAGS_DEBUG " -Og")
       #string(CONCAT CMAKE_CXX_FLAGS_DEBUG " -Og")
       set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og")
       set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
-    elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
-      #string(CONCAT CMAKE_C_FLAGS_DEBUG " /O")
-      #string(CONCAT CMAKE_CXX_FLAGS_DEBUG " /O")
-      set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /O")
-      set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /O")
     else()
       #string(CONCAT CMAKE_C_FLAGS_DEBUG " -O")
       #string(CONCAT CMAKE_CXX_FLAGS_DEBUG " -O")


Add an error message about GCC 4.7 and libobjc2 to CMake

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -23,11 +23,16 @@
 endif()

 # Check GCC version:
-# GCC older than 4.6 is not supported.
 if (CMAKE_COMPILER_IS_GNUCC)
     execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
         OUTPUT_VARIABLE CC_VERSION)
-    if (CC_VERSION VERSION_GREATER 4.4.5 OR CC_VERSION VERSION_EQUAL 4.4.5)
+    if (CC_VERSION VERSION_GREATER 4.7 OR CC_VERSION VERSION_EQUAL 4.7)
+        message(FATAL_ERROR
+            "GNU GCC version >= 4.7 has well known problems with "
+            "GNUstep's libobjc2 runtime which is used by Tarantool. "
+            "The target binary will be unusable. Please you use CC=gcc-4.6 "
+            "or CC=clang or upgrade to Tarantool 1.5.x or later.")
+    elseif (CC_VERSION VERSION_GREATER 4.4.5 OR CC_VERSION VERSION_EQUAL 4.4.5)
         message(STATUS
             "${CMAKE_C_COMPILER} version >= 4.4.5 -- ${CC_VERSION}")
     else()


do NOT force build type

do NOT force build type

--- cmake/dtkBuild.cmake
+++ cmake/dtkBuild.cmake
@@ -3,10 +3,6 @@
 ## Author: Julien Wintz
 ## Copyright (C) 2008 - Julien Wintz, Inria.
 ## Created: Fri Apr  2 09:05:55 2010 (+0200)
-## Version: $Id$
-## Last-Updated: mer. déc.  4 15:15:44 2013 (+0100)
-##           By: Nicolas Niclausse
-##     Update #: 231
 ######################################################################
 ##
 ### Commentary:
@@ -27,7 +23,7 @@
 ## Configure cmake variables
 ## #################################################################

-set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE)
+set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type")

 set(CMAKE_COLOR_MAKEFILE ON)
 set(CMAKE_VERBOSE_MAKEFILE OFF)


Update android.toolchain.cmake to include NDK r10.

--- Source/CMake/Toolchains/android.toolchain.cmake
+++ Source/CMake/Toolchains/android.toolchain.cmake
@@ -325,7 +325,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -1740,7 +1740,7 @@
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d, r10; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


CMake fix : added missing include.

CMake fix : added missing include.

--- src/cmake/message.cmake
+++ src/cmake/message.cmake
@@ -1,3 +1,4 @@
+include(CMakeParseArguments)
 set(__libyuni_error_has_occured   false)


updated and refactor FindFFTW cmake module

--- cmake/FindFFTW.cmake
+++ cmake/FindFFTW.cmake
@@ -5,11 +5,13 @@
 #
 # It sets the following variables:
 #   FFTW_FOUND          ... true if fftw is found on the system
-#   FFTW_LIBRARIES      ... full path to fftw library (will be filled with serial/openmp/pthreads enabled file names if present)
+#   FFTW_LIBRARIES      ... list of library identifiers that were found (will be filled with serial/openmp/pthreads enabled file names if present, only stubs will be filled in not full paths)
 #   FFTW_INCLUDES       ... fftw include directory
-#   FFTW_SERIAL_LIBS	... full path to serial fftw library
-#   FFTW_THREADS_LIBS	... full path to pthreads fftw library
-#   FFTW_OPENMP_LIBS	... full path to openmp fftw library
+#   FFTW_SERIAL_LIBS	... list of full path(s) to serial fftw library(ies)
+#   FFTW_THREADS_LIBS	... list of full path(s) to pthreads fftw library(ies)
+#   FFTW_OPENMP_LIBS	... list of full path(s) to openmp fftw library(ies)
+#   FFTW_INCLUDE_DIR	... fftw include directory
+#   FFTW_LIBRARY_DIR	... fftw library directory
 #
 # The following variables will be checked by the function
 #   FFTW_USE_STATIC_LIBS    ... if true, only static libraries are found
@@ -17,6 +19,7 @@
 #                               under this path
 #   FFTW_LIBRARY            ... fftw library to use
 #   FFTW_INCLUDE_DIR        ... fftw include directory
+#   FFTW_VERBOSE_FIND       ... print extra messages
 #
 # Besides these command line defines, the environment is searched for FFTWDIR and FFTW_ROOT to be filled
 # if these variables are defined, it's assumed that they point to the FFTW installation root path
@@ -134,7 +137,19 @@
   endif( FFTW_ROOT )

   if(EXISTS ${FFTW_SERIAL_STUBLIB})
-    list(APPEND FFTW_SERIAL_LIBS ${FFTW_SERIAL_STUBLIB})
+
+    if( NOT CMAKE_FIND_LIBRARY_SUFFIXES MATCHES ${CMAKE_STATIC_LIBRARY_SUFFIX} )
+      add_library(${_LIBSTUB} STATIC IMPORTED GLOBAL)
+    else()
+      add_library(${_LIBSTUB} SHARED IMPORTED GLOBAL)
+    endif()
+
+    set_target_properties(${_LIBSTUB} PROPERTIES IMPORTED_LOCATION ${FFTW_SERIAL_STUBLIB} )
+
+    list(APPEND FFTW_SERIAL_LIBS_ABSPATH ${FFTW_SERIAL_STUBLIB})
+    list(APPEND FFTW_SERIAL_LIBS ${_LIBSTUB})
+
+    set(FFTW_LIBRARIES "${FFTW_LIBRARIES} ${_LIBSTUB}")
   else()
     if(NOT FFTW_FIND_QUIETLY)
       message("FFTW_SERIAL_STUBLIB empty for ${_LIBSTUB} .. :${FFTW_SERIAL_STUBLIB}:")
@@ -142,7 +157,20 @@
   endif()

   if(EXISTS ${FFTW_OPENMP_STUBLIB})
-    list(APPEND FFTW_OPENMP_LIBS ${FFTW_OPENMP_STUBLIB})
+
+    if( NOT CMAKE_FIND_LIBRARY_SUFFIXES MATCHES ${CMAKE_STATIC_LIBRARY_SUFFIX} )
+      add_library(${_LIBSTUB}_omp STATIC IMPORTED GLOBAL)
+    else()
+      add_library(${_LIBSTUB}_omp SHARED IMPORTED GLOBAL)
+    endif()
+
+    set_target_properties(${_LIBSTUB}_omp PROPERTIES IMPORTED_LOCATION ${FFTW_OPENMP_STUBLIB} )
+
+    list(APPEND FFTW_OPENMP_LIBS_ABSPATH ${FFTW_OPENMP_STUBLIB})
+    list(APPEND FFTW_OPENMP_LIBS ${_LIBSTUB}_omp)
+
+    set(FFTW_LIBRARIES "${FFTW_LIBRARIES} ${_LIBSTUB}_omp")
+
   else()
     if(NOT FFTW_FIND_QUIETLY)
       message("FFTW_OPENMP_STUBLIB empty for ${_LIBSTUB} .. :${FFTW_OPENMP_STUBLIB}:")
@@ -150,7 +178,17 @@
   endif()

   if(EXISTS ${FFTW_THREADS_STUBLIB})
-    list(APPEND FFTW_THREADS_LIBS ${FFTW_THREADS_STUBLIB})
+    if( NOT CMAKE_FIND_LIBRARY_SUFFIXES MATCHES ${CMAKE_STATIC_LIBRARY_SUFFIX} )
+      add_library(${_LIBSTUB}_threads STATIC IMPORTED GLOBAL)
+    else()
+      add_library(${_LIBSTUB}_threads SHARED IMPORTED GLOBAL)
+    endif()
+    set_target_properties(${_LIBSTUB}_threads PROPERTIES IMPORTED_LOCATION ${FFTW_THREADS_STUBLIB} )
+
+    list(APPEND FFTW_THREADS_LIBS_ABSPATH ${FFTW_THREADS_STUBLIB})
+    list(APPEND FFTW_THREADS_LIBS ${_LIBSTUB}_threads)
+
+    set(FFTW_LIBRARIES "${FFTW_LIBRARIES} ${_LIBSTUB}_threads")
   else()
     if(NOT FFTW_FIND_QUIETLY)
       message("FFTW_OPENMP_STUBLIB empty for ${_LIBSTUB} .. :${FFTW_THREADS_STUBLIB}:")
@@ -184,14 +222,23 @@

 endif( FFTW_ROOT )

-# fill libraries
-set(FFTW_LIBRARIES)
-foreach(_ITEM IN LISTS FFTW_SERIAL_LIBS FFTW_THREADS_LIBS FFTW_OPENMP_LIBS )
+if(EXISTS ${FFTW_INCLUDES})
+  set(FFTW_INCLUDE_DIR ${FFTW_INCLUDES})
+endif()
+
+# fill library dir
+set(FFTW_LIBFILES_LIST)
+
+foreach(_ITEM IN LISTS FFTW_SERIAL_LIBS_ABSPATH FFTW_THREADS_LIBS_ABSPATH FFTW_OPENMP_LIBS_ABSPATH )
   if(EXISTS ${_ITEM})
-    set(FFTW_LIBRARIES "${FFTW_LIBRARIES} ${_ITEM}")
-  endif()
-endforeach()
-
+    list(APPEND FFTW_LIBFILES_LIST ${_ITEM})
+  endif()
+endforeach()
+
+if(FFTW_LIBRARIES)
+  list(GET FFTW_LIBFILES_LIST 0 FFTW_LIBFILES_ITEM0)
+  get_filename_component(FFTW_LIBRARY_DIR ${FFTW_LIBFILES_ITEM0} DIRECTORY)
+endif()

 #revert CMAKE_FIND_LIBRARY_SUFFIXES
 set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV} )
@@ -200,12 +247,27 @@
 find_package_handle_standard_args(FFTW DEFAULT_MSG
   FFTW_INCLUDES
   FFTW_LIBRARIES
+#  HANDLE_COMPONENTS
   )

-mark_as_advanced(FFTW_INCLUDES #include directory
+if(NOT FFTW_VERBOSE_FIND)
+  message("++ FindFFTW")
+  message("++ FFTW_INCLUDES    : ${FFTW_INCLUDES}")
+  message("++ FFTW_LIBRARIES   : ${FFTW_LIBRARIES}")
+  message("++ FFTW_SERIAL_LIBS : ${FFTW_SERIAL_LIBS_ABSPATH}")
+  message("++ FFTW_THREADS_LIBS: ${FFTW_THREADS_LIBS_ABSPATH}")
+  message("++ FFTW_OPENMP_LIBS : ${FFTW_OPENMP_LIBS_ABSPATH}")
+  message("++ FFTW_INCLUDE_DIR : ${FFTW_INCLUDE_DIR}")
+  message("++ FFTW_LIBRARY_DIR : ${FFTW_LIBRARY_DIR}")
+endif()
+
+mark_as_advanced(
+  FFTW_INCLUDES #include directory
   FFTW_LIBRARIES
   FFTW_SERIAL_LIBS #individual serial libs
   FFTW_THREADS_LIBS #pthreads libraries
   FFTW_OPENMP_LIBS #openmp libraries
+  FFTW_INCLUDE_DIR
+  FFTW_LIBRARY_DIR
   )


Fix GLFW find script

Fix GLFW find script

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -70,10 +70,17 @@
     /src # for from-source builds

     DOC "The GLFW library")
-
-set(GLFW_LIBRARIES
-    optimized   ${GLFW_LIBRARY_RELEASE}
-    debug       ${GLFW_LIBRARY_DEBUG})
+
+set(GLFW_LIBRARIES "")
+if(GLFW_LIBRARY_RELEASE AND GLFW_LIBRARY_DEBUG)
+    set(GLFW_LIBRARIES
+        optimized   ${GLFW_LIBRARY_RELEASE}
+        debug       ${GLFW_LIBRARY_DEBUG})
+elseif(GLFW_LIBRARY_RELEASE)
+    set(GLFW_LIBRARIES ${GLFW_LIBRARY_RELEASE})
+elseif(GLFW_LIBRARY_DEBUG)
+    set(GLFW_LIBRARIES ${GLFW_LIBRARY_DEBUG})
+endif()

 if(WIN32)


Added small cmake fix

Added small cmake fix

--- cmake/FindONNX.cmake
+++ cmake/FindONNX.cmake
@@ -4,7 +4,7 @@

 # For now, check the old name ORT_INSTALL_DIR
 if(ORT_INSTALL_DIR AND NOT ONNXRT_ROOT_DIR)
-  set(ONNXRT_ROOT_DIR ORT_INSTALL_DIR)
+  set(ONNXRT_ROOT_DIR ${ORT_INSTALL_DIR})
 endif()

 if(ONNXRT_ROOT_DIR)


Fix: allow compiling AliRoot without AliEn

This used to be possible but was broken when AliEn-ROOT-Legacy
was extracted from ROOT. When AliEn is missing, just print a
warning instead of throwin a fatal error.

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

         set(ROOT_HASALIEN TRUE)
     else(ALIEN)
-        message(FATAL_ERROR "No AliEn installation found. Please set \"ALIEN\" to point to your AliEn installation.")
+        message(WARNING "No AliEn installation found. Please set \"ALIEN\" to point to your AliEn installation.")
     endif(ALIEN)

     # Checking for xml support


erthink-cmake: fix/enable LTO-detection for Clang >= 7.0 with CMAKE_TOOLCHAIN_FILE.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -352,6 +352,18 @@
       (CMAKE_CLANG_LD AND CMAKE_CLANG_AR AND CMAKE_CLANG_NM AND CMAKE_CLANG_RANLIB))
     set(CLANG_LTO_AVAILABLE TRUE)
     message(STATUS "Link-Time Optimization by CLANG/LLVM is available")
+  elseif(CMAKE_TOOLCHAIN_FILE AND NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 7.0)
+    set(CLANG_LTO_AVAILABLE TRUE)
+    if (NOT CMAKE_CLANG_AR)
+      set(CMAKE_CLANG_AR ${CMAKE_AR})
+    endif()
+    if (NOT CMAKE_CLANG_NM)
+      set(CMAKE_CLANG_NM ${CMAKE_NM})
+    endif()
+    if (NOT CMAKE_CLANG_RANLIB)
+      set(CMAKE_CLANG_RANLIB ${CMAKE_RANLIB })
+    endif()
+    message(STATUS "Assume Link-Time Optimization by CLANG/LLVM is available via ${CMAKE_TOOLCHAIN_FILE}")
   else()
     set(CLANG_LTO_AVAILABLE FALSE)
     message(STATUS "Link-Time Optimization by CLANG/LLVM is NOT available")


Fixed outdated configuration

Fixed outdated configuration

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -86,7 +86,7 @@
 set(CMAKE_CXX_EXTENSIONS OFF)
 include(AddCXXCompileOptions)

-if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
+if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel" AND "x${CMAKE_CXX_STANDARD}" STREQUAL "x98")
   # message(STATUS "Using Boost for smart pointers")
   find_package(Boost REQUIRED)
   include_directories(${Boost_INCLUDE_DIRS})


Update to 0.2.1

Update to 0.2.1

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -23,7 +23,7 @@
 endif ()

 set (PACKAGE_NAME        "${CMAKE_PROJECT_NAME}")
-set (PACKAGE_VERSION     "0.1.0.${GIT_CHECKIN_COUNT}")
+set (PACKAGE_VERSION     "0.2.1.${GIT_CHECKIN_COUNT}")
 set (PACKAGE_STRING      "${PACKAGE_NAME} ${PACKAGE_VERSION}")
 set (PACKAGE_TARNAME     "${PACKAGE_NAME}-${PACKAGE_VERSION}")
 set (PACKAGE_BUGREPORT   "https://github.com/Qihoo360/evpp/issues")


added libcec to deb/rpm dependency list

added libcec to deb/rpm dependency list

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -58,13 +58,15 @@
 # https://cmake.org/Wiki/CMake:CPackPackageGenerators
 # .deb files for apt
 SET ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/preinst;${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/postinst;${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/prerm" )
+SET ( CPACK_DEBIAN_PACKAGE_DEPENDS "libcec4" )
 SET ( CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous" )

 # .rpm for rpm
 # https://cmake.org/cmake/help/v3.5/module/CPackRPM.html
-SET ( CPACK_RPM_PACKAGE_RELEASE 1)
-SET ( CPACK_RPM_PACKAGE_LICENSE "MIT")
-SET ( CPACK_RPM_PACKAGE_GROUP "Applications")
+SET ( CPACK_RPM_PACKAGE_RELEASE 1 )
+SET ( CPACK_RPM_PACKAGE_LICENSE "MIT" )
+SET ( CPACK_RPM_PACKAGE_GROUP "Applications" )
+SET ( CPACK_RPM_PACKAGE_REQUIRES "libcec4" )
 SET ( CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/rpm/preinst" )
 SET ( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/rpm/postinst" )
 SET ( CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/rpm/prerm" )


turns out this is a problem on cmake < 2.8.4 (at least)

--- cmake/tools/rt.cmake
+++ cmake/tools/rt.cmake
@@ -32,11 +32,11 @@
 # message("CMAKE_VERSION=${CMAKE_VERSION}")

 if(NOT APPLE)
-  if (${CMAKE_VERSION} VERSION_LESS 2.8.1)
+  if (${CMAKE_VERSION} VERSION_LESS 2.8.4)
     # cmake later than 2.8.0 appears to have a better find_library
     # that knows about the ABI of the compiler.  For lucid we just
     # depend on the linker to find it for us.
-    set(RT_LIBRARY rt CACHE FILEPATH "Hacked find of rt for ubuntu lucid")
+    set(RT_LIBRARY rt CACHE FILEPATH "Hacked find of rt for cmake < 2.8.4")
   else()
     find_library(RT_LIBRARY rt)
     assert_file_exists(${RT_LIBRARY} "RT Library")


[FIX] deactivate on all linux

[FIX] deactivate on all linux

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -158,9 +158,9 @@
             set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
         endif (NOT APPLE)
         # on linux cmake adds -rdynamic automatically which clang can't handle in static builds
-        if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND COMPILER_IS_CLANG)
+        if (CMAKE_SYSTEM_NAME MATCHES "Linux")
             SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
-        endif (CMAKE_SYSTEM_NAME MATCHES "Linux" AND COMPILER_IS_CLANG)
+        endif (CMAKE_SYSTEM_NAME MATCHES "Linux")
         # not that these checks are more than OS, because we have many possible combinations between
         # OS, compiler and STL used
     endif (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")


Changed: Switched the mouse buttons for zoom and pan.

Signed-off-with-cleanup-by: gerrit <788f206ccdc6f0273070dd892b0148035dd2ebe5@vossg.org>

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -2474,3 +2474,29 @@
   ENDIF(OSG_IGNORE_INSTALL)
 ENDMACRO(OSG_CHECK_INSTALL)

+##########################################################################
+# Add Tutorial builds as tests
+#
+MACRO(OSG_ADD_TUTORIAL_TESTS TUTORIAL_SOURCE_DIR)
+    IF(NOT ${OSG_CMAKE_PASS} STREQUAL "OSGSETUPUNITTEST")
+        RETURN()
+    ENDIF()
+
+    FILE(GLOB TUTORIAL_SOURCES "${TUTORIAL_SOURCE_DIR}/[0-9][0-9]*.cpp")
+
+    FOREACH(TUTORIAL ${TUTORIAL_SOURCES})
+        #Get the path to the tutorial executable
+        STRING(LENGTH ${TUTORIAL} SOURCE_PATH_LENGTH)
+        MATH(EXPR SOURCE_PATH_LENGTH '${SOURCE_PATH_LENGTH}-4')
+        STRING(SUBSTRING ${TUTORIAL} 0 ${SOURCE_PATH_LENGTH} TUTORIAL_EXE_PATH )
+        SET(TUTORIAL_EXE_PATH "${TUTORIAL_EXE_PATH}${CMAKE_EXECUTABLE_SUFFIX}")
+
+        #Extract a short name for the tutorial test
+        STRING(REGEX MATCH "([0-9][0-9].*)[.]cpp" TUTORIAL_NAME ${TUTORIAL})
+        SET(TUTORIAL_NAME ${CMAKE_MATCH_1})
+
+        #Add a test to see if the tutorial exists
+        ADD_TEST(NAME "${PROJECT_NAME}-${TUTORIAL_NAME}"
+                 COMMAND test -e ${TUTORIAL_EXE_PATH})
+    ENDFOREACH()
+ENDMACRO()


add BUILD_TOOLS off to android_config.cmake

--- CMake/android_config.cmake
+++ CMake/android_config.cmake
@@ -8,6 +8,7 @@
     set(BUILD_WITH_TM2 OFF)
     set(BUILD_UNIT_TESTS OFF)
     set(BUILD_EXAMPLES OFF)
+    set(BUILD_TOOLS OFF)
     set(BUILD_WITH_OPENMP OFF)
     set(BUILD_GRAPHICAL_EXAMPLES OFF)
     set(ANDROID_STL "c++_static")


Change SHARK_DIR to Shark_DIR

Change SHARK_DIR to Shark_DIR

--- Modules/ThirdParty/Shark/otb-module-init.cmake
+++ Modules/ThirdParty/Shark/otb-module-init.cmake
@@ -1,2 +1,2 @@
 find_package ( Shark REQUIRED )
-mark_as_advanced( SHARK_DIR )
+mark_as_advanced( Shark_DIR )


In the CMake build system, use CMAKE_SHARED_LIBRARY_CXX_FLAGS to
get the PIC compiler flag instead of the hardcoded '-fPIC' value.

Suggested by: @cwsmith

--- config/cmake/modules/MfemCmakeUtilities.cmake
+++ config/cmake/modules/MfemCmakeUtilities.cmake
@@ -729,8 +729,7 @@
   set(MFEM_INCFLAGS "-I\$(MFEM_INC_DIR) \$(MFEM_TPLFLAGS)")
   set(MFEM_PICFLAG "")
   if (BUILD_SHARED_LIBS)
-    # TODO: How do we get the PIC from CMake?
-    set(MFEM_PICFLAG "-fPIC")
+    set(MFEM_PICFLAG "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
   endif()
   set(MFEM_FLAGS "\$(MFEM_CPPFLAGS) \$(MFEM_CXXFLAGS) \$(MFEM_INCFLAGS)")
   # TPL link flags: set below


System libraries added as imported interface targets.

--- cmake/bde_external_dependencies.cmake
+++ cmake/bde_external_dependencies.cmake
@@ -253,7 +253,9 @@
             # The external dependancy is not found. Creating fake target to stop lookup.
             # Unresolved dependencies will be added as-is with '-l' flag to the link line.
             message(STATUS  "Not found (raw) external dependency '${depName}'")
-            add_custom_target(${depName})
+            bde_log(VERY_VERBOSE "Adding ${depName} as IMPORTED INTERFACE library")
+            add_library(${depName} INTERFACE IMPORTED)
+            target_link_options(${depName} INTERFACE "-l${depName}")
         endforeach()
     endwhile()
 endfunction()


Added newline at end of libsodium hunter.cmake

--- cmake/projects/libsodium/hunter.cmake
+++ cmake/projects/libsodium/hunter.cmake
@@ -23,4 +23,4 @@
     hunter_pick_scheme(DEFAULT url_sha1_libsodium_autogen_autotools)
 endif()
 hunter_cacheable(libsodium)
-hunter_download(PACKAGE_NAME libsodium)+hunter_download(PACKAGE_NAME libsodium)


Use the "Unlabeled" sub-project to execute all tests without labels.

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -116,9 +116,15 @@
   if (NOT TESTING_PARALLEL_LEVEL)
     set(TESTING_PARALLEL_LEVEL 8)
   endif()
+
+  if(label MATCHES "Unlabeled")
+    set(_include_label EXCLUDE_LABEL .*)
+  else()
+    set(_include_label INCLUDE_LABEL ${label})
+  endif()

   ctest_test(BUILD "${build_dir}"
-             INCLUDE_LABEL ${label}
+             ${_include_label}
              PARALLEL_LEVEL ${TESTING_PARALLEL_LEVEL}
              EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
              RETURN_VALUE res


enh: Set BASIS_EXPORT_SUFFIX=Targets and use BASIS_EXPORT_ENABLED instead of BASIS_CREATE_EXPORTS_FILE [CMake]

--- CMake/Modules/mirtkProjectBegin.cmake
+++ CMake/Modules/mirtkProjectBegin.cmake
@@ -32,7 +32,6 @@
     set(BASIS_ALL_DOC               OFF       CACHE INTERNAL "" FORCE)
     set(BASIS_COMPILE_MATLAB        ON        CACHE INTERNAL "" FORCE)
     set(BASIS_COMPILE_SCRIPTS       OFF       CACHE INTERNAL "" FORCE)
-    set(BASIS_CREATE_EXPORTS_FILE   ON        CACHE INTERNAL "" FORCE)
     set(BASIS_INSTALL_RPATH         ON        CACHE INTERNAL "" FORCE)
     set(BASIS_INSTALL_SCHEME        "default" CACHE INTERNAL "" FORCE)
     set(BASIS_INSTALL_SITE_PACKAGES OFF       CACHE INTERNAL "" FORCE)
@@ -44,6 +43,13 @@
     endforeach ()
     unset(lang)
   endif ()
+  # Export of build targets
+  if (PROJECT_IS_MODULE)
+    set(BASIS_EXPORT_ENABLED OFF)
+  else ()
+    set(BASIS_EXPORT_ENABLED ON)
+  endif ()
+  set(BASIS_EXPORT_SUFFIX "Targets")
   # Use CMAKE_CONFIGURATION_TYPES as selection of CMAKE_BUILD_TYPE and hide it
   basis_is_cached(_CACHED_CONFIGURATION_TYPES CMAKE_CONFIGURATION_TYPES)
   if (_CACHED_CONFIGURATION_TYPES)


add the libc headers to the include paths for android builds

otherwise you are not able to compile c source files with this toolchain

--- cmake-toolchains/android.toolchain.cmake
+++ cmake-toolchains/android.toolchain.cmake
@@ -115,6 +115,7 @@
 set(ANDROID_NDK_STL_CXXFLAGS "-I${ANDROID_NDK_STL_ROOT}/include -I${ANDROID_NDK_STL_ROOT}/libs/${ANDROID_NDK_ABI}/include")
 set(ANDROID_NDK_STL_LIBRARYPATH "${ANDROID_NDK_STL_ROOT}/libs/${ANDROID_NDK_ABI}")
 set(ANDROID_NDK_STL_LDFLAGS "-lgnustl_static")
+set(ANDROID_NDK_INCLUDES "-I${ANDROID_NDK_ROOT}/${ANDROID_API}/${ANDROID_NDK_SYSROOT_DIR}/usr/include")

 set(ANDROID_NDK_GLOBAL_CFLAGS "-fPIC -fno-strict-aliasing -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes")
 set(ANDROID_NDK_CXX_WARN_FLAGS "-Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual")
@@ -168,12 +169,12 @@
 set(ANDROID_LD_FLAGS "-shared --sysroot=${ANDROID_NDK_SYSROOT} -L${ANDROID_NDK_STL_LIBRARYPATH} -no-canonical-prefixes ${ANDROID_NDK_ARCH_LDFLAGS} -Wl,--no-warn-mismatch -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now ${FIPS_ANDROID_LINK_VERBOSE}")

 # c++ compiler flags
-set(CMAKE_CXX_FLAGS "${ANDROID_C_FLAGS} -std=c++11 ${ANDROID_NDK_STL_CXXFLAGS} ${FIPS_ANDROID_EXCEPTION_FLAGS} ${FIPS_ANDROID_RTTI_FLAGS} ${ANDROID_NDK_CXX_WARN_FLAGS}")
+set(CMAKE_CXX_FLAGS "${ANDROID_C_FLAGS} -std=c++11 ${ANDROID_NDK_STL_CXXFLAGS} ${ANDROID_NDK_INCLUDES} ${FIPS_ANDROID_EXCEPTION_FLAGS} ${FIPS_ANDROID_RTTI_FLAGS} ${ANDROID_NDK_CXX_WARN_FLAGS}")
 set(CMAKE_CXX_FLAGS_RELEASE "-Os -fomit-frame-pointer -funswitch-loops -finline-limit=300 -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -fno-omit-frame-pointer -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")

 # c compiler flags
-set(CMAKE_C_FLAGS "${ANDROID_C_FLAGS} ${ANDROID_NDK_C_WARN_FLAGS}")
+set(CMAKE_C_FLAGS "${ANDROID_C_FLAGS} ${ANDROID_NDK_C_WARN_FLAGS} ${ANDROID_NDK_INCLUDES}")
 set(CMAKE_C_FLAGS_RELEASE "-Os -fomit-frame-pointer -funswitch-loops -finline-limit=64 -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "-O0 -fno-omit-frame-pointer -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")