Disabled no-rtti flag by default

Disabled no-rtti flag by default

--- cmake/compile_flags.cmake
+++ cmake/compile_flags.cmake
@@ -20,7 +20,8 @@

 # Set compiler flags:
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -pedantic -pedantic-errors -fno-rtti")
+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -pedantic -pedantic-errors")

 # TODO: Make this warning work too!
 #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion")
@@ -76,8 +77,8 @@
 # ---------------------------------
 # Debug mode flags
 # ---------------------------------
-set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb3 -D _DEBUG -D DEBUG")
-set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-all")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb3 -D _DEBUG -D DEBUG")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-all")

 if (WITH_FRAME_POINTER)
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")


userspace: Remove -l rt (for now)

userspace: Remove -l rt (for now)

--- cmake/linux.service.cmake
+++ cmake/linux.service.cmake
@@ -150,7 +150,7 @@
 endif()
 target_link_libraries(service ${PLUGINS_LIST})
 target_link_libraries(service includeos linuxrt microlb liveupdate
-                      includeos linuxrt http_parser rt)
+                      includeos linuxrt http_parser)
 target_link_libraries(service ${EXTRA_LIBS})
 if (CUSTOM_BOTAN)
   target_link_libraries(service ${BOTAN_LIBS})


Update to a pyfftw built against python 3.6

--- versions.cmake
+++ versions.cmake
@@ -62,8 +62,8 @@

 if (WIN32)
   add_revision(pyfftw
-    URL "http://www.tomviz.org/files/pyFFTW-0.9.2-win64.zip"
-    URL_MD5 "")
+    URL "http://www.tomviz.org/files/pyfftw-0.10.4-win64.zip"
+    URL_MD5 "c9c60d3f28df1c9d545152734350f9ba")
 else()
   add_revision(pyfftw
     URL "http://www.paraview.org/files/dependencies/pyFFTW-0.9.2.tar.gz"


Add ITK binary tarball for linux

Add ITK binary tarball for linux

--- versions.cmake
+++ versions.cmake
@@ -139,4 +139,8 @@
   add_revision(itk
     URL "http://www.tomviz.org/files/itk-4.8.0-macosx10.8.tar.gz"
     URL_MD5 "904a0e8c7ebe986deddceb4984bf455d")
+elseif(UNIX)
+  add_revision(itk
+    URL "http://www.tomviz.org/files/itk-4.8.1-linux-64bit.tar.gz"
+    URL_MD5 "e0ceef7aee666704036c7ecc1f532015")
 endif()


Eigen pulled from web only if cmake and hg versions available

--- modules/LookUpEigen3.cmake
+++ modules/LookUpEigen3.cmake
@@ -16,35 +16,19 @@
 if(NOT Eigen3_TIMEOUT)
     set(Eigen3_TIMEOUT 10)
 endif()
-# Older versions of cmake do not work with hg repos
-if(CMAKE_VERSION VERSION_LESS 2.8.10 AND NOT ${Eigen3_URL})
-    message(WARNING "CMake version too old to use Hg repo."
-        "Will attempt to download Eigen 3 tarball.")
-    set(nohg)
-elseif(NOT ${Eigen3_URL})
-    find_package(Hg)
-    if(NOT Hg)
-        message(WARNING "Could not find mercurial."
-            "Will attempt to download Eigen 3 tarball.")
-       set(nohg)
-    endif()
-endif()
-if(nohg)
-    set(Eigen3_URL http://bitbucket.org/eigen/eigen/get/3.2.1.tar.gz)
-    set(Eigen3_MD5 ece1dbf64a49753218ce951624f4c487)
-endif()

 if(NOT "${Eigen3_URL}" STREQUAL "")
     if("${Eigen3_MD5}" STREQUAL "")
         message(FATAL_ERROR "Downloading from an URL requires an MD5 hash")
     endif()
     set(arguments URL "${Eigen3_URL}" URL_MD5 ${Eigen3_MD5})
-else()
-    set(arguments
-        HG_REPOSITORY "${Eigen3_HG_REPOSITORY}")
+elseif("${CMAKE_VERSION}" VERSION_GREATER 2.8.9 )
+    set(arguments HG_REPOSITORY "${Eigen3_HG_REPOSITORY}")
     if(NOT Eigen3_HG_TAG)
         list(APPEND arguments HG_TAG ${Eigen3_HG_TAG})
     endif()
+else()
+    message(FATAL_ERROR "Requires cmake >= 2.8.10 to download Eigen from mercurial")
 endif()
 list(APPEND arguments TIMEOUT ${Eigen3_TIMEOUT})


start 3.1.3

start 3.1.3

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -33,6 +33,9 @@
 cmake_minimum_required(VERSION 2.8.12)
 cmake_policy(POP)

+set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+set (Mathematica_CMAKE_MODULE_VERSION "3.1.3")
+
 # activate select policies
 if (POLICY CMP0026)
 	# disallow use of the LOCATION target property
@@ -99,9 +102,6 @@
 include(CMakeParseArguments)
 include(FindPackageHandleStandardArgs)
 include(CMakeFindFrameworks)
-
-set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set (Mathematica_CMAKE_MODULE_VERSION "3.1.2")

 # internal function to convert Windows path to Cygwin workable CMake path
 # E.g., "C:\Program Files" is converted to "/cygdrive/c/Program Files"


Force stack realignment on MinGW with SSE. Closes #954.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -613,6 +613,11 @@
             # Reduce GCC optimization level from -O3 to -O2 for stability in RELEASE build configuration
             set (CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
             set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
+            # SSE requires force-aligned stack
+            if (URHO3D_SSE)
+                set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign")
+                set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign")
+            endif ()
         else ()
             # Not Android and not Emscripten and not MinGW derivative
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")     # This will emit '-DREENTRANT' to compiler and '-lpthread' to linker on Linux and Mac OSX platform


Compile python scripts explicitly instead of compiling an entire folder

Given the fact multiple compile targets can be associated with the same
destination directory, compiling each script explicitly will prevent two
compile targets build in parallel from compiling the same folder.

--- CMake/ctkMacroCompilePythonScript.cmake
+++ CMake/ctkMacroCompilePythonScript.cmake
@@ -59,28 +59,21 @@
     endif()

     set(src "${MY_SOURCE_DIR}/${file}")
-    set(tgt "${MY_DESTINATION_DIR}/${file}")
+    set(tgt_file ${file})
     if(IS_ABSOLUTE ${file})
       set(src ${file})
       file(RELATIVE_PATH tgt_file ${CMAKE_CURRENT_BINARY_DIR} ${file})
-      set(tgt "${MY_DESTINATION_DIR}/${tgt_file}")
-    endif()
-
+    endif()
     set_property(GLOBAL APPEND PROPERTY
-      _CTK_${target}_PYTHON_SCRIPTS "${src}|${tgt}")
+      _CTK_${target}_PYTHON_SCRIPTS "${src}|${tgt_file}|${MY_DESTINATION_DIR}")
   endforeach()
-
-
-  set_property(GLOBAL APPEND PROPERTY
-      _CTK_${target}_PYTHON_DESTINATION_DIRS "${MY_DESTINATION_DIR}")

   if(DEFINED MY_RESOURCES)
     set(resource_input_files)
     foreach(file ${MY_RESOURCES})
       set(src "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
-      set(tgt "${MY_DESTINATION_DIR}/${file}")
       set_property(GLOBAL APPEND PROPERTY
-      _CTK_${target}_PYTHON_RESOURCES "${src}|${tgt}")
+      _CTK_${target}_PYTHON_RESOURCES "${src}|${file}|${MY_DESTINATION_DIR}")
     endforeach()
   endif()

@@ -111,12 +104,13 @@
     foreach(entry IN LISTS entries)
       string(REPLACE "|" ";" tuple "${entry}")
       list(GET tuple 0 src)
-      list(GET tuple 1 tgt)
-      get_filename_component(file ${src} NAME)
+      list(GET tuple 1 tgt_file)
+      list(GET tuple 2 dest_dir)
+      set(tgt ${dest_dir}/${tgt_file})
       add_custom_command(DEPENDS ${src}
                          COMMAND ${CMAKE_COMMAND} -E copy ${src} ${tgt}
                          OUTPUT ${tgt}
-                         COMMENT "Copying python ${type}: ${file}")
+                         COMMENT "Copying python ${type}: ${tgt_file}")
       list(APPEND input_files ${src})
       list(APPEND copied_files ${tgt})
     endforeach()
@@ -136,15 +130,19 @@
   if(NOT TARGET ${target_name})
     # Byte compile the Python files.
     set(compile_all_script "${CMAKE_CURRENT_BINARY_DIR}/compile_${target}_python_scripts.py")
-
+
     set(_compileall_code )
-    get_property(destination_dirs GLOBAL PROPERTY _CTK_${target}_PYTHON_DESTINATION_DIRS)
-    list(REMOVE_DUPLICATES destination_dirs)
-    foreach(destination_dir IN LISTS destination_dirs)
-      set(_compileall_code "${_compileall_code}\ncompileall.compile_dir('${destination_dir}')")
+    get_property(entries GLOBAL PROPERTY _CTK_${target}_PYTHON_SCRIPTS)
+    list(REMOVE_DUPLICATES entries)
+    foreach(entry IN LISTS entries)
+      string(REPLACE "|" ";" tuple "${entry}")
+      list(GET tuple 1 tgt_file)
+      list(GET tuple 2 dest_dir)
+      set(tgt ${dest_dir}/${tgt_file})
+      set(_compileall_code "${_compileall_code}\nctk_compile_file('${tgt}', force=1)")
     endforeach()

-    message(STATUS "Generate [${target_name}] compileall script: ${compile_all_script}")
+    message(STATUS "Generate [${target_name}] py_compile script: ${compile_all_script}")
     # Generate compile_${target}_python_scripts.py
     file(WRITE ${compile_all_script} "
 #
@@ -153,7 +151,72 @@

 # Based on paraview/VTK/Wrapping/Python/compile_all_vtk.py.in

-import compileall
+import os
+import sys
+import py_compile
+import struct
+import imp
+
+#
+# Copied function 'compileall.compile_file' introduced in python 2.7 so that code compiled
+# using python 2.6 works.
+#
+# This version of the function has been copied from:
+#   https://github.com/jonashaag/cpython/blob/ce5e5df0c9d8098da05dee26e12ffe2aa331889e/Lib/compileall.py#L61-111
+#
+def ctk_compile_file(fullname, ddir=None, force=0, rx=None, quiet=0):
+    \"\"\"Byte-compile one file.
+
+    Arguments (only fullname is required):
+
+    fullname:  the file to byte-compile
+    ddir:      if given, the directory name compiled in to the
+               byte-code file.
+    force:     if 1, force compilation, even if timestamps are up-to-date
+    quiet:     if 1, be quiet during compilation
+    \"\"\"
+    success = 1
+    name = os.path.basename(fullname)
+    if ddir is not None:
+        dfile = os.path.join(ddir, name)
+    else:
+        dfile = None
+    if rx is not None:
+        mo = rx.search(fullname)
+        if mo:
+            return success
+    if os.path.isfile(fullname):
+        head, tail = name[:-3], name[-3:]
+        if tail == '.py':
+            if not force:
+                try:
+                    mtime = int(os.stat(fullname).st_mtime)
+                    expect = struct.pack('<4sl', imp.get_magic(), mtime)
+                    cfile = fullname + (__debug__ and 'c' or 'o')
+                    with open(cfile, 'rb') as chandle:
+                        actual = chandle.read(8)
+                    if expect == actual:
+                        return success
+                except IOError:
+                    pass
+            if not quiet:
+                print 'Compiling', fullname, '...'
+            try:
+                ok = py_compile.compile(fullname, None, dfile, True)
+            except py_compile.PyCompileError,err:
+                if quiet:
+                    print 'Compiling', fullname, '...'
+                print err.msg
+                success = 0
+            except IOError, e:
+                print "Sorry", e
+                success = 0
+            else:
+                if ok == 0:
+                    success = 0
+    return success
+
+
 @_compileall_code@
 file = open('@CMAKE_CURRENT_BINARY_DIR@/python_compile_@target@_complete', 'w')
 file.write('Done')


Dissable tests for android by default.

Dissable tests for android by default.

--- android/CMakeCache.android.initial.cmake
+++ android/CMakeCache.android.initial.cmake
@@ -25,7 +25,7 @@
 set(OPENCV_BUILD_3RDPARTY_LIBS ON CACHE BOOL "" )

 #Build tests
-#set(BUILD_TESTS OFF CACHE BOOL "" )
+set(BUILD_TESTS OFF CACHE BOOL "" )

 #Choose the type of build, options are: None Debug Release RelWithDebInfo
 # MinSizeRel.


Configure Mac OS X Hydrax build to not use sagase, and build against custom-built Hydrax with ogre-safe-nocrashes.

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -167,7 +167,7 @@
 endmacro (configure_skyx)

 macro (configure_hydrax)
-	if (NOT MSVC)
+	if (NOT MSVC AND NOT APPLE)
 		# Prioritize env variable HYDRAX_HOME to be searched first
 		# to allow custom hydrax builds agains a custom ogre (potentially from OGRE_HOME)
 		sagase_configure_package (HYDRAX
@@ -196,11 +196,13 @@

     include_directories(${HYDRAX_HOME}/include)
     link_directories(${HYDRAX_HOME}/lib)
+	else()
+		include_directories(${ENV_TUNDRA_DEP_PATH}/include/Hydrax)
 	endif()
 endmacro()

 macro(link_package_hydrax)
-	if (MSVC) # TODO linkage settings for using Hydrax from deps for other platforms.
+	if (MSVC OR APPLE) # TODO linkage settings for using Hydrax from deps for other platforms.
 		target_link_libraries(${TARGET_NAME} optimized Hydrax debug Hydraxd)
 	endif()
 endmacro()


Fix ToolsetVer regex

Fix ToolsetVer regex

--- cmake/GetBoostLibB2Args.cmake
+++ cmake/GetBoostLibB2Args.cmake
@@ -71,7 +71,7 @@
         else()
             list(APPEND b2Args cxxflags=-fPIC cxxflags=-std=c++11)
             # Need to configure the toolset based on whatever version CMAKE_CXX_COMPILER is
-            string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]" ToolsetVer "${CMAKE_CXX_COMPILER_VERSION}")
+            string(REGEX MATCH "[0-9]+\\.[0-9]+(?:\\.[0-9]+)?" ToolsetVer "${CMAKE_CXX_COMPILER_VERSION}")
             if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
                 list(APPEND b2Args toolset=clang-${ToolsetVer})
                 if(HAVE_LIBC++)
@@ -84,4 +84,4 @@
     endif()

     set(b2Args "${b2Args}" PARENT_SCOPE)
-endfunction(get_boots_lib_b2_args)+endfunction(get_boots_lib_b2_args)


Updated onnxruntime dependency package

Updated onnxruntime dependency package

--- cmake/ModuleONNXRuntime.cmake
+++ cmake/ModuleONNXRuntime.cmake
@@ -2,6 +2,6 @@
     message("-- Enabling Microsoft ONNX runtime inference engine module")
     fast_download_dependency(onnxruntime
           1.13.1
-          ca1a7890391a641a283eb0de18280094f275a9ce77c39745b31484d70107fc47
+          07ab6a1e875fbd336fd694cf71728535d935bf1a87c80cb1307e04758bce87d9
     )
 endif()


Correction to paths to find cuDNN

Correction to paths to find cuDNN

--- cmake/Modules/FindCuDNN.cmake
+++ cmake/Modules/FindCuDNN.cmake
@@ -19,7 +19,7 @@

 find_library(CUDNN_LIBRARY cudnn
     PATHS ${CUDNN_ROOT_DIR}
-    PATH_SUFFIXES lib cuda/lib)
+    PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64)

 find_package_handle_standard_args(CUDNN DEFAULT_MSG CUDNN_INCLUDE_DIR CUDNN_LIBRARY)


build: see if env GETST_ROOT exists

build: see if env GETST_ROOT exists

--- cmake/Modules/FindGTest.cmake
+++ cmake/Modules/FindGTest.cmake
@@ -4,6 +4,12 @@
 # ~~~

 if (NOT GOOGLETEST_ROOT)
+	# if GTEST_ROOT is not set but ENV GTEST_ROOT exists use the ENV var
+	if (GTEST_ROOT STREQUAL "")
+		if (NOT ($ENV{GTEST_ROOT} STREQUAL ""))
+			set (GTEST_ROOT "$ENV{GTEST_ROOT}")
+		endif ()
+	endif ()
 	if (NOT (GTEST_ROOT STREQUAL ""))
 		if (EXISTS ${GTEST_ROOT}/CMakeLists.txt)
 			set (GOOGLETEST_ROOT "${GTEST_ROOT}" CACHE INTERNAL "Path to a local copy of Google Test" FORCE)


build: update poco version to 1.9.4

build: update poco version to 1.9.4

--- cmake/SetupDependencies.cmake
+++ cmake/SetupDependencies.cmake
@@ -34,7 +34,7 @@
 CPMAddPackage(
     NAME poco
     GITHUB_REPOSITORY pocoproject/poco
-    GIT_TAG "poco-1.9.0-release"
+    GIT_TAG "poco-1.9.4-release"
     OPTIONS
         "ENABLE_XML FALSE"
         "ENABLE_ENCODINGS FALSE"


Disable many weird libcurl features when bundling

--- cmake/modules/buildCurl.cmake
+++ cmake/modules/buildCurl.cmake
@@ -10,7 +10,7 @@
       SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/curl"
       PREFIX "${CMAKE_BINARY_DIR}/curl"
       BUILD_IN_SOURCE 1
-      CONFIGURE_COMMAND bash -c "autoreconf -i && ./configure  --prefix=${CMAKE_CURRENT_BINARY_DIR}/curl --disable-ldap --disable-ldaps ${SECURE_TRANSPORT_FLAGS} && ${CMAKE_SOURCE_DIR}/patch-curl-clock-gettime.sh"
+      CONFIGURE_COMMAND bash -c "autoreconf -i && ./configure  --prefix=${CMAKE_CURRENT_BINARY_DIR}/curl --disable-ftp --disable-ldap --disable-ldaps --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --without-libidn2 ${SECURE_TRANSPORT_FLAGS} && ${CMAKE_SOURCE_DIR}/patch-curl-clock-gettime.sh"
       BUILD_COMMAND ${MAKE}
   )


[numerics] fix compilation of numerics in C++

--- cmake/swig_python_tools.cmake
+++ cmake/swig_python_tools.cmake
@@ -95,10 +95,10 @@
     set(${COMPONENT}_SWIG_DEFS "-I${_dir};${${COMPONENT}_SWIG_DEFS}")
   endforeach()

-  IF(WITH_CXX AND NOT ${COMPONENT} MATCHES "numerics")
+  IF(WITH_CXX AND (BUILD_AS_CPP OR NOT ${COMPONENT} MATCHES "numerics"))
     set_source_files_properties(${swig_file}
       PROPERTIES SWIG_FLAGS "${${COMPONENT}_SWIG_DEFS}" CPLUSPLUS ON)
-  ENDIF(WITH_CXX AND NOT ${COMPONENT} MATCHES "numerics")
+  ENDIF(WITH_CXX AND (BUILD_AS_CPP OR NOT ${COMPONENT} MATCHES "numerics"))

   # --- build swig module ---
   swig_add_module(${_name} python ${swig_file})


Backup.

Backup.

--- cmake_modules/LPSCommon.cmake
+++ cmake_modules/LPSCommon.cmake
@@ -826,7 +826,6 @@
             file(GLOB files "${VTK_LIB_DIR}/${name}.lib")
             set(VTK_INST_LIBS ${VTK_INST_LIBS} ${files})
         endforeach()
-        message(STATUS "VTK INSTALL LIBS ARE: ${VTK_IMPORT_LIBS}")
         install(FILES ${VTK_INST_LIBS} DESTINATION lib/vtk/
         PERMISSIONS
         OWNER_WRITE OWNER_READ OWNER_EXECUTE


Added TinyCC support.

Added TinyCC support.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -35,6 +35,10 @@
         elseif(CC STREQUAL "icc")
             set(CC_NAME "icc")
             exec_program($ENV{CC} ARGS -dumpversion OUTPUT_VARIABLE CC_VERSION)
+        elseif(CC STREQUAL "tcc")
+            set(CC_NAME "tcc")
+            exec_program($ENV{CC} ARGS -v OUTPUT_VARIABLE CC_VERSION)
+            string(REGEX REPLACE ".*tcc version ([0-9]+\\.[0-9]+).*" "\\1" CC_VERSION ${CC_VERSION})
         endif()
         string(SUBSTRING "$ENV{CC}" 0 5 CC)
         if(CC STREQUAL "clang")


BUG: Modify the inclusion of executables during superbuild

--- SuperBuild/External_DTIProcess.cmake
+++ SuperBuild/External_DTIProcess.cmake
@@ -104,7 +104,7 @@
     find_package(${extProjName} ${${extProjName}_REQUIRED_VERSION} REQUIRED
       HINTS ${DTIProcess_BINARY_DIR}/DTIProcess-install/lib/CMake/DTIProcess)
     message("USING the system ${extProjName}, set ${extProjName}_DIR=${${extProjName}_DIR}")
-    include( ${DTIProcess_DIR}/ImportDTIProcessExtensionExecutables.cmake )
+    include( ${DTIProcess_BINARY_DIR}/ImportDTIProcessExtensionExecutables.cmake )
   endif()
   # The project is provided using ${extProjName}_DIR, nevertheless since other
   # project may depend on ${extProjName}, let's add an 'empty' one


Enabling all warnings on GCC/Clang and enabled warnings as errors. Fixes #115.

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -37,5 +37,8 @@
 				target_compile_options(${_project_name} PRIVATE "-msse4.1")
 			endif()
 		endif()
+
+		target_compile_options(${_project_name} PRIVATE -Wall)				# Enable all warnings
+		target_compile_options(${_project_name} PRIVATE -Werror)			# Treat warnings as errors
 	endif()
 endmacro()


Removed obsolete options.

Removed obsolete options.

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -108,7 +108,6 @@
 option(WITH_DEBUG_NLA "Print authentication related debug messages." ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_NTLM "Print NTLM debug messages" ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_TSG "Print Terminal Server Gateway debug messages" ${DEFAULT_DEBUG_OPTION})
-option(WITH_DEBUG_ORDERS "Print drawing orders debug messages" ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_RAIL "Print RemoteApp debug messages" ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_RDP "Print RDP debug messages" ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_REDIR "Redirection debug messages" ${DEFAULT_DEBUG_OPTION})


fix Qt library linking

fix Qt library linking

--- cmake/Depdendencies.cmake
+++ cmake/Depdendencies.cmake
@@ -35,18 +35,23 @@
         set_target_properties(Qt5::moc PROPERTIES IMPORTED_LOCATION "${PROJECT_BINARY_DIR}/bin/moc${CMAKE_EXECUTABLE_SUFFIX}")
         #set(Qt5Core_DIR ${PROJECT_BINARY_DIR}/lib/cmake/Qt5Core/)
         find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL Multimedia MultimediaWidgets PATHS ${PROJECT_SOURCE_DIR}/cmake/) # Need Qt5Core for
+        list(APPEND LIBRARIES ${Qt5Core_LIBRARY})
+        list(APPEND LIBRARIES ${Qt5Gui_LIBRARY})
+        list(APPEND LIBRARIES ${Qt5Widgets_LIBRARY})
+        list(APPEND LIBRARIES ${Qt5OpenGL_LIBRARY})
+        list(APPEND LIBRARIES ${Qt5Multimedia_LIBRARY})
+        list(APPEND LIBRARIES ${Qt5MultimediaWidgets_LIBRARY})
     else(FAST_BUILD_QT5)
         # Use system Qt
         find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL Multimedia MultimediaWidgets )
-
+        list(APPEND LIBRARIES Qt5::Core)
+        list(APPEND LIBRARIES Qt5::Gui)
+        list(APPEND LIBRARIES Qt5::Widgets)
+        list(APPEND LIBRARIES Qt5::OpenGL)
+        list(APPEND LIBRARIES Qt5::Multimedia)
+        list(APPEND LIBRARIES Qt5::MultimediaWidgets)
     endif(FAST_BUILD_QT5)

-    list(APPEND LIBRARIES Qt5::Core)
-    list(APPEND LIBRARIES Qt5::Gui)
-    list(APPEND LIBRARIES Qt5::Widgets)
-    list(APPEND LIBRARIES Qt5::OpenGL)
-    list(APPEND LIBRARIES Qt5::Multimedia)
-    list(APPEND LIBRARIES Qt5::MultimediaWidgets)
     list(APPEND FAST_INCLUDE_DIRS ${Qt5Widgets_INCLUDE_DIRS})
     list(APPEND FAST_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS})
     list(APPEND FAST_INCLUDE_DIRS ${Qt5Gui_INCLUDE_DIRS})


Added header in DetectOptions for profiling

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -188,8 +188,13 @@
   set(ADIOS2_HAVE_SysVShMem OFF)
 endif()

-if(ADIOS2_USE_Profiling STREQUAL AUTO AND SHARED_LIBS_SUPPORTED)
-  set(ADIOS2_HAVE_Profiling ON)
+#Profiling
+if(ADIOS2_USE_Profiling STREQUAL AUTO)
+  if(BUILD_SHARED_LIBS)
+    set(ADIOS2_HAVE_Profiling ON)
+  else()
+    set(ADIOS2_HAVE_Profiling OFF)
+  endif()
 elseif(ADIOS2_USE_Profiling)
   set(ADIOS2_HAVE_Profiling ON)
 endif()


Update find the TmxParser

Update find the TmxParser

--- cmake/FindTmxParser.cmake
+++ cmake/FindTmxParser.cmake
@@ -1,35 +1,22 @@
-#
-# This module will look for Tmxparser (https://github.com/andrewrk/tmxparser)
-# it will define the following values
-#
-# TMXPARSER_INCLUDE_DIR  = where Tmx.h can be found
-# TMXPARSER_LIBRARY      = the library to link against (Tmxparser)
-#
+# TMXPARSER_INCLUDE_DIR
+# TMXPARSER_LIBRARY
+# TMXPARSER_FOUND

-SET(TRIAL_INCLUDE_PATHS Tmx.h
-     HINTS $ENV{TMXPARSER_HOME}
-     PATH_SUFFIXES include include/tmxparser
-     PATHS
-     ~/Library/Frameworks
-     /Library/Frameworks
-     /usr/local
-     /usr
-  )
+find_path(TMXPARSER_INCLUDE_DIR NAMES tmxparser/Tmx.h
+        DOC "The tmxparser include directory"
+)

-SET(TRIAL_LIBRARY_PATHS
-   HINTS $ENV{TMXPARSER_HOME}
-   PATH_SUFFIXES lib64 lib
-   PATHS
-   ~/Library/Frameworks
-   /Library/Frameworks
-   /usr/local
-   /usr
-  )
+find_library(TMXPARSER_LIBRARY NAMES tmxparser
+        DOC "The tmxparser library"
+)

-FIND_PATH(TMXPARSER_INCLUDE_DIR Tmx.h ${TRIAL_INCLUDE_PATHS})
-FIND_LIBRARY(TMXPARSER_LIBRARY tmx-parser ${TRIAL_LIBRARY_PATHS})
+if(TMXPARSER_LIBRARY)
+    set(TMXPARSER_FOUND TRUE)
+else()
+    set(TMXPARSER_FOUND FALSE)
+endif()

-MARK_AS_ADVANCED(
-    TMXPARSER_INCLUDE_DIR
-    TMXPARSER_LIBRARY
-)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(TMXPARSER DEFAULT_MSG TMXPARSER_LIBRARY TMXPARSER_INCLUDE_DIR)
+
+mark_as_advanced(TMXPARSER_INCLUDE_DIR TMXPARSER_LIBRARY)


删除cmake log

删除cmake log

--- cmake/FindZLTOOLKIT.cmake
+++ cmake/FindZLTOOLKIT.cmake
@@ -3,8 +3,6 @@
   PATHS
   ${PROJECT_SOURCE_DIR}/../ZLToolKit/src
   $ENV{HOME}/ZLToolKit/include)
-
-message(STATUS "${ZLTOOLKIT_INCLUDE_DIR}")

 find_library(ZLTOOLKIT_LIBRARY
   NAMES ZLToolKit
@@ -12,8 +10,6 @@
   ${PROJECT_SOURCE_DIR}/../ZLToolKit/build/lib
   $ENV{HOME}/ZLToolKit/lib)

-message(STATUS "${ZLTOOLKIT_LIBRARY}")
-
 set(ZLTOOLKIT_LIBRARIES ${ZLTOOLKIT_LIBRARY})
 set(ZLTOOLKIT_INCLUDE_DIRS ${ZLTOOLKIT_INCLUDE_DIR})


Minor update.

Minor update.

--- cmake/LinkLibraries.cmake
+++ cmake/LinkLibraries.cmake
@@ -11,7 +11,7 @@
   #${CMAKE_CURRENT_LIST_DIR}/../shader
   ${LIBRARY_ROOT_PATH}/ann-1.1.2/include
   ${LIBRARY_ROOT_PATH}/gflags/build/include
-  ${LIBRARY_ROOT_PATH}/eigen-3.2.7
+  ${LIBRARY_ROOT_PATH}/eigen
   ${LIBRARY_ROOT_PATH}/TRW_S-v1.3
   ${LIBRARY_ROOT_PATH}/wingsit_QP
   #${LIBRARY_ROOT_PATH}/ceres-solver-1.10.0/config


add DCINN_GIT_TAG cmake flag to set cinn version (#44868)

--- cmake/external/cinn.cmake
+++ cmake/external/cinn.cmake
@@ -16,6 +16,12 @@
   return()
 endif()

+if(NOT CINN_GIT_TAG)
+  set(CINN_GIT_TAG release/v0.2)
+endif()
+
+message(STATUS "CINN version: " ${CINN_GIT_TAG})
+
 # TODO(zhhsplendid): CINN has lots of warnings during early development.
 # They will be treated as errors under paddle. We set no-error now and we will
 # clean the code in the future.
@@ -26,7 +32,6 @@
 ######################################
 include(ExternalProject)
 set(CINN_PREFIX_DIR ${THIRD_PARTY_PATH}/CINN)
-set(CINN_GIT_TAG release/v0.2)
 set(CINN_OPTIONAL_ARGS
     -DPY_VERSION=${PY_VERSION}
     -DWITH_CUDA=${WITH_GPU}


Fix bug, now only add includes to tests instead of all targets

Fixes bug that modules have access to include directories of modules
they have not added as dependencies.
Previous behaviour was that if tests existed in a module,
the "test include-paths" were added with "INCLUDE_DIRECTORIES"
which adds them to general includes paths and this way to all targets.
By using set_target_properties, the test include directories are only
added to the test targets.

Change-Id: I291059bd5a91a04de90102b0d257f4d538a6a160

--- cmake/internal/doit.cmake
+++ cmake/internal/doit.cmake
@@ -75,9 +75,8 @@
 					ENDIF()

 					LINK_DIRECTORIES(${GoogleTest_LIBRARIES_DIR} ${GoogleMock_LIBRARIES_DIR} ${external_package_link_directories})
-					INCLUDE_DIRECTORIES(${intern_include_path} ${include_dirs} ${test_path})
-					INCLUDE_DIRECTORIES(SYSTEM ${GoogleTest_INCLUDE_DIRS} ${GoogleMock_INCLUDE_DIRS})
 					ADD_EXECUTABLE(${CURRENT_MODULE_NAME}Test ${${CURRENT_MODULE_NAME}_TEST_FILES} ${${CURRENT_MODULE_NAME}_TEST_MAIN})
+					SET_TARGET_PROPERTIES(${CURRENT_MODULE_NAME}Test PROPERTIES INCLUDE_DIRECTORIES "${intern_include_path};${include_dirs};${test_path};${GoogleTest_INCLUDE_DIRS};${GoogleMock_INCLUDE_DIRS}")
 					INTERNAL_ADD_FLAGS_TO_TEST_TARGET()

 					MESSAGE(STATUS "${CURRENT_MODULE_NAME} contains unit tests, building ${CURRENT_MODULE_NAME}Test")


build: enable FLB_PARSER on Windows (#1138)

We have migrated flb_parser to Windows on 1ace90224, so this patch
enables the build option by default on Windows.

Signed-off-by: Fujimoto Seiji <ef879192bb1e41d519c82cf76440dc8e9a530806@clear-code.com>

--- cmake/windows-setup.cmake
+++ cmake/windows-setup.cmake
@@ -7,7 +7,7 @@
 set(FLB_BACKTRACE              No)
 set(FLB_LUAJIT                Yes)
 set(FLB_EXAMPLES               No)
-set(FLB_PARSER                 No)
+set(FLB_PARSER                Yes)

 # Windows does not support strptime(3)
 set(FLB_SYSTEM_STRPTIME        No)


Update cotire module to 1.8.0

Update cotire module to 1.8.0

--- cmakemodules/cotire.cmake
+++ cmakemodules/cotire.cmake
@@ -43,7 +43,7 @@
 endif()

 set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
-set (COTIRE_CMAKE_MODULE_VERSION "1.7.10")
+set (COTIRE_CMAKE_MODULE_VERSION "1.8.0")

 # activate select policies
 if (POLICY CMP0025)
@@ -239,7 +239,13 @@
 				# add to excluded sources, if file has custom compile flags
 				list (APPEND _excludedSourceFiles "${_sourceFile}")
 			else()
-				list (APPEND _sourceFiles "${_sourceFile}")
+				get_source_file_property(_sourceCompileOptions "${_sourceFile}" COMPILE_OPTIONS)
+				if (_sourceCompileOptions)
+					# add to excluded sources, if file has list of custom compile options
+					list (APPEND _excludedSourceFiles "${_sourceFile}")
+				else()
+					list (APPEND _sourceFiles "${_sourceFile}")
+				endif()
 			endif()
 		endif()
 	endforeach()
@@ -721,7 +727,7 @@
 		endif()
 	endforeach()
 	# parse additional compile definitions from target compile flags
-	# and don't look at directory compile definitions, which we already handled
+	# and do not look at directory compile definitions, which we already handled
 	set (_targetFlags "")
 	cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
 	cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags})
@@ -889,6 +895,9 @@
 	if (NOT _compilerArg1)
 		set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1})
 	endif()
+	if (WIN32)
+		file (TO_NATIVE_PATH "${_compilerExe}" _compilerExe)
+	endif()
 	string (STRIP "${_compilerArg1}" _compilerArg1)
 	if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
 		# compiler launcher is only supported for Makefile and Ninja
@@ -1083,12 +1092,11 @@

 macro (cotire_parse_line _line _headerFileVar _headerDepthVar)
 	if (MSVC)
-		# cl.exe /showIncludes output looks different depending on the language pack used, e.g.:
+		# cl.exe /showIncludes produces different output, depending on the language pack used, e.g.:
 		# English: "Note: including file:   C:\directory\file"
 		# German: "Hinweis: Einlesen der Datei:   C:\directory\file"
 		# We use a very general regular expression, relying on the presence of the : characters
 		if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$")
-			# Visual Studio compiler output
 			string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar})
 			get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE)
 		else()
@@ -1246,11 +1254,19 @@
 		set (${_includesVar} "" PARENT_SCOPE)
 		return()
 	endif()
-	list (APPEND _cmd ${_existingSourceFiles})
+	# add source files to be scanned
+	if (WIN32)
+		foreach (_sourceFile ${_existingSourceFiles})
+			file (TO_NATIVE_PATH "${_sourceFile}" _sourceFileNative)
+			list (APPEND _cmd "${_sourceFileNative}")
+		endforeach()
+	else()
+		list (APPEND _cmd ${_existingSourceFiles})
+	endif()
 	if (COTIRE_VERBOSE)
 		message (STATUS "execute_process: ${_cmd}")
 	endif()
-	if (_option_COMPILER_ID MATCHES "MSVC")
+	if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC")
 		# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
 		unset (ENV{VS_UNICODE_OUTPUT})
 	endif()
@@ -1486,11 +1502,16 @@
 	if (_unparsedLines)
 		if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders)
 			list (LENGTH _unparsedLines _skippedLineCount)
-			message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}")
+			if (WIN32)
+				file (TO_NATIVE_PATH "${_unparsedLinesFile}" _unparsedLinesLogPath)
+			else()
+				set (_unparsedLinesLogPath "${_unparsedLinesFile}")
+			endif()
+			message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesLogPath}")
 		endif()
 		string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}")
 	endif()
-	file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}")
+	file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}\n")
 endfunction()

 function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar)
@@ -1520,7 +1541,7 @@
 			# append to list
 			list (APPEND _flags -H -E)
 			if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0")
-				list (APPEND _flags "-fdirectives-only")
+				list (APPEND _flags -fdirectives-only)
 			endif()
 		else()
 			# return as a flag string
@@ -1530,16 +1551,36 @@
 			endif()
 		endif()
 	elseif (_compilerID MATCHES "Clang")
-		# Clang options used
-		# -H print the name of each header file used
-		# -E invoke preprocessor
-		# -fno-color-diagnostics don't prints diagnostics in color
-		if (_flags)
-			# append to list
-			list (APPEND _flags -H -E -fno-color-diagnostics)
-		else()
-			# return as a flag string
-			set (_flags "-H -E -fno-color-diagnostics")
+		if (UNIX)
+			# Clang options used
+			# -H print the name of each header file used
+			# -E invoke preprocessor
+			# -fno-color-diagnostics do not print diagnostics in color
+			# -Eonly just run preprocessor, no output
+			if (_flags)
+				# append to list
+				list (APPEND _flags -H -E -fno-color-diagnostics -Xclang -Eonly)
+			else()
+				# return as a flag string
+				set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly")
+			endif()
+		elseif (WIN32)
+			# Clang-cl.exe options used
+			# /TC treat all files named on the command line as C source files
+			# /TP treat all files named on the command line as C++ source files
+			# /EP preprocess to stdout without #line directives
+			# -H print the name of each header file used
+			# -fno-color-diagnostics do not print diagnostics in color
+			# -Eonly just run preprocessor, no output
+			set (_sourceFileTypeC "/TC")
+			set (_sourceFileTypeCXX "/TP")
+			if (_flags)
+				# append to list
+				list (APPEND _flags "${_sourceFileType${_language}}" /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly)
+			else()
+				# return as a flag string
+				set (_flags "${_sourceFileType${_language}} /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly")
+			endif()
 		endif()
 	elseif (_compilerID MATCHES "Intel")
 		if (WIN32)
@@ -1613,8 +1654,8 @@
 				set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}")
 			endif()
 		endif()
-	elseif (_compilerID MATCHES "GNU|Clang")
-		# GCC / Clang options used
+	elseif (_compilerID MATCHES "GNU")
+		# GCC options used
 		# -x specify the source language
 		# -c compile but do not link
 		# -o place output in file
@@ -1624,10 +1665,51 @@
 		set (_xLanguage_CXX "c++-header")
 		if (_flags)
 			# append to list
-			list (APPEND _flags "-x" "${_xLanguage_${_language}}" "-c" "${_prefixFile}" -o "${_pchFile}")
+			list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}")
 		else()
 			# return as a flag string
 			set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
+		endif()
+	elseif (_compilerID MATCHES "Clang")
+		if (UNIX)
+			# Clang options used
+			# -x specify the source language
+			# -c compile but do not link
+			# -o place output in file
+			# -fno-pch-timestamp disable inclusion of timestamp in precompiled headers (clang 4.0.0+)
+			set (_xLanguage_C "c-header")
+			set (_xLanguage_CXX "c++-header")
+			if (_flags)
+				# append to list
+				list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}")
+				if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0")
+					list (APPEND _flags -Xclang -fno-pch-timestamp)
+				endif()
+			else()
+				# return as a flag string
+				set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
+				if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0")
+					set (_flags "${_flags} -Xclang -fno-pch-timestamp")
+				endif()
+			endif()
+		elseif (WIN32)
+			# Clang-cl.exe options used
+			# /Yc creates a precompiled header file
+			# /Fp specifies precompiled header binary file name
+			# /FI forces inclusion of file
+			# /Zs syntax check only
+			# /TC treat all files named on the command line as C source files
+			# /TP treat all files named on the command line as C++ source files
+			set (_sourceFileTypeC "/TC")
+			set (_sourceFileTypeCXX "/TP")
+			if (_flags)
+				# append to list
+				list (APPEND _flags "${_sourceFileType${_language}}"
+						"/Yc${_prefixFile}" "/Fp${_pchFile}" "/FI${_prefixFile}" /Zs "${_hostFile}")
+			else()
+				# return as a flag string
+				set (_flags "/Yc\"${_prefixFile}\" /Fp\"${_pchFile}\" /FI\"${_prefixFile}\"")
+			endif()
 		endif()
 	elseif (_compilerID MATCHES "Intel")
 		if (WIN32)
@@ -1679,10 +1761,10 @@
 				if ("${_language}" STREQUAL "CXX")
 					list (APPEND _flags -Kc++)
 				endif()
-				list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}")
+				list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-create "${_pchName}" -fsyntax-only "${_hostFile}")
 				if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
 					if (NOT _pchSuppressMessages)
-						list (APPEND _flags "-Wpch-messages")
+						list (APPEND _flags -Wpch-messages)
 					endif()
 				endif()
 			else()
@@ -1742,23 +1824,46 @@
 		# note: ccache requires the -include flag to be used in order to process precompiled header correctly
 		if (_flags)
 			# append to list
-			list (APPEND _flags "-Winvalid-pch" "-include" "${_prefixFile}")
+			list (APPEND _flags -Winvalid-pch -include "${_prefixFile}")
 		else()
 			# return as a flag string
 			set (_flags "-Winvalid-pch -include \"${_prefixFile}\"")
 		endif()
 	elseif (_compilerID MATCHES "Clang")
-		# Clang options used
-		# -include process include file as the first line of the primary source file
-		# -include-pch include precompiled header file
-		# -Qunused-arguments don't emit warning for unused driver arguments
-		# note: ccache requires the -include flag to be used in order to process precompiled header correctly
-		if (_flags)
-			# append to list
-			list (APPEND _flags "-Qunused-arguments" "-include" "${_prefixFile}")
-		else()
-			# return as a flag string
-			set (_flags "-Qunused-arguments -include \"${_prefixFile}\"")
+		if (UNIX)
+			# Clang options used
+			# -include process include file as the first line of the primary source file
+			# note: ccache requires the -include flag to be used in order to process precompiled header correctly
+			if (_flags)
+				# append to list
+				list (APPEND _flags -include "${_prefixFile}")
+			else()
+				# return as a flag string
+				set (_flags "-include \"${_prefixFile}\"")
+			endif()
+		elseif (WIN32)
+			# Clang-cl.exe options used
+			# /Yu uses a precompiled header file during build
+			# /Fp specifies precompiled header binary file name
+			# /FI forces inclusion of file
+			if (_pchFile)
+				if (_flags)
+					# append to list
+					list (APPEND _flags "/Yu${_prefixFile}" "/Fp${_pchFile}" "/FI${_prefixFile}")
+				else()
+					# return as a flag string
+					set (_flags "/Yu\"${_prefixFile}\" /Fp\"${_pchFile}\" /FI\"${_prefixFile}\"")
+				endif()
+			else()
+				# no precompiled header, force inclusion of prefix header
+				if (_flags)
+					# append to list
+					list (APPEND _flags "/FI${_prefixFile}")
+				else()
+					# return as a flag string
+					set (_flags "/FI\"${_prefixFile}\"")
+				endif()
+			endif()
 		endif()
 	elseif (_compilerID MATCHES "Intel")
 		if (WIN32)
@@ -1808,10 +1913,10 @@
 				endif()
 				if (_flags)
 					# append to list
-					list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}")
+					list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-use "${_pchName}")
 					if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
 						if (NOT _pchSuppressMessages)
-							list (APPEND _flags "-Wpch-messages")
+							list (APPEND _flags -Wpch-messages)
 						endif()
 					endif()
 				else()
@@ -1827,7 +1932,7 @@
 				# no precompiled header, force inclusion of prefix header
 				if (_flags)
 					# append to list
-					list (APPEND _flags "-include" "${_prefixFile}")
+					list (APPEND _flags -include "${_prefixFile}")
 				else()
 					# return as a flag string
 					set (_flags "-include \"${_prefixFile}\"")
@@ -1865,13 +1970,13 @@
 	if (COTIRE_VERBOSE)
 		message (STATUS "execute_process: ${_cmd}")
 	endif()
-	if (_option_COMPILER_ID MATCHES "MSVC")
+	if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC")
 		# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
 		unset (ENV{VS_UNICODE_OUTPUT})
-	elseif (_option_COMPILER_ID MATCHES "GNU|Clang")
+	elseif (_option_COMPILER_ID MATCHES "Clang" AND _option_COMPILER_VERSION VERSION_LESS "4.0.0")
 		if (_option_COMPILER_LAUNCHER MATCHES "ccache" OR
 			_option_COMPILER_EXECUTABLE MATCHES "ccache")
-			# Newer versions of Clang and GCC seem to embed a compilation timestamp into the precompiled header binary,
+			# Newer versions of Clang embed a compilation timestamp into the precompiled header binary,
 			# which results in "file has been modified since the precompiled header was built" errors if ccache is used.
 			# We work around the problem by disabling ccache upon pre-compiling the prefix header.
 			set (ENV{CCACHE_DISABLE} "true")
@@ -1890,7 +1995,7 @@
 	set (_unsupportedCompiler
 		"Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}")
 	if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC")
-		# supported since Visual Studio C++ 6.0
+		# PCH supported since Visual Studio C++ 6.0
 		# and CMake does not support an earlier version
 		set (${_msgVar} "" PARENT_SCOPE)
 	elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU")
@@ -1901,8 +2006,16 @@
 			set (${_msgVar} "" PARENT_SCOPE)
 		endif()
 	elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
-		# all Clang versions have PCH support
-		set (${_msgVar} "" PARENT_SCOPE)
+		if (UNIX)
+			# all Unix Clang versions have PCH support
+			set (${_msgVar} "" PARENT_SCOPE)
+		elseif (WIN32)
+			# only clang-cl is supported under Windows
+			get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
+			if (NOT _compilerName MATCHES "cl$")
+				set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}. Use clang-cl instead." PARENT_SCOPE)
+			endif()
+		endif()
 	elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
 		# Intel PCH support requires version >= 8.0.0
 		if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0")
@@ -1913,19 +2026,25 @@
 	else()
 		set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE)
 	endif()
+	# check if ccache is used as a compiler launcher
 	get_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER)
-	if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR _launcher MATCHES "ccache")
+	get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" REALPATH)
+	if (_realCompilerExe MATCHES "ccache" OR _launcher MATCHES "ccache")
+		# verify that ccache configuration is compatible with precompiled headers
+		# always check environment variable CCACHE_SLOPPINESS, because earlier versions of ccache
+		# do not report the "sloppiness" setting correctly upon printing ccache configuration
 		if (DEFINED ENV{CCACHE_SLOPPINESS})
-			if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros")
+			if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR
+				NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros")
 				set (${_msgVar}
 					"ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"."
 					PARENT_SCOPE)
 			endif()
 		else()
-			if (_launcher MATCHES "ccache")
-				get_filename_component(_ccacheExe "${_launcher}" REALPATH)
+			if (_realCompilerExe MATCHES "ccache")
+				set (_ccacheExe "${_realCompilerExe}")
 			else()
-				get_filename_component(_ccacheExe "${CMAKE_${_language}_COMPILER}" REALPATH)
+				set (_ccacheExe "${_launcher}")
 			endif()
 			execute_process(
 				COMMAND "${_ccacheExe}" "--print-config"
@@ -1933,9 +2052,10 @@
 				RESULT_VARIABLE _result
 				OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE
 				ERROR_QUIET)
-			if (_result OR NOT
-				_ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR NOT
-				_ccacheConfig MATCHES "sloppiness.*=.*pch_defines")
+			if (_result)
+				set (${_msgVar} "ccache configuration cannot be determined." PARENT_SCOPE)
+			elseif (NOT _ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR
+				NOT _ccacheConfig MATCHES "sloppiness.*=.*pch_defines")
 				set (${_msgVar}
 					"ccache requires configuration setting \"sloppiness\" to be set to \"pch_defines,time_macros\"."
 					PARENT_SCOPE)
@@ -2261,8 +2381,9 @@

 function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)
 	set (_sourceFiles ${ARGN})
-	if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
-		# for Visual Studio and Intel, we attach the precompiled header compilation to the host file
+	if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
+		(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
+		# for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file
 		# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
 		if (_sourceFiles)
 			set (_flags "")
@@ -2307,8 +2428,9 @@
 endfunction()

 function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile)
-	if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
-		# for Visual Studio and Intel, we include the precompiled header in all but the host file
+	if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
+		(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
+		# for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file
 		# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation
 		set (_sourceFiles ${ARGN})
 		list (LENGTH _sourceFiles _numberOfSourceFiles)
@@ -2454,9 +2576,10 @@
 		# if this is a single-language target without any excluded files
 		if (_wholeTarget)
 			set (_language "${_languages}")
-			# for Visual Studio and Intel, precompiled header inclusion is always done on the source file level
+			# for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level
 			# see cotire_setup_pch_file_inclusion
-			if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
+			if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
+				(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
 				get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
 				if (_prefixFile)
 					get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)
@@ -2491,7 +2614,8 @@
 			set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths})
 		endif()
 		if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
-			# unity file compilation results in potentially huge object file, thus use /bigobj by default unter MSVC and Windows Intel
+			# unity file compilation results in potentially huge object file,
+			# thus use /bigobj by default unter cl.exe and Windows Intel
 			set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj")
 		endif()
 		cotire_set_cmd_to_prologue(_unityCmd)
@@ -2696,6 +2820,9 @@
 			set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build ${_excludedStr}.")
 		else()
 			set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.")
+		endif()
+		if (_disableMsg)
+			set (_targetMsg "${_targetMsg} ${_disableMsg}")
 		endif()
 	else()
 		if (_excludedStr)
@@ -2786,6 +2913,20 @@
 			set (_targetUsePCH FALSE)
 		endif()
 	endif()
+	if (_targetAddSCU)
+		# disable unity builds if automatic Qt processing is used
+		get_target_property(_targetAutoMoc ${_target} AUTOMOC)
+		get_target_property(_targetAutoUic ${_target} AUTOUIC)
+		get_target_property(_targetAutoRcc ${_target} AUTORCC)
+		if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
+			if (_disableMsg)
+				set (_disableMsg "${_disableMsg} Target uses automatic CMake Qt processing.")
+			else()
+				set (_disableMsg "Target uses automatic CMake Qt processing.")
+			endif()
+			set (_targetAddSCU FALSE)
+		endif()
+	endif()
 	set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH})
 	set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU})
 	cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles})
@@ -2813,7 +2954,11 @@
 	set (_sourceFiles ${ARGN})
 	get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
 	if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)")
-		set (_numberOfThreads "${CMAKE_MATCH_2}")
+		if (DEFINED CMAKE_MATCH_2)
+			set (_numberOfThreads "${CMAKE_MATCH_2}")
+		else()
+			set (_numberOfThreads "")
+		endif()
 		if (NOT _numberOfThreads)
 			# use all available cores
 			ProcessorCount(_numberOfThreads)
@@ -2926,8 +3071,9 @@
 		set (_dependsFiles "")
 		foreach (_language ${_languages})
 			set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE)
-			if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
-				# Visual Studio and Intel only create precompiled header as a side effect
+			if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
+				(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
+				# MSVC, Intel and clang-cl only create precompiled header as a side effect
 				list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)
 			endif()
 			cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props})
@@ -2975,6 +3121,7 @@
 			list (APPEND _unityTargetSources ${_unityFiles})
 		endif()
 	endforeach()
+	# handle object libraries which are part of the target's sources
 	get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)
 	if ("${_linkLibrariesStrategy}" MATCHES "^COPY_UNITY$")
 		cotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles})
@@ -3019,21 +3166,6 @@
 	# determine unity target sources
 	set (_unityTargetSources "")
 	cotire_collect_unity_target_sources(${_target} "${_languages}" _unityTargetSources)
-	# handle automatic Qt processing
-	get_target_property(_targetAutoMoc ${_target} AUTOMOC)
-	get_target_property(_targetAutoUic ${_target} AUTOUIC)
-	get_target_property(_targetAutoRcc ${_target} AUTORCC)
-	if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
-		# if the original target sources are subject to CMake's automatic Qt processing,
-		# also include implicitly generated <targetname>_automoc.cpp file
-		if (CMAKE_VERSION VERSION_LESS "3.8.0")
-			list (APPEND _unityTargetSources "${_target}_automoc.cpp")
-			set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE)
-		else()
-			list (APPEND _unityTargetSources "${_target}_autogen/moc_compilation.cpp")
-			set_property (SOURCE "${_target}_autogen/moc_compilation.cpp" PROPERTY GENERATED TRUE)
-		endif()
-	endif()
 	# prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created
 	set (CMAKE_AUTOMOC OFF)
 	set (CMAKE_AUTOUIC OFF)
@@ -3046,21 +3178,6 @@
 		add_executable(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})
 	else()
 		add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})
-	endif()
-	if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
-		# depend on original target's automoc target, if it exists
-		if (TARGET ${_target}_automoc)
-			add_dependencies(${_unityTargetName} ${_target}_automoc)
-		endif()
-	else()
-		if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
-			# depend on the original target's implicity generated <targetname>_automoc target
-			if (CMAKE_VERSION VERSION_LESS "3.8.0")
-				add_dependencies(${_unityTargetName} ${_target}_automoc)
-			else()
-				add_dependencies(${_unityTargetName} ${_target}_autogen)
-			endif()
-		endif()
 	endif()
 	# copy output location properties
 	set (_outputDirProperties
@@ -3132,7 +3249,8 @@
 		INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED)
 	# copy link stuff
 	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
-		BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
+		BUILD_WITH_INSTALL_RPATH BUILD_WITH_INSTALL_NAME_DIR
+		INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
 		LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED
 		LINK_FLAGS LINK_FLAGS_<CONFIG>
 		LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_<CONFIG>
@@ -3174,6 +3292,10 @@
 		ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES
 		ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH
 		ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE)
+	# copy CUDA platform specific stuff
+	cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName}
+		CUDA_PTX_COMPILATION CUDA_SEPARABLE_COMPILATION CUDA_RESOLVE_DEVICE_SYMBOLS
+		CUDA_EXTENSIONS CUDA_STANDARD CUDA_STANDARD_REQUIRED)
 	# use output name from original target
 	get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME)
 	if (NOT _targetOutputName)
@@ -3185,6 +3307,13 @@
 		set_property(TARGET ${_unityTargetName} PROPERTY DEFINE_SYMBOL "${_defineSymbol}")
 		if ("${_targetType}" STREQUAL "EXECUTABLE")
 			set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE)
+		endif()
+	endif()
+	# enable parallel compilation for MSVC
+	if (MSVC AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+		list (LENGTH _unityTargetSources _numberOfUnityTargetSources)
+		if (_numberOfUnityTargetSources GREATER 1)
+			set_property(TARGET ${_unityTargetName} APPEND PROPERTY COMPILE_OPTIONS "/MP")
 		endif()
 	endif()
 	cotire_init_target(${_unityTargetName})
@@ -3343,6 +3472,13 @@
 				set_target_properties(${_unityTargetName} PROPERTIES INTERFACE_LINK_LIBRARIES "${_unityLinkInterfaceLibraries}")
 				if (COTIRE_DEBUG)
 					message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}")
+				endif()
+			endif()
+			get_target_property(_manualDependencies ${_target} MANUALLY_ADDED_DEPENDENCIES)
+			if (_manualDependencies)
+				cotire_map_libraries("${_linkLibrariesStrategy}" _unityManualDependencies ${_manualDependencies})
+				if (_unityManualDependencies)
+					add_dependencies("${_unityTargetName}" ${_unityManualDependencies})
 				endif()
 			endif()
 		endif()
@@ -3641,7 +3777,7 @@
 	set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING
 		"Ignore sources with the listed file extensions from the generated unity source.")

-	set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "3" CACHE STRING
+	set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "2" CACHE STRING
 		"Minimum number of sources in target required to enable use of precompiled header.")

 	if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT)
@@ -3740,7 +3876,7 @@
 		FULL_DOCS
 			"The variable can be set to an integer > 0."
 			"If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target."
-			"If not defined, defaults to 3."
+			"If not defined, defaults to 2."
 	)

 	define_property(


Add some warning flags

Add some warning flags

--- CMake/cpp.cmake
+++ CMake/cpp.cmake
@@ -1,7 +1,10 @@
 cmake_minimum_required(VERSION <%= executable('cmake') ? split(systemlist('cmake --version')[0], ' ')[2] : '3.1' %>)
-project(CMakeProject)
+project(CMakeProject C CXX)

 set(CMAKE_C_STANDARD 11)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+set(CMAKE_C_EXTENSIONS OFF)
+
 set(CMAKE_CXX_STANDARD 14)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)
@@ -10,33 +13,35 @@
 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
   message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
   set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE)
-  # Set the possible values of build type for cmake-gui
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
 endif()

 # Version Requirements
-# if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-#   if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
-#     message(FATAL_ERROR "GCC version must be at least 4.4!")
-#   endif()
-# elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-#   if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
-#     message(FATAL_ERROR "Clang version must be at least 3.1!")
-#   endif()
-# else()
-#   message(WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang and GCC.")
-# endif()
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
+    message(FATAL_ERROR "GCC version must be at least 4.4!")
+  endif()
+elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
+    message(FATAL_ERROR "Clang version must be at least 3.1!")
+  endif()
+endif()

 add_executable(<+CURSOR+>)
+
+# include_directories(${CMAKE_SOURCE_DIR})
+
 # find_package(Threads REQUIRED)
-# target_link_libraries(main Threads::Threads)
+# target_link_libraries(main m Threads::Threads)

 if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
   add_definitions(-DNDEBUG)
 endif()

+
 if(MSVC)
+  set(CMAKE_USE_RELATIVE_PATHS "ON")
   if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
     string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
   else()
@@ -81,32 +86,6 @@
   foreach(WARNING_FLAG
       -Wall
       -Wextra
-      -Wcast-align
-      -Wcast-qual
-      -Wconversion
-      -Wdisabled-optimization
-      -Wfloat-equal
-      -Wformat=2
-      -Winit-self
-      -Winline
-      -Wlogical-op
-      -Wmissing-declarations
-      -Wpointer-arith
-      -Wredundant-decls
-      -Wstrict-aliasing=2
-      -Wswitch-enum
-      -Wundef
-      -Wunsafe-loop-optimizations
-      -Wunreachable-code
-      -Wwrite-strings
-      -Wno-unknown-pragmas
-      -pedantic)
-    set(GNU_COMMON_WARNING_FLAGS "${GNU_COMMON_WARNING_FLAGS} ${WARNING_FLAG}")
-  endforeach(WARNING_FLAG)
-
-  foreach(WARNING_FLAG
-      -Wall
-      -Wextra
       -Wabi
       -Wcast-align
       -Wcast-qual
@@ -116,24 +95,21 @@
       -Wformat=2
       -Winit-self
       -Winline
+      -Winvalid-pch
       -Wmissing-declarations
       -Wpointer-arith
       -Wredundant-decls
+      -Wstack-protector
       -Wstrict-aliasing=2
       -Wswitch-enum
-      -Wundef
+      -Wunknown-pragmas
       -Wunreachable-code
       -Wwrite-strings
-      -pedantic
-      -Wc++-compat
-      -Wbad-function-cast
-      -Wmissing-prototypes
-      -Wc++11-compat
-      -Weffc++
-      -Woverloaded-virtual
-      -Wsign-promo)
-    set(CLANG_COMMON_WARNING_FLAGS "${CLANG_COMMON_WARNING_FLAGS} ${WARNING_FLAG}")
-  endforeach(WARNING_FLAG)
+      -pedantic)
+    set(GNU_CLANG_COMMON_WARNING_FLAGS "${GNU_CLANG_COMMON_WARNING_FLAGS} ${WARNING_FLAG}")
+  endforeach()
+  set(GNU_COMMON_WARNING_FLAGS "${GNU_CLANG_COMMON_WARNING_FLAGS} -Wlogical-op -Wunsafe-loop-optimizations")
+  set(CLANG_COMMON_WARNING_FLAGS "${GNU_CLANG_COMMON_WARNING_FLAGS} -Wsign-promo")

   if(CMAKE_COMPILER_IS_GNUCC)
     set(C_WARNING_FLAGS "${GNU_COMMON_WARNING_FLAGS}")
@@ -141,9 +117,11 @@
         -Wc++-compat
         -Wbad-function-cast
         -Wmissing-prototypes
-        -Wunsuffixed-float-constants)
+        -Wold-style-definition
+        -Wstrict-prototypes)
       set(C_WARNING_FLAGS "${C_WARNING_FLAGS} ${WARNING_FLAG}")
     endforeach(WARNING_FLAG)
+
     if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.5 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.5)
       message("-- Add warning flags implemented in gcc 4.5")
       foreach(WARNING_FLAG
@@ -158,7 +136,8 @@
           -Wdouble-promotion
           -Wsuggest-attribute=const
           -Wsuggest-attribute=noreturn
-          -Wsuggest-attribute=pure)
+          -Wsuggest-attribute=pure
+          -Wtrampolines)
         set(C_WARNING_FLAGS "${C_WARNING_FLAGS} ${WARNING_FLAG}")
       endforeach(WARNING_FLAG)
     endif()
@@ -177,18 +156,34 @@
     if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 5.1 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.1)
       message("-- Add warning flags implemented in gcc 5.1")
       foreach(WARNING_FLAG
+          -Wformat-signedness
           -Wsuggest-final-methods
           -Wsuggest-final-types)
         set(C_WARNING_FLAGS "${C_WARNING_FLAGS} ${WARNING_FLAG}")
       endforeach(WARNING_FLAG)
     endif()
-    if(CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
-      set(C_WARNING_FLAGS "${C_WARNING_FLAGS} -Wabi")
-    else()
-      set(C_WARNING_FLAGS "${C_WARNING_FLAGS} -Wabi=11")
+    if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6.0 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 6.0)
+      message("-- Add warning flags implemented in gcc 6.0")
+      set(C_WARNING_FLAGS "${C_WARNING_FLAGS} -Wduplicated-cond")
+    endif()
+    if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 7.0 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 7.0)
+      message("-- Add warning flags implemented in gcc 7.0")
+      string(REGEX REPLACE "-Wabi" "-Wabi=11" C_WARNING_FLAGS "${C_WARNING_FLAGS}")
+      set(C_WARNING_FLAGS "${C_WARNING_FLAGS} -Wduplicated-branches")
+    endif()
+    if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 8.0 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 8.0)
+      message("-- Add warning flags implemented in gcc 8.0")
+      string(REGEX REPLACE "-Wcast-align" "-Wcast-align=strict" C_WARNING_FLAGS "${C_WARNING_FLAGS}")
     endif()
   elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
     set(C_WARNING_FLAGS "${CLANG_COMMON_WARNING_FLAGS}")
+    foreach(WARNING_FLAG
+        -Wc++-compat
+        -Wbad-function-cast
+        -Wmissing-prototypes)
+      set(C_WARNING_FLAGS "${C_WARNING_FLAGS} ${WARNING_FLAG}")
+    endforeach(WARNING_FLAG)
+
     if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.5 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 3.5)
       message("-- Add warning flags implemented in clang 3.5")
       set(C_WARNING_FLAGS "${C_WARNING_FLAGS} -Wc++14-compat")
@@ -207,27 +202,34 @@
     set(CXX_WARNING_FLAGS "${GNU_COMMON_WARNING_FLAGS}")
     foreach(WARNING_FLAG
         -Weffc++
+        -Wnon-virtual-dtor
+        -Wold-style-cast
         -Woverloaded-virtual
+        -Wreorder
         -Wsign-promo
         -Wstrict-null-sentinel)
       set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} ${WARNING_FLAG}")
     endforeach(WARNING_FLAG)
+
     if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6)
       message("-- Add warning flags implemented in g++ 4.6")
       foreach(WARNING_FLAG
           -Wdouble-promotion
+          -Wnoexcept
           -Wsuggest-attribute=const
           -Wsuggest-attribute=noreturn
-          -Wsuggest-attribute=pure)
+          -Wsuggest-attribute=pure
+          -Wtrampolines)
         set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} ${WARNING_FLAG}")
       endforeach()
     endif()
     if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.7 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.7)
       message("-- Add warning flags implemented in g++ 4.7")
       foreach(WARNING_FLAG
+          -Wc++11-compat
+          -Wdelete-non-virtual-dtor
           -Wvector-operation-performance
           -Wno-return-local-addr
-          -Wc++11-compat
           -Wzero-as-null-pointer-constant)
         set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} ${WARNING_FLAG}")
       endforeach(WARNING_FLAG)
@@ -240,23 +242,47 @@
         set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} ${WARNING_FLAG}")
       endforeach(WARNING_FLAG)
     endif()
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9)
+      message("-- Add warning flags implemented in g++ 4.9")
+      set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} -Wconditionally-supported")
+    endif()
     if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.1 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.1)
       message("-- Add warning flags implemented in g++ 5.1")
       foreach(WARNING_FLAG
+          -Wc++14-compat
+          -Wformat-signedness
           -Wsuggest-final-methods
           -Wsuggest-final-types
-          -Wsuggest-override
-          -Wc++14-compat)
+          -Wsuggest-override)
         set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} ${WARNING_FLAG}")
       endforeach(WARNING_FLAG)
     endif()
-    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
-      set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} -Wabi")
-    else()
-      set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} -Wabi=11")
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.0)
+      message("-- Add warning flags implemented in g++ 6.0")
+      set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} -Wduplicated-cond")
+    endif()
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0)
+      message("-- Add warning flags implemented in g++ 7.0")
+      string(REGEX REPLACE "-Wabi" "-Wabi=11" CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS}")
+      set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} -Wduplicated-branches")
+    endif()
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0)
+      message("-- Add warning flags implemented in g++ 8.0")
+      string(REGEX REPLACE "-Wcast-align" "-Wcast-align=strict" CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS}")
     endif()
   else()
     set(CXX_WARNING_FLAGS "${CLANG_COMMON_WARNING_FLAGS}")
+    foreach(WARNING_FLAG
+        -Wc++11-compat
+        -Weffc++
+        -Wdelete-non-virtual-dtor
+        -Wnon-virtual-dtor
+        -Wold-style-cast
+        -Woverloaded-virtual
+        -Wreorder)
+      set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} ${WARNING_FLAG}")
+    endforeach(WARNING_FLAG)
+
     if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.5 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.5)
       message("-- Add warning flags implemented in clang++ 3.5")
       set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS} -Wc++14-compat")
@@ -301,10 +327,20 @@
   add_custom_target(uninstall xargs rm < install_manifest.txt)
 endif()

+
+string(REGEX REPLACE "^ +" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+string(REGEX REPLACE "^ +" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+
+
 if(ENABLE_TESTING)
   enable_testing()
   include(cmake/gtest.cmake)
   add_subdirectory(test)
+endif()
+
+if(ENABLE_DOXYGEN)
+  include(Doxygen/doxygen.cmake)
+  add_doxygen(main)
 endif()


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -16,6 +16,7 @@
 Name[kk]=Лезде хабарласу
 Name[nb]=Lynmelding
 Name[nl]=Instant Messaging
+Name[pl]=Komunikator internetowy
 Name[pt]=Mensagens Instantâneas
 Name[pt_BR]=Mensagens instantâneas
 Name[ro]=Mesagerie instantanee
@@ -50,6 +51,7 @@
 Comment[kk]=Кез-келген лезде хабарласу контактыңызбен чат-әңгімені бастау не күй-жайын өзгерту
 Comment[nb]=Start en prat med en av dine LM-kontakter eller endre din LM-status
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
+Comment[pl]=Rozpocznij rozmowę z którymkolwiek z twoich kontaktów lub zmień swoja dostępność
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI ou mudar o seu estado
 Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
 Comment[ro]=Începeți o discuție cu oricare dintre contactele de MI sau schimbați-vă starea


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   20)
+SET(KWSYS_DATE_STAMP_DAY   21)


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2007)

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

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


Always look for cblas if atlas found

Always look for cblas if atlas found

--- modules/FindCBLAS.cmake
+++ modules/FindCBLAS.cmake
@@ -7,10 +7,10 @@
 endif()

 # Figures out atlas if necessary
-if(NOT BLAS_LIBRARIES AND BLAS_atlas_LIBRARY)
+if(BLAS_atlas_LIBRARY)
     get_filename_component(atlas_dir "${BLAS_atlas_LIBRARY}" PATH)
     get_filename_component(atlas_ext "${BLAS_atlas_LIBRARY}" EXT)
-    find_library(BLAS_atlas_cblas_LIBRARY NAMES libcblas${atlas_ext}
+    find_library(BLAS_atlas_cblas_LIBRARY NAMES libcblas${atlas_ext}
         HINTS "${atlas_dir}"
     )
     if(BLAS_atlas_cblas_LIBRARY)


Make r10c toolchain compile flags more Android-ish

 * Use -mandroid when building C/C++.

 * Enable exceptions and RTTI explicitly as -mandroid implies -fno-rtti
and -fno-exceptions.

 * Remove redundant -DANDROID and -D__ANDROID__ defines.

Change-Id: I6c6c548e5e0082f369efcd1970d082ec73d67732

--- framework/delibs/cmake/toolchain-android-r10c.cmake
+++ framework/delibs/cmake/toolchain-android-r10c.cmake
@@ -31,7 +31,8 @@
 	set(DE_ANDROID_API 9)
 endif ()

-set(COMMON_C_FLAGS		"-fpic -DANDROID -D__ANDROID__ -D__STDC_INT64__")
+set(COMMON_C_FLAGS		"-mandroid -D__STDC_INT64__")
+set(COMMON_CXX_FLAGS	"${COMMON_C_FLAGS} -frtti -fexceptions")
 set(COMMON_LINKER_FLAGS	"")
 set(ARM_C_FLAGS			"-D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ ")

@@ -140,6 +141,6 @@

 # \note Without CACHE STRING FORCE cmake ignores these.
 set(CMAKE_C_FLAGS				"--sysroot=${ANDROID_SYSROOT} ${COMMON_C_FLAGS} ${TARGET_C_FLAGS}" CACHE STRING "" FORCE)
-set(CMAKE_CXX_FLAGS				"--sysroot=${ANDROID_SYSROOT} ${COMMON_C_FLAGS} ${TARGET_C_FLAGS} -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/include -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/libs/${ANDROID_ABI}/include" CACHE STRING "" FORCE)
+set(CMAKE_CXX_FLAGS				"--sysroot=${ANDROID_SYSROOT} ${COMMON_CXX_FLAGS} ${TARGET_C_FLAGS} -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/include -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/libs/${ANDROID_ABI}/include" CACHE STRING "" FORCE)
 set(CMAKE_SHARED_LINKER_FLAGS	"-nostdlib -Wl,-shared,-Bsymbolic -Wl,--no-undefined ${COMMON_LINKER_FLAGS} ${TARGET_LINKER_FLAGS}" CACHE STRING "" FORCE)
 set(CMAKE_EXE_LINKER_FLAGS		"${COMMON_LINKER_FLAGS} ${TARGET_LINKER_FLAGS}" CACHE STRING "" FORCE)


CMake add missing abseil::random_random deps

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -109,6 +109,7 @@
 target_link_libraries(${PROJECT_NAME} PUBLIC
   ZLIB::ZLIB
   absl::base
+  absl::random_random
   absl::raw_hash_set
   absl::hash
   absl::memory


remove -static-intel when using icc

remove -static-intel when using icc

--- cmake/icc.cmake
+++ cmake/icc.cmake
@@ -22,7 +22,7 @@
 ## DEALINGS IN THE SOFTWARE.                                                  ##
 ## ========================================================================== ##

-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel -std=c++11")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

 IF (APPLE)
   SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} -dynamiclib)


workaround for ccache

workaround for ccache

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@6952 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -170,18 +170,20 @@

 endfunction()

-# calls compilers with --version option and checks the output
+## calls compilers with --version option and checks the output
+# calls compilers with -dumpversion and checks the output
+# (because it appears that ccache messes with the --version output)
 # returns TRUE if the strings match or FALSE if they don't.
 #   (note: you can use  if (outvar) to test )
 # this seems to be a more robust and less complex method than trying to call xcrun -find, readlink to follow symlinks, etc.
 function(compare_compilers outvar compiler1 compiler2)

   separate_arguments(c1_args UNIX_COMMAND ${compiler1})
-  list(APPEND c1_args "--version")
+  list(APPEND c1_args "-dumpversion")
   execute_process(COMMAND ${c1_args} OUTPUT_VARIABLE c1_ver OUTPUT_STRIP_TRAILING_WHITESPACE)

   separate_arguments(c2_args UNIX_COMMAND ${compiler2})
-  list(APPEND c2_args "--version")
+  list(APPEND c2_args "-dumpversion")
   execute_process(COMMAND ${c2_args} OUTPUT_VARIABLE c2_ver OUTPUT_STRIP_TRAILING_WHITESPACE)

   if (c1_ver AND c2_ver AND "${c1_ver}" STREQUAL "${c2_ver}")
@@ -199,12 +201,12 @@

 compare_compilers(compilers_match "${MEX_CC}" "${CMAKE_C_COMPILER}")
 if (NOT compilers_match)
-   message(WARNING "Your cmake C compiler is: ${CMAKE_C_COMPILER} but your mex options use: ${MEX_CC} .  Consider rerunning 'mex -setup' in  Matlab.")
+   message(FATAL_ERROR "Your cmake C compiler is: ${CMAKE_C_COMPILER} but your mex options use: ${MEX_CC} .  Consider rerunning 'mex -setup' in  Matlab.")
 endif()

 compare_compilers(compilers_match ${MEX_CXX} ${CMAKE_CXX_COMPILER})
 if (NOT compilers_match)
-   message(WARNING "Your cmake CXX compiler is: ${CMAKE_CXX_COMPILER} but your mex options end up pointing to: ${MEX_CXX} .  Consider rerunning 'mex -setup' in Matlab.")
+   message(FATAL_ERROR "Your cmake CXX compiler is: ${CMAKE_CXX_COMPILER} but your mex options end up pointing to: ${MEX_CXX} .  Consider rerunning 'mex -setup' in Matlab.")
 endif()

 # NOTE:  would like to check LD also, but it appears to be difficult with cmake  (there is not explicit linker executable variable, only the make rule), and  even my mex code assumes that LD==LDCXX for simplicity.


Fix repeated builds broken by re2's cmake

--- cmake/re2.cmake
+++ cmake/re2.cmake
@@ -21,6 +21,9 @@
     set(RE2_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/re2)
   endif()
   if(EXISTS "${RE2_ROOT_DIR}/CMakeLists.txt")
+    # Explicitly disable BUILD_TESTING to avoid re2's CMakeLists.txt triggering https://github.com/grpc/grpc/issues/23586
+    option(BUILD_TESTING "re2.cmake explicitly disabled CTest's BUILD_TESTING option." OFF)
+
     include_directories("${RE2_ROOT_DIR}")
     add_subdirectory(${RE2_ROOT_DIR} third_party/re2)


the module macro no longer needs the rng bit

--- CMake/CycamoreModuleMacros.cmake
+++ CMake/CycamoreModuleMacros.cmake
@@ -36,55 +36,3 @@
     ${CMAKE_CURRENT_SOURCE_DIR}/${_name}Tests.cpp
     PARENT_SCOPE)
 endmacro()
-
-macro(find_modules _type)
-  SET(TYPE_PATH "${CYCLUS_ROOT_DIR}/lib/Models/${_type}/*/")
-  FILE(GLOB all_valid_subdirs ${TYPE_PATH} "*/*.rng")
-  FOREACH(dir ${all_valid_subdirs})
-    STRING(REPLACE "${CYCLUS_ROOT_DIR}/lib/Models/${_type}/" "" model_name "${dir}" )
-    SET(${_type}_REFS ${${_type}_REFS} "<ref name='${model_name}'/>")
-    SET(RNG_INCLUDES ${RNG_INCLUDES} "<include href='../lib/Models/${_type}/${model_name}/${model_name}.rng'/>")
-  ENDFOREACH(dir)
-endmacro()
-
-macro(find_all_modules)
-  find_modules(Facility)
-  find_modules(Inst)
-  find_modules(Region)
-  find_modules(Market)
-  find_modules(Converter)
-  find_modules(Stub)
-  find_modules(StubComm)
-endmacro()
-
-macro(clean_includes)
-  STRING(REPLACE ";" "\n\ \ " RNG_INCLUDES "${RNG_INCLUDES}")
-endmacro()
-
-macro(clean_refs _type)
-  STRING(REPLACE ";" "\n\ \ \ \ \ \ \ \ " ${_type}_REFS "${${_type}_REFS}")
-endmacro()
-
-macro(clean_all_refs)
-  clean_refs(Facility)
-  MESSAGE(STATUS "Facility_REFS ${Facility_REFS}")
-  clean_refs(Inst)
-  clean_refs(Region)
-  clean_refs(Market)
-  clean_refs(Converter)
-  clean_refs(Stub)
-  clean_refs(StubComm)
-endmacro()
-
-macro(install_rng)
-  find_all_modules()
-  clean_includes()
-  clean_all_refs()
-  CONFIGURE_FILE(${CYCLUS_CORE_SHARE_DIR}/cyclus.rng.in
-    ${PROJECT_BINARY_DIR}/share/cyclus.rng @ONLY)
-  INSTALL(FILES
-    ${PROJECT_BINARY_DIR}/share/cyclus.rng
-    DESTINATION ${CYCLUS_CORE_SHARE_DIR}
-    COMPONENT data
-  )
-endmacro()


Only generate ptx code for the latest supported arch

Follows recommendation of njuffa from NVIDIA:
http://forums.nvidia.com/index.php?showtopic=226505&view=findpost&p=1391640

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -35,7 +35,6 @@

     foreach(_cuda_arch ${CUDA_ARCH_LIST})
         list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_${_cuda_arch},code=sm_${_cuda_arch}")
-        list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_${_cuda_arch},code=compute_${_cuda_arch}")
     endforeach (_cuda_arch)

     if (CUDA_VERSION VERSION_EQUAL 3.1 OR CUDA_VERSION VERSION_EQUAL 3.2)
@@ -48,6 +47,11 @@
     list(SORT _cuda_arch_list_sorted)
     list(GET _cuda_arch_list_sorted 0 _cuda_min_arch)
     add_definitions(-DCUDA_ARCH=${_cuda_min_arch})
+
+    # only generage ptx code for the maximum supported CUDA_ARCH (saves on file size)
+    list(REVERSE _cuda_arch_list_sorted)
+    list(GET _cuda_arch_list_sorted 0 _cuda_max_arch)
+    list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_${_cuda_max_arch},code=compute_${_cuda_max_arch}")
 endif (ENABLE_CUDA)

 # embed the CUDA libraries into the lib dir


fix: FindFreeImage script to handle dlls

--- CMakeModules/FindFreeImage.cmake
+++ CMakeModules/FindFreeImage.cmake
@@ -1,13 +1,25 @@
-# FindFreeImage.cmake
-# Author: Umar Arshad <umar@arrayfire.com>
-# Modified on 15-JUL-2017 by Pradeep Garigipati<pradeep@arrayfire.com>
+# Copyright (c) 2018, ArrayFire
+# All rights reserved.
 #
-# Finds the FreeImage libraries
+# This file is distributed under 3-clause BSD license.
+# The complete license agreement can be obtained at:
+# http://arrayfire.com/licenses/BSD-3-Clause
+#
+# Targets defined by this script
+#   FreeImage::FreeImage
+#   FreeImage::FreeImage_STATIC
+#
+# Note:
+# 1. The static version target is only defined if the static lib is found
+# 2. Environment variable FreeImage_ROOT can be defined on Windows where
+#    FreeImage is just a zip file of header and library files.
+#
 # Sets the following variables:
 #          FreeImage_FOUND
 #          FreeImage_INCLUDE_DIR
-#          FreeImage_DYNAMIC_LIBRARY
+#          FreeImage_LINK_LIBRARY
 #          FreeImage_STATIC_LIBRARY
+#          FreeImage_DLL_LIBRARY - Windows only
 #
 # Usage:
 # find_package(FreeImage)
@@ -25,73 +37,87 @@
 # NOTE: You do not need to include the FreeImage include directories since they
 # will be included as part of the target_link_libraries command

-set(PX ${CMAKE_STATIC_LIBRARY_PREFIX})
-set(SX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+find_path(FreeImage_INCLUDE_DIR
+  NAMES FreeImage.h
+  PATHS
+    /usr/include
+    /usr/local/include
+    /sw/include
+    /opt/local/include
+	${FreeImage_ROOT}
+  DOC "The directory where FreeImage.h resides")

-find_path(FreeImage_INCLUDE_DIR
-    NAMES FreeImage.h
-    HINTS ${PROJECT_SOURCE_DIR}/extern/FreeImage
-    PATHS
-        /usr/include
-        /usr/local/include
-        /sw/include
-        /opt/local/include
-    DOC "The directory where FreeImage.h resides")
-
-find_library(FreeImage_DYNAMIC_LIBRARY
-    NAMES FreeImage freeimage
-    HINTS ${PROJECT_SOURCE_DIR}/FreeImage
-    PATHS
-        /usr/local
-        /usr/X11
-        /usr
-        /sw
-        /opt/local
-        /usr/lib/x86_64-linux-gnu
-    PATH_SUFFIXES
-        lib64
-        lib
-    DOC "The FreeImage library")
+find_library(FreeImage_LINK_LIBRARY
+  NAMES FreeImage freeimage
+  PATHS
+    /usr/lib64
+    /usr/lib
+    /usr/local/lib64
+    /usr/local/lib
+    /sw/lib
+    /opt/local/lib
+	${FreeImage_ROOT}
+  DOC "The FreeImage library")

 find_library(FreeImage_STATIC_LIBRARY
-    NAMES ${PX}FreeImageLIB${SX} ${PX}FreeImage${SX} ${PX}freeimage${SX}
-    HINTS ${PROJECT_SOURCE_DIR}/FreeImage
+  NAMES
+    ${CMAKE_STATIC_LIBRARY_PREFIX}FreeImageLIB${CMAKE_STATIC_LIBRARY_SUFFIX}
+    ${CMAKE_STATIC_LIBRARY_PREFIX}FreeImage${CMAKE_STATIC_LIBRARY_SUFFIX}
+    ${CMAKE_STATIC_LIBRARY_PREFIX}freeimage${CMAKE_STATIC_LIBRARY_SUFFIX}
+  PATHS
+    /usr/lib64
+    /usr/lib
+    /usr/local/lib64
+    /usr/local/lib
+    /sw/lib
+    /opt/local/lib
+    ${FreeImage_ROOT}
+  DOC "The FreeImage static library")
+
+if (WIN32)
+  find_file(FreeImage_DLL_LIBRARY
+    NAMES
+      ${CMAKE_SHARED_LIBRARY_PREFIX}FreeImage${CMAKE_SHARED_LIBRARY_SUFFIX}
+      ${CMAKE_SHARED_LIBRARY_PREFIX}freeimage${CMAKE_SHARED_LIBRARY_SUFFIX}
     PATHS
-        /usr/local
-        /usr/X11
-        /usr
-        /sw
-        /opt/local
-        /usr/lib/x86_64-linux-gnu
-    PATH_SUFFIXES
-        lib64
-        lib
-    DOC "The FreeImage library")
+      ${FreeImage_ROOT}
+    DOC "The FreeImage dll")
+	mark_as_advanced(FreeImage_DLL_LIBRARY)
+endif ()

 mark_as_advanced(
-    FreeImage_INCLUDE_DIR
-    FreeImage_DYNAMIC_LIBRARY
-    FreeImage_STATIC_LIBRARY
-    )
+  FreeImage_INCLUDE_DIR
+  FreeImage_LINK_LIBRARY
+  FreeImage_STATIC_LIBRARY)

 include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(FreeImage
+  REQUIRED_VARS FreeImage_INCLUDE_DIR FreeImage_LINK_LIBRARY)

-find_package_handle_standard_args(FreeImage
-  REQUIRED_VARS FreeImage_INCLUDE_DIR FreeImage_DYNAMIC_LIBRARY
-  )
+if(FreeImage_FOUND AND NOT TARGET FreeImage::FreeImage)
+  add_library(FreeImage::FreeImage SHARED IMPORTED)
+  if(WIN32)
+    set_target_properties(FreeImage::FreeImage
+	  PROPERTIES
+        IMPORTED_LINK_INTERFACE_LANGUAGE "C"
+        INTERFACE_INCLUDE_DIRECTORIES "${FreeImage_INCLUDE_DIR}"
+        IMPORTED_LOCATION "${FreeImage_DLL_LIBRARY}"
+	    IMPORTED_IMPLIB "${FreeImage_LINK_LIBRARY}")
+  else(WIN32)
+    set_target_properties(FreeImage::FreeImage
+	  PROPERTIES
+        IMPORTED_LINK_INTERFACE_LANGUAGE "C"
+        INTERFACE_INCLUDE_DIRECTORIES "${FreeImage_INCLUDE_DIR}"
+        IMPORTED_LOCATION "${FreeImage_LINK_LIBRARY}"
+	    IMPORTED_NO_SONAME FALSE)
+  endif(WIN32)
+endif()

-if (FreeImage_FOUND AND NOT TARGET FreeImage::FreeImage)
-    add_library(FreeImage::FreeImage UNKNOWN IMPORTED)
-    set_target_properties(FreeImage::FreeImage PROPERTIES
-        IMPORTED_LINK_INTERFACE_LANGUAGE "C"
-        IMPORTED_LOCATION "${FreeImage_DYNAMIC_LIBRARY}"
-        INTERFACE_INCLUDE_DIRECTORIES "${FreeImage_INCLUDE_DIR}")
-
-    if (FreeImage_STATIC_LIBRARY)
-        add_library(FreeImage::FreeImage_STATIC UNKNOWN IMPORTED)
-        set_target_properties(FreeImage::FreeImage_STATIC PROPERTIES
-            IMPORTED_LINK_INTERFACE_LANGUAGE "C"
-            IMPORTED_LOCATION "${FreeImage_STATIC_LIBRARY}"
-            INTERFACE_INCLUDE_DIRECTORIES "${FreeImage_INCLUDE_DIR}")
-    endif (FreeImage_STATIC_LIBRARY)
-endif ()
+if(FreeImage_STATIC_LIBRARY AND NOT TARGET FreeImage::FreeImage_STATIC)
+  add_library(FreeImage::FreeImage_STATIC STATIC IMPORTED)
+  set_target_properties(FreeImage::FreeImage_STATIC
+    PROPERTIES
+      IMPORTED_LINK_INTERFACE_LANGUAGE "C"
+      INTERFACE_INCLUDE_DIRECTORIES "${FreeImage_INCLUDE_DIR}"
+      IMPORTED_LOCATION "${FreeImage_STATIC_LIBRARY}")
+endif()


Corrected cmake file as cmiss_element_private.h has been renamed to cmiss_element_private.hpp. Tracker item 2911, https://tracker.physiomeproject.org/show_bug.cgi?id=2911

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@8507 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/cmake/misc_source_files.cmake
+++ source/cmake/misc_source_files.cmake
@@ -80,7 +80,7 @@
 	source/mesh/cmiss_element_private.cpp
 	source/mesh/cmiss_node_private.cpp )
 SET( MESH_HDRS
-	source/mesh/cmiss_element_private.h )
+	source/mesh/cmiss_element_private.hpp )

 SET( NODE_SRCS source/node/node_operations.c
 	source/node/node_tool.cpp )


Add common swig share to windows configuration.

--- external/Swig.cmake
+++ external/Swig.cmake
@@ -31,6 +31,7 @@
     add_custom_target(Swig)
     set(SWIG_EXECUTABLE
         ${PROJECT_SOURCE_DIR}/${PLATFORM}${BITNESS}/bin/swig.exe)
+    set(SWIG_DIR ${PROJECT_SOURCE_DIR}/common/share/swig/3.0.2)
   else()
     ExternalProject_Add(
       Swig


disabled install target; cleanup

disabled install target; cleanup

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -36,10 +36,8 @@

 if (WIN32 AND NOT MINGW)
-#    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "\"$<TARGET_OBJECTS:secp256k1>\" \"$<TARGET_OBJECTS:scrypt>\" \"$<TARGET_OBJECTS:ethcrypto-core>\"")
     set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "\"${CMAKE_CURRENT_BINARY_DIR}\\lib.obj\\secp256k1.lib\" \"${CMAKE_CURRENT_BINARY_DIR}\\lib.obj\\scrypt.lib\" \"${CMAKE_CURRENT_BINARY_DIR}\\lib.obj\\ethcrypto-core.lib\"")
 elseif (${CMAKE_GENERATOR} STREQUAL "Xcode")
-#    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "$<TARGET_OBJECTS:secp256k1> $<TARGET_OBJECTS:scrypt> $<TARGET_OBJECTS:ethcrypto-core>")
     set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/lib.obj/secp256k1.a ${CMAKE_CURRENT_BINARY_DIR}/lib.obj/libscrypt.a ${CMAKE_CURRENT_BINARY_DIR}/lib.obj/ethcrypto-core.a")
 else()
     set(LIB_OBJ_DIR ${CMAKE_CURRENT_BINARY_DIR}/lib.obj/obj)
@@ -60,10 +58,10 @@

-if(NOT SKIP_LIBRARY_INSTALL)
-    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include DESTINATION include OPTIONAL)
-    install (TARGETS ethcrypto ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin OPTIONAL)
-endif()
+#if(NOT SKIP_LIBRARY_INSTALL)
+#    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include DESTINATION include OPTIONAL)
+#    install (TARGETS ethcrypto ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin OPTIONAL)
+#endif()

 MakeIncludesLink()


Fix escaping of $ and "

Fix escaping of $ and "

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -17,9 +17,9 @@
   file(GLOB shared_libs \"${install_location}/lib/*.so\")
   message(\"\${CMAKE_INSTALL_PREFIX}/lib\")
   foreach( lib \${shared_libs})
-    if (IS_SYMLINK ${lib})
-      get_filename_component(resolved_link "${lib}" REALPATH)
-      set(${lib} ${resolved_link})
+    if (IS_SYMLINK \${lib})
+      get_filename_component(resolved_link \"\${lib}\" REALPATH)
+      set(\${lib} \${resolved_link})
     endif()
     message(\${lib})
     file(INSTALL \${lib}


Update SDL2 Version to 2.0.7 for appveyor builds


--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -20,6 +20,7 @@
 Name[es]=VLC
 Name[et]=VLC
 Name[fi]=VLC
+Name[fr]=VLC
 Name[hu]=VLC
 Name[kk]=VLC
 Name[ko]=VLC
@@ -55,6 +56,7 @@
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
 Comment[fi]=Phonon VLC-taustaohjelma
+Comment[fr]=Module VLC de Phonon
 Comment[hu]=Phonon VLC-backend
 Comment[kk]=Phonon VLC тетігі
 Comment[ko]=Phonon VLC 백엔드


multiple downloads for patch

multiple downloads for patch

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

--- projects/patch.cmake
+++ projects/patch.cmake
@@ -12,11 +12,12 @@
   REPO "repo" http://git.savannah.gnu.org/cgit/patch.git "patch (git) repo on gnu.org"
   VER ${PATCH_MSWVER}/${PATCH_GNUVER}
   GIT_ORIGIN git://git.savannah.gnu.org/patch.git
+  DLURL http://ftp.gnu.org/gnu/patch/patch-${PATCH_GNUVER}.tar.gz
+  DLMD5 ed4d5674ef4543b4eb463db168886dc7
+  DLURL_MSW http://prdownloads.sourceforge.net/gnuwin32/patch-${PATCH_MSWVER}-bin.zip
+  DLMD5_MSW b9c8b31d62f4b2e4f1887bbb63e8a905
+  DLADD _MSW
   )
-set(PRO_URL_MSWPATCH http://prdownloads.sourceforge.net/gnuwin32/patch-${PATCH_MSWVER}-bin.zip)
-set(PRO_MD5_MSWPATCH b9c8b31d62f4b2e4f1887bbb63e8a905)
-set(PRO_URL_GNUPATCH http://ftp.gnu.org/gnu/patch/patch-${PATCH_GNUVER}.tar.gz)
-set(PRO_MD5_GNUPATCH ed4d5674ef4543b4eb463db168886dc7)
 ####################
 get_property(baseDir DIRECTORY PROPERTY "EP_BASE")
 set(patchbld_DIR ${baseDir}/bld.patch)
@@ -29,26 +30,25 @@
   set(PATCH_CMD ${PATCH_EXE})
 endif()
 ########################################
-function(download_patch)
-  xpDownload(${PRO_URL_MSWPATCH} ${PRO_MD5_MSWPATCH} ${DWNLD_DIR})
-  xpDownload(${PRO_URL_GNUPATCH} ${PRO_MD5_GNUPATCH} ${DWNLD_DIR})
-endfunction()
-########################################
 function(patch_patch)
   if(NOT TARGET patch)
     if(WIN32 AND NOT UNIX)
+      xpGetArgValue(${PRO_PATCH} ARG DLURL_MSW VALUE dwnldUrl)
+      xpGetArgValue(${PRO_PATCH} ARG DLMD5_MSW VALUE dwnldMd5)
       ExternalProject_Add(patch
         DOWNLOAD_DIR ${DWNLD_DIR}
-        URL ${PRO_URL_MSWPATCH}  URL_MD5 ${PRO_MD5_MSWPATCH}
+        URL ${dwnldUrl}  URL_MD5 ${dwnldMd5}
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ${CMAKE_COMMAND} -E copy_if_different
           <SOURCE_DIR>/bin/patch.exe ${patchbld_DIR}/bin/patcz.exe
         INSTALL_COMMAND "" INSTALL_DIR ${NULL_DIR}
         )
     else()
+      xpGetArgValue(${PRO_PATCH} ARG DLURL VALUE dwnldUrl)
+      xpGetArgValue(${PRO_PATCH} ARG DLMD5 VALUE dwnldMd5)
       ExternalProject_Add(patch
         DOWNLOAD_DIR ${DWNLD_DIR}
-        URL ${PRO_URL_GNUPATCH}  URL_MD5 ${PRO_MD5_GNUPATCH}
+        URL ${dwnldUrl}  URL_MD5 ${dwnldMd5}
         CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${patchbld_DIR}
         BUILD_COMMAND   # use default
         INSTALL_COMMAND # use default


Nagios Monitoring 7.12.0-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
-set ( HPCC_MINOR 11 )
+set ( HPCC_MINOR 12 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "closedown" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_MATURITY "rc" )
+set ( HPCC_SEQUENCE 1 )
 ###


Split off 7.12.16

Split off 7.12.16

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

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


[doxyrest] release 2.0.0

[doxyrest] release 2.0.0

--- version.cmake
+++ version.cmake
@@ -9,10 +9,10 @@
 #
 #...............................................................................

-set(DOXYREST_VERSION_MAJOR     1)
-set(DOXYREST_VERSION_MINOR     1)
-set(DOXYREST_VERSION_REVISION  1)
-set(DOXYREST_VERSION_TAG       a)
+set(DOXYREST_VERSION_MAJOR     2)
+set(DOXYREST_VERSION_MINOR     0)
+set(DOXYREST_VERSION_REVISION  0)
+set(DOXYREST_VERSION_TAG       )

 set(DOXYREST_VERSION_FULL "${DOXYREST_VERSION_MAJOR}.${DOXYREST_VERSION_MINOR}.${DOXYREST_VERSION_REVISION}")


Nagios Monitoring 6.0.0-rc3 Release Candidate 3

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

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 1  )
+set ( HPCC_SEQUENCE 3 )
 ###


On Cygwin do not do explicit instantiation

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -99,6 +99,12 @@
   ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)

+IF(CMAKE_COMPILER_IS_GNUCXX)
+  IF(WIN32)
+     SET(CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION 1)
+  ENDIF(WIN32)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
 IF(APPLE)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
   IF (VTK_USE_CARBON)


Benchmark will .cpp files as well

Benchmark will .cpp files as well

--- scripts/AddBenchmark.cmake
+++ scripts/AddBenchmark.cmake
@@ -15,6 +15,8 @@
   unset(source)
   if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${targetname}.cc")
     set(source ${targetname}.cc)
+  elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${targetname}.cpp")
+    set(source ${targetname}.cpp)
   elseif("${benchmark_UNPARSED_ARGUMENTS}" STREQUAL "")
     message(FATAL_ERROR "No source given or found for ${targetname}")
   endif()


Don't dump llvm-config --cmakedir output if command fails.

This patch adjusts the out-of-tree CMake configuration so that
the stderr output is ignored when an old llvm-config is found
that doesn't support --cmakedir.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@291991 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -43,7 +43,8 @@
     execute_process(
       COMMAND ${LLVM_CONFIG_PATH} --cmakedir
       RESULT_VARIABLE HAD_ERROR
-      OUTPUT_VARIABLE CONFIG_OUTPUT)
+      OUTPUT_VARIABLE CONFIG_OUTPUT
+      ERROR_QUIET)
     if(NOT HAD_ERROR)
       string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_PATH)
     else()


Enable eslint and pug-lint testing on all built-in plugins

--- worker/plugin.cmake
+++ worker/plugin.cmake
@@ -7,5 +7,7 @@
 add_python_style_test(
     python_static_analysis_${PLUGIN}_tests "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests")

-add_eslint_test(
-    worker "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client/js")
+add_eslint_test(${PLUGIN}
+    "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client")
+add_puglint_test(${PLUGIN}
+    "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client/templates")


The package version patch is not the git revision.

    The patch version number is used when installing the library.

    * build-aux/cmake/modules/ProjectInfo.cmake: Do that.

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

--- build-aux/cmake/modules/ProjectInfo.cmake
+++ build-aux/cmake/modules/ProjectInfo.cmake
@@ -18,6 +18,7 @@
   check_cmake_vars_exists(
     PROJECT_VERSION_MAJOR
     PROJECT_VERSION_MINOR
+    PROJECT_VERSION_PATCH
     PROJECT_LONGNAME
     )

@@ -33,8 +34,6 @@
   message(STATUS "Project repository ID: ${PROJECT_ID}")
   message(STATUS "Project repository revision: ${PROJECT_REVISION}")

-  set(PROJECT_VERSION_PATCH ${PROJECT_REVISION})
-
   set(PROJECT_VERSION
     "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
   set(PROJECT_VERSION_REV "version ${PROJECT_VERSION} rev. ${PROJECT_REVISION}")


use SYSTEM to silence compiler warnings from gtest

--- cmake/HextExternalProjectGoogleTest.cmake
+++ cmake/HextExternalProjectGoogleTest.cmake
@@ -15,7 +15,8 @@

 # use googletest's include/ directory as an additional include directory
 ExternalProject_Get_Property(googletest source_dir)
-INCLUDE_DIRECTORIES(${source_dir}/include)
+# Use SYSTEM to hide warnings.
+INCLUDE_DIRECTORIES(SYSTEM ${source_dir}/include)

 # add googletest's library directory when linking
 ExternalProject_Get_Property(googletest binary_dir)


FindLLVM: check for empty system-libs variable

When dynamic linking against LLVM, "llvm-config --system-libs" may be empty.
Add check for a result before attempting to call REGEX REPLACE with an empty variable.

Signed-off-by: Steven Newbury <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@snewbury.org.uk>
Reviewed-by: Yang Rong <78759e37dc7114caed18f74e7515c5cb519dbf6d@intel.com>

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -99,7 +99,9 @@
   OUTPUT_VARIABLE LLVM_SYSTEM_LIBS_ORIG
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )
+if (LLVM_SYSTEM_LIBS_ORIG)
 string(REGEX REPLACE " *\n" "" LLVM_SYSTEM_LIBS ${LLVM_SYSTEM_LIBS_ORIG})
+endif (LLVM_SYSTEM_LIBS_ORIG)
 endif (LLVM_VERSION_NODOT VERSION_GREATER 34)

 macro(add_one_lib name)


Gflags sometimes comes without an imported_location_<build_type>

Former-commit-id: c1ce398e14025ef7de814acc04185609f7cf2d69

--- cmake-modules/Fetch_Gflags.cmake
+++ cmake-modules/Fetch_Gflags.cmake
@@ -10,14 +10,18 @@
 if(TARGET gflags)
     message(STATUS "gflags found")
     #Copy the lib to where it belongs: INTERFACE_LINK_LIBRARIES
-    get_target_property(gflaglib  gflags IMPORTED_LOCATION_${BUILD_TYPE})
-    if(gflaglib)
-        target_link_libraries(gflags INTERFACE ${gflaglib})
-        remove_shared(gflags)
-        remove_pthread(gflags)
+    get_target_property(gflags_imported_loc   gflags IMPORTED_LOCATION_${BUILD_TYPE})
+    get_target_property(gflags_interface_lib  gflags INTERFACE_LINK_LIBRARIES)
+    if(gflags_imported_loc)
+        target_link_libraries(gflags INTERFACE ${gflags_imported_loc})
+    elseif(gflags_interface_lib)
+        message("gflags has an interface link library: ${gflags_interface_lib}")
     else()
         message(FATAL_ERROR "Dependency gflags does not have IMPORTED_LOCATION_${BUILD_TYPE}")
     endif()
+    remove_shared(gflags)
+    remove_pthread(gflags)
+
 elseif(DOWNLOAD_MISSING)
     message(STATUS "gflags will be installed into ${CMAKE_INSTALL_PREFIX}")
     include(${PROJECT_SOURCE_DIR}/cmake-modules/BuildDependency.cmake)
@@ -29,18 +33,18 @@
     if(TARGET gflags)
         message(STATUS "gflags installed successfully")
         #Copy the lib to where it belongs: INTERFACE_LINK_LIBRARIES
-        get_target_property(gflaglib  gflags IMPORTED_LOCATION_${BUILD_TYPE})
-        if(gflaglib)
-            target_link_libraries(gflags INTERFACE ${gflaglib})
-            remove_shared(gflags)
-            remove_pthread(gflags)
+        get_target_property(gflags_imported_loc   gflags IMPORTED_LOCATION_${BUILD_TYPE})
+        get_target_property(gflags_interface_lib  gflags INTERFACE_LINK_LIBRARIES)
+        if(gflags_imported_loc)
+            target_link_libraries(gflags INTERFACE ${gflags_imported_loc})
+        elseif(gflags_interface_lib)
+            message("gflags has an interface link library: ${gflags_interface_lib}")
         else()
             message(FATAL_ERROR "Dependency gflags does not have IMPORTED_LOCATION_${BUILD_TYPE}")
         endif()
-
+        remove_shared(gflags)
+        remove_pthread(gflags)
     else()
-        message(STATUS "config_result: ${config_result}")
-        message(STATUS "build_result: ${build_result}")
         message(FATAL_ERROR "gflags could not be downloaded.")
     endif()