SVN_SILENT made messages (.desktop file)

--- plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
+++ plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
@@ -7,6 +7,7 @@
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Morse-Verbindungsverwaltung verwenden.
 Comment[en_GB]=Custom account configuration user interface for accounts using the Morse connection manager.
 Comment[et]=Morse ühendusehaldurit kasutavate kontode kohandatud konto seadistamise kasutajaliides
+Comment[fi]=Morse-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
 Comment[fr]=Interface utilisateur personnalisée pour la configuration de comptes en utilisant le gestionnaire de connexions « Morse ».
 Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Morse.
 Comment[nb]=Brukerflate for å sette opp egendefinerte kontoer ved bruk av Morse tilkoblingsbehandler.


on Ubuntu define __GNUC_UBUNTU_VERSION__ when compiling with a distri GCC - to recognize extra quirks

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -53,6 +53,25 @@
             string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" Vc_GCC_VERSION "${Vc_GCC_VERSION}")
             message(STATUS "GCC Version from --version: ${Vc_GCC_VERSION}")
          endif()
+
+         # some distributions patch their GCC to be API incompatible to what the FSF released. In
+         # those cases we require a macro to identify the distribution version
+         find_program(_lsb_release lsb_release)
+         if(_lsb_release)
+            execute_process(COMMAND ${_lsb_release} -is OUTPUT_VARIABLE _distributor_id OUTPUT_STRIP_TRAILING_WHITESPACE)
+            execute_process(COMMAND ${_lsb_release} -rs OUTPUT_VARIABLE _distributor_release OUTPUT_STRIP_TRAILING_WHITESPACE)
+            string(TOUPPER "${_distributor_id}" _distributor_id)
+            if(_distributor_id STREQUAL "UBUNTU")
+               execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE _gcc_version)
+               string(REGEX MATCH "\\(.* ${Vc_GCC_VERSION}-([0-9]+).*\\)" _tmp "${_gcc_version}")
+               if(_tmp)
+                  set(_patch ${CMAKE_MATCH_1})
+                  string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _tmp "${_distributor_release}")
+                  execute_process(COMMAND printf 0x%x%02x%02x ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${_patch} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE _tmp)
+                  set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -D__GNUC_UBUNTU_VERSION__=${_tmp}")
+               endif()
+            endif()
+         endif()
       else()
          message(WARNING "Untested/-supported Compiler for use with Vc.\nPlease fill out the missing parts in the CMake scripts and submit a patch to http://code.compeng.uni-frankfurt.de/projects/vc")
       endif()


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

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

       vc_check_fpmath()


fptu-cmake: move LTO-handling after other CFLAGS preparations.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -363,6 +363,104 @@
   set(SHARED_LINKER_FLAGS ${INITIAL_CMAKE_SHARED_LINKER_FLAGS})
   set(STATIC_LINKER_FLAGS ${INITIAL_CMAKE_STATIC_LINKER_FLAGS})
   set(MODULE_LINKER_FLAGS ${INITIAL_CMAKE_MODULE_LINKER_FLAGS})
+
+  if(CC_HAS_FNO_COMMON)
+    add_compile_flags("C;CXX" "-fno-common")
+  endif()
+
+  if(CC_HAS_GGDB)
+    add_compile_flags("C;CXX" "-ggdb")
+  endif()
+
+  if(CC_HAS_WNO_UNKNOWN_PRAGMAS AND NOT HAVE_OPENMP)
+    add_compile_flags("C;CXX" -Wno-unknown-pragmas)
+  endif()
+
+  # We must set -fno-omit-frame-pointer here, since we rely
+  # on frame pointer when getting a backtrace, and it must
+  # be used consistently across all object files.
+  # The same reasoning applies to -fno-stack-protector switch.
+  if(ENABLE_BACKTRACE)
+    if(CC_HAS_FNO_OMIT_FRAME_POINTER)
+      add_compile_flags("C;CXX" "-fno-omit-frame-pointer")
+    endif()
+    if(CC_HAS_FNO_STACK_PROTECTOR)
+      add_compile_flags("C;CXX" "-fno-stack-protector")
+    endif()
+  endif()
+
+  # Set standard
+  if(HAVE_STD_C11)
+    add_compile_flags("C" "-std=c11")
+  elseif(HAVE_STD_GNU99)
+    add_compile_flags("C" "-std=gnu99")
+  elseif(HAVE_STD_C99 AND NOT MSVC)
+    add_compile_flags("C" "-std=c99")
+  endif()
+
+  if(HAVE_STD_CXX11 AND NOT MSVC)
+    add_compile_flags("CXX" "-std=c++11")
+  elseif(HAVE_STD_GNUXX0X)
+    add_compile_flags("CXX" "-std=gnu++0x")
+    add_definitions("-Doverride=")
+  endif()
+
+  if(MSVC)
+    if(MSVC_VERSION EQUAL 1910)
+      # LY: avoid /Wall for Visual Studio 2017, otherwise due a bug we could lost the control
+      #     and get a lot of junk warnings from compiler's and SDK headers.
+      add_compile_flags("C;CXX" "/W4")
+    else()
+      add_compile_flags("C;CXX" "/Wall")
+    endif()
+  elseif(CC_HAS_WALL)
+    add_compile_flags("C;CXX" "-Wall")
+  endif()
+  if(CC_HAS_WEXTRA)
+    add_compile_flags("C;CXX" "-Wextra")
+  endif()
+
+  if(CMAKE_COMPILER_IS_GNUCXX
+      AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
+    # G++ bug. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31488
+    add_compile_flags("CXX" "-Wno-invalid-offsetof")
+  endif()
+
+  add_definitions("-D__STDC_FORMAT_MACROS=1")
+  add_definitions("-D__STDC_LIMIT_MACROS=1")
+  add_definitions("-D__STDC_CONSTANT_MACROS=1")
+  add_definitions("-D_HAS_EXCEPTIONS=0")
+
+  # Only add -Werror if it's a debug build, done by developers.
+  # Release builds should not cause extra trouble.
+  if(CC_HAS_WERROR AND (CI OR CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
+    if(MSVC)
+      add_compile_flags("C;CXX" "/WX")
+    elseif(HAVE_STD_C11 AND HAVE_STD_CXX11)
+      add_compile_flags("C;CXX" "-Werror")
+    endif()
+  endif()
+
+  if(HAVE_OPENMP)
+    add_compile_flags("C;CXX" "-fopenmp")
+  endif()
+
+  if(ENABLE_GCOV)
+    if(NOT HAVE_GCOV)
+      message(FATAL_ERROR
+        "ENABLE_GCOV option requested but gcov library is not found")
+    endif()
+
+    add_compile_flags("C;CXX" "-fprofile-arcs" "-ftest-coverage")
+    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+    set(MODULE_LINKER_FLAGS "${MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+    # add_library(gcov SHARED IMPORTED)
+  endif()
+
+  if(ENABLE_GPROF)
+    add_compile_flags("C;CXX" "-pg")
+  endif()

   if(CMAKE_COMPILER_IS_GNUCC AND GCC_LTO_ENABLED)
     add_compile_flags("C;CXX" ${GCC_LTO_CFLAGS})
@@ -428,104 +526,6 @@
     set(MODULE_LINKER_FLAGS "${MODULE_LINKER_FLAGS} -flto -fverbose-asm")
   endif()

-  if(CC_HAS_FNO_COMMON)
-    add_compile_flags("C;CXX" "-fno-common")
-  endif()
-
-  if(CC_HAS_GGDB)
-    add_compile_flags("C;CXX" "-ggdb")
-  endif()
-
-  if(CC_HAS_WNO_UNKNOWN_PRAGMAS AND NOT HAVE_OPENMP)
-    add_compile_flags("C;CXX" -Wno-unknown-pragmas)
-  endif()
-
-  # We must set -fno-omit-frame-pointer here, since we rely
-  # on frame pointer when getting a backtrace, and it must
-  # be used consistently across all object files.
-  # The same reasoning applies to -fno-stack-protector switch.
-  if(ENABLE_BACKTRACE)
-    if(CC_HAS_FNO_OMIT_FRAME_POINTER)
-      add_compile_flags("C;CXX" "-fno-omit-frame-pointer")
-    endif()
-    if(CC_HAS_FNO_STACK_PROTECTOR)
-      add_compile_flags("C;CXX" "-fno-stack-protector")
-    endif()
-  endif()
-
-  # Set standard
-  if(HAVE_STD_C11)
-    add_compile_flags("C" "-std=c11")
-  elseif(HAVE_STD_GNU99)
-    add_compile_flags("C" "-std=gnu99")
-  elseif(HAVE_STD_C99 AND NOT MSVC)
-    add_compile_flags("C" "-std=c99")
-  endif()
-
-  if(HAVE_STD_CXX11 AND NOT MSVC)
-    add_compile_flags("CXX" "-std=c++11")
-  elseif(HAVE_STD_GNUXX0X)
-    add_compile_flags("CXX" "-std=gnu++0x")
-    add_definitions("-Doverride=")
-  endif()
-
-  if(MSVC)
-    if(MSVC_VERSION EQUAL 1910)
-      # LY: avoid /Wall for Visual Studio 2017, otherwise due a bug we could lost the control
-      #     and get a lot of junk warnings from compiler's and SDK headers.
-      add_compile_flags("C;CXX" "/W4")
-    else()
-      add_compile_flags("C;CXX" "/Wall")
-    endif()
-  elseif(CC_HAS_WALL)
-    add_compile_flags("C;CXX" "-Wall")
-  endif()
-  if(CC_HAS_WEXTRA)
-    add_compile_flags("C;CXX" "-Wextra")
-  endif()
-
-  if(CMAKE_COMPILER_IS_GNUCXX
-      AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
-    # G++ bug. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31488
-    add_compile_flags("CXX" "-Wno-invalid-offsetof")
-  endif()
-
-  add_definitions("-D__STDC_FORMAT_MACROS=1")
-  add_definitions("-D__STDC_LIMIT_MACROS=1")
-  add_definitions("-D__STDC_CONSTANT_MACROS=1")
-  add_definitions("-D_HAS_EXCEPTIONS=0")
-
-  # Only add -Werror if it's a debug build, done by developers.
-  # Release builds should not cause extra trouble.
-  if(CC_HAS_WERROR AND (CI OR CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
-    if(MSVC)
-      add_compile_flags("C;CXX" "/WX")
-    elseif(HAVE_STD_C11 AND HAVE_STD_CXX11)
-      add_compile_flags("C;CXX" "-Werror")
-    endif()
-  endif()
-
-  if(HAVE_OPENMP)
-    add_compile_flags("C;CXX" "-fopenmp")
-  endif()
-
-  if(ENABLE_GCOV)
-    if(NOT HAVE_GCOV)
-      message(FATAL_ERROR
-        "ENABLE_GCOV option requested but gcov library is not found")
-    endif()
-
-    add_compile_flags("C;CXX" "-fprofile-arcs" "-ftest-coverage")
-    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
-    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
-    set(MODULE_LINKER_FLAGS "${MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
-    # add_library(gcov SHARED IMPORTED)
-  endif()
-
-  if(ENABLE_GPROF)
-    add_compile_flags("C;CXX" "-pg")
-  endif()
-
   # LY: push C/CXX flags into the cache
   set(CMAKE_CXX_FLAGS ${CXX_FLAGS} CACHE STRING "Flags used by the C++ compiler during all build types" FORCE)
   set(CMAKE_C_FLAGS ${C_FLAGS} CACHE STRING "Flags used by the C compiler during all build types" FORCE)


feat(win): Add run after install

feat(win): Add run after install

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -101,6 +101,7 @@
 SET ( CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\hyperiond.exe")
 SET ( CPACK_NSIS_HELP_LINK "https://www.hyperion-project.org")
 SET ( CPACK_NSIS_URL_INFO_ABOUT "https://www.hyperion-project.org")
+SET ( CPACK_NSIS_MUI_FINISHPAGE_RUN "hyperiond.exe")
 # additional hyperiond startmenu link, won't be created if the user disables startmenu links
 SET ( CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Hyperion (Console).lnk' '$INSTDIR\\\\bin\\\\hyperiond.exe' '-d -c'")
 SET ( CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '$SMPROGRAMS\\\\$MUI_TEMP\\\\Hyperion (Console).lnk'")


Remove debug output

Remove debug output

--- Dependencies/cmake/InitSubmodules.cmake
+++ Dependencies/cmake/InitSubmodules.cmake
@@ -4,13 +4,10 @@

 message("===== Init submodules =====")

-message("++++ Running '${GIT_EXECUTABLE} submodule update --init' in ${CMAKE_CURRENT_SOURCE_DIR}")
 execute_process(
   COMMAND "${GIT_EXECUTABLE}" submodule update --init
   WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
 )

-
-
 message("===== Submodules initialized =====")


Fix the FindHypertable cmakefile.

Fix the FindHypertable cmakefile.

--- lib/FindHyperTable.cmake
+++ lib/FindHyperTable.cmake
@@ -24,7 +24,7 @@
 FIND_LIBRARY(HYPERTABLE_LIBRARY
 	NAMES
 		HyperCommon
-	PATH
+	PATHS
 		/usr/lib
 		/usr/local/lib
 		/usr/hypertable/0.9.2.4/lib


BUG: Use sourceforge to download PRCE

BUG: Use sourceforge to download PRCE

The official PCRF FTP is not available anymore.

--- SuperBuild/CMake/External_pcre.cmake
+++ SuperBuild/CMake/External_pcre.cmake
@@ -25,7 +25,7 @@
 else()
   ExternalProject_Add(PCRE
     PREFIX PCRE
-    URL "https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz"
+    URL "https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz"
     URL_MD5 3bcd2441024d00009a5fee43f058987c
     BINARY_DIR ${PCRE_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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


Update openvdb

Update openvdb

--- openvdb.cmake
+++ openvdb.cmake
@@ -21,9 +21,9 @@
 include (glfw)

 external_source (openvdb
-    0.99.0
-    openvdb_0_99_0_library.tgz
-    5aac825a3e42c26969f8c190ec5fd1a0
+    0.103.0
+    openvdb_0_103_0_library.tgz
+    143b3c0aa7d9525b4526640f19447dd3
     http://www.openvdb.org/download)

 set (OPENVDB_VALUES


cmake: Detect Qt4 hopefully. (please test).

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -80,6 +80,8 @@
 set(CMAKE_EXTRA_INCLUDE_FILES libc.h)
 vlc_check_functions_exist(fork)
 set(CMAKE_EXTRA_INCLUDE_FILES)
+
+check_library_exists(poll poll "" HAVE_POLL)

 check_c_source_compiles(
 "#include <langinfo.h>
@@ -328,6 +330,15 @@
   vlc_module_add_link_libraries(lua ${Lua_LIBRARIES})
 endif(Lua_FOUND)

+find_package(Qt4)
+if(Qt4_FOUND)
+  set(HAVE_QT4 TRUE)
+  vlc_check_include_files (qt.h)
+  vlc_enable_modules(qt4)
+  vlc_add_module_compile_flag(qt4 ${Qt4_CFLAGS} )
+  vlc_module_add_link_libraries(qt4 ${Qt4_LIBRARIES} Qt4)
+endif(Qt4_FOUND)
+
 set(CMAKE_REQUIRED_INCLUDES)

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


fix bug with handling CXX_STANDARD_REQUIRED

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -450,20 +450,16 @@
 		endforeach()
 	endif()
 	# handle language standard properties
-	if (_target)
-		get_target_property(_targetLanguageStandard ${_target} ${_language}_STANDARD)
-		get_target_property(_targetLanguageExtensions ${_target} ${_language}_EXTENSIONS)
-		get_target_property(_targetLanguageStandardRequired ${_target} ${_language}_STANDARD_REQUIRED)
-		if (_targetLanguageExtensions)
-			if (CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION)
-				list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION}")
-			endif()
-		elseif (_targetLanguageStandard)
-			if (_targetLanguageStandardRequired)
-				if (CMAKE_${_language}${_targetLanguageStandard}_STANDARD_COMPILE_OPTION)
-					list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_STANDARD_COMPILE_OPTION}")
-				endif()
-			else()
+	if (CMAKE_${_language}_STANDARD_DEFAULT)
+		# used compiler supports language standard levels
+		if (_target)
+			get_target_property(_targetLanguageStandard ${_target} ${_language}_STANDARD)
+			get_target_property(_targetLanguageExtensions ${_target} ${_language}_EXTENSIONS)
+			if (_targetLanguageExtensions)
+				if (CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION)
+					list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION}")
+				endif()
+			elseif (_targetLanguageStandard)
 				if (CMAKE_${_language}${_targetLanguageStandard}_EXTENSION_COMPILE_OPTION)
 					list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_EXTENSION_COMPILE_OPTION}")
 				endif()


Print an error message when Python is not found

--- cmake/gl3w.cmake
+++ cmake/gl3w.cmake
@@ -24,7 +24,7 @@
 # =============================================================================

 # gl3w needs Python to generate source files
-include(FindPythonInterp)
+find_package(PythonInterp REQUIRED)

 if (MSVC)
   set(GL3W_LIB_FILE "gl3w.lib")


CMake: Improve LLVM external project

CMake: Improve LLVM external project

- Fixes parallel building with make.
- Replaces deprecated property IMPORTED_LINK_INTERFACE_LIBRARIES.

--- cmake/llvm.cmake
+++ cmake/llvm.cmake
@@ -32,7 +32,7 @@
     else()
         # List of required LLVM libs.
         # Generated with `llvm-config --libs mcjit ipo x86codegen`
-        # Only used here locally to setup the "llvm-libs" imported target
+        # Only used here locally to setup the "llvm" imported target
         set(LIBS
             LLVMMCJIT
             LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMMCDisassembler LLVMX86AsmPrinter
@@ -52,6 +52,12 @@
             set(SYSTEM_LIBS pthread dl)
         endif()

+        if (${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
+            set(BUILD_COMMAND $(MAKE))
+        else()
+            set(BUILD_COMMAND cmake --build <BINARY_DIR> --config Release)
+        endif()
+
         include(ExternalProject)
         ExternalProject_Add(llvm-project
             PREFIX llvm
@@ -66,7 +72,7 @@
                        -DLLVM_TARGETS_TO_BUILD=X86
                        -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF
                        -DLLVM_INCLUDE_TESTS=OFF
-            BUILD_COMMAND   cmake --build <BINARY_DIR> --config Release
+            BUILD_COMMAND   ${BUILD_COMMAND}
             INSTALL_COMMAND cmake --build <BINARY_DIR> --config Release --target install
             EXCLUDE_FROM_ALL TRUE
         )
@@ -97,7 +103,7 @@
     set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_COMPILE_DEFINITIONS ${DEFINES})
     set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LLVM_INCLUDE_DIRS})
     set_property(TARGET ${TARGET_NAME} PROPERTY IMPORTED_LOCATION ${MAIN_LIB})
-    set_property(TARGET ${TARGET_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES ${LIBS})
+    set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_LINK_LIBRARIES ${LIBS})
     if (TARGET llvm-project)
         add_dependencies(${TARGET_NAME} llvm-project)
     endif()


ENH: Bump ITKUltrasound to 2015-05-15

ENH: Bump ITKUltrasound to 2015-05-15

--- SuperBuild/External_ITKUltrasound.cmake
+++ SuperBuild/External_ITKUltrasound.cmake
@@ -7,8 +7,8 @@
 set(${proj}_DEPENDENCIES )
 ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

-# master 2016-05-05
-set(${proj}_GIT_TAG 05de167661abef2b16a1085ec33dc924c066e6f5)
+# master 2016-05-25
+set(${proj}_GIT_TAG 5d8bb437908cda9769f05583edec43d2b0d1831d)
 ExternalProject_Add(${proj}
   ${${proj}_EP_ARGS}
   GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKUltrasound.git


don't enable LTO by default

don't enable LTO by default

--- cmake/LTO.cmake
+++ cmake/LTO.cmake
@@ -48,7 +48,7 @@

 cmake_minimum_required(VERSION 3.0)

-option(ENABLE_LTO "enable link time optimization (GCC/CLANG)" ON)
+option(ENABLE_LTO "enable link time optimization (GCC/CLANG)" OFF)

 macro(find_lto lang)
     if(ENABLE_LTO AND NOT LTO_${lang}_CHECKED)


Support for discovering lunchbox optional modules

--- FindLunchbox.cmake
+++ FindLunchbox.cmake
@@ -75,3 +75,6 @@
 find_library_package(Lunchbox INCLUDE lunchbox)
 find_package_handle_standard_args(Lunchbox DEFAULT_MSG
                                   LUNCHBOX_LIBRARIES LUNCHBOX_INCLUDE_DIRS)
+if(LUNCHBOX_FOUND)
+  include("${LUNCHBOX_LIBRARY_DIRS}/../share/Lunchbox/CMake/options.cmake")
+endif()


Updated openslide sha

Updated openslide sha

--- cmake/ModuleWholeSlideImaging.cmake
+++ cmake/ModuleWholeSlideImaging.cmake
@@ -24,7 +24,7 @@
         )
         fast_download_dependency(openslide
                 3.4.1
-                6cd181e43057d8f67b31a71239fd3295a3ee43baaaedce827b8570ba95478ea2
+                a39521846a132b0c375047150e108e5ccbaa1d4f1d8cc36350bd36fb60889841
                 libopenslide.so
         )
     endif()


fix for old versions of msvc

fix for old versions of msvc

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -451,7 +451,8 @@
       _enable_or_disable(AVX512IFMA "avx512ifma" "Use AVX512IFMA." false)
       _enable_or_disable(AVX512VBMI "avx512vbmi" "Use AVX512VBMI." false)

-      if(MSVC)
+      #if(MSVC)
+      if(MSVC AND MSVC_VERSION GREATER 1700) # G+Smo: VS 11
          # MSVC on 32 bit can select /arch:SSE2 (since 2010 also /arch:AVX)
          # MSVC on 64 bit cannot select anything (should have changed with MSVC 2010)
          _my_find(_enable_vector_unit_list "avx2" _found)


[clang-fuzzer] Fix incremental builds of the fuzzer

Summary:
Don't use BUILD_IN_SOURCE keep git checkout clean
Don't forward CMAKE_GENERATOR as ExternalProject_Add should do it already
Reset UPDATE_COMMAND to avoid git checkout updates on each build

Reviewers: kcc, morehouse

Subscribers: cfe-commits, mgorny

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

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

--- cmake/modules/ProtobufMutator.cmake
+++ cmake/modules/ProtobufMutator.cmake
@@ -1,23 +1,18 @@
 set(PBM_PREFIX protobuf_mutator)
 set(PBM_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PBM_PREFIX}/src/${PBM_PREFIX})
-set(PBM_LIB_PATH ${PBM_PATH}/src/libprotobuf-mutator.a)
-set(PBM_FUZZ_LIB_PATH ${PBM_PATH}/src/libfuzzer/libprotobuf-mutator-libfuzzer.a)
+set(PBM_LIB_PATH ${PBM_PATH}-build/src/libprotobuf-mutator.a)
+set(PBM_FUZZ_LIB_PATH ${PBM_PATH}-build/src/libfuzzer/libprotobuf-mutator-libfuzzer.a)

 ExternalProject_Add(${PBM_PREFIX}
   PREFIX ${PBM_PREFIX}
   GIT_REPOSITORY https://github.com/google/libprotobuf-mutator.git
   GIT_TAG master
-  CONFIGURE_COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR}
-    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-  BUILD_COMMAND ${CMAKE_MAKE_PROGRAM}
+  CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+  CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+                   -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
   BUILD_BYPRODUCTS ${PBM_LIB_PATH} ${PBM_FUZZ_LIB_PATH}
-  BUILD_IN_SOURCE 1
+  UPDATE_COMMAND ""
   INSTALL_COMMAND ""
-  LOG_DOWNLOAD 1
-  LOG_CONFIGURE 1
-  LOG_BUILD 1
   )

 set(ProtobufMutator_INCLUDE_DIRS ${PBM_PATH})


[gardening] Fix documentation thinko.

[gardening] Fix documentation thinko.

I was re-reading this documentation and noticed an obvious 'thinko'. This is NFC
since I am just updating the comment.

--- cmake/modules/SwiftComponents.cmake
+++ cmake/modules/SwiftComponents.cmake
@@ -34,7 +34,7 @@
 # 3. A "build" component is a "include" component that cmake will add to the
 # "all" target. This means that cmake will add this component to the "all"
 # target causing it to be built by default when one invokes a build tool. On the
-# other hand, the component is not guaranteed to be built by default.
+# other hand, the component is not guaranteed to be installed by default.
 #
 # 4. A "install" component is a "build" component that will have targets
 # generated by default, will be built by default, and will be installed by


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   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 09)

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


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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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

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


400 kHz i2C for Wire library

400 kHz i2C for Wire library

--- Arduino.cmake
+++ Arduino.cmake
@@ -84,6 +84,11 @@
 # core library sources
 if (ARDUINO_CORE_LIBRARIES)
     foreach(ARDUINO_CORE_LIB_NAME ${ARDUINO_CORE_LIBRARIES})
+        # 400 kHz i2C if Wire library is used
+        if (ARDUINO_CORE_LIB_NAME STREQUAL "Wire")
+            set(CMAKE_CXX_FLAGS "-DTWI_FREQ=400000L ${CMAKE_CXX_FLAGS}")
+            set(CMAKE_C_FLAGS "-DTWI_FREQ=400000L ${CMAKE_C_FLAGS}")
+        endif()
         include("ArduinoLibrary${ARDUINO_CORE_LIB_NAME}")
     endforeach()
 endif()


applied patch from #3275

applied patch from #3275

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -411,7 +411,7 @@
   # Gather the gtest build flags, for use when building unit tests.  We
   # don't require the user to declare a dependency on gtest.
   #
-  find_program(GTEST_EXE NAMES gtest-config DOC "gtest-config executable")
+  find_program(GTEST_EXE NAMES gtest-config DOC "gtest-config executable" ONLY_CMAKE_FIND_ROOT_PATH)
   if (NOT GTEST_EXE)
     set(_gtest_LIBRARIES -lgtest)
     # Couldn't find gtest-config. Hoping that gtest is in our path either in the system install or where ROS_BINDEPS points to


Fix/Workaround for #866 (#899)

Fix/Workaround for #866 (#899)

Resolves linking issue on Linux

--- toonz/cmake/FindLZO.cmake
+++ toonz/cmake/FindLZO.cmake
@@ -33,12 +33,14 @@
         ${_header_suffixes}
 )

+# List dynamic library 'so' first
+# since static has issues on some systems, see: #866
 find_library(
     LZO_LIBRARY
     NAMES
+        liblzo2.so
         liblzo2.a
         lzo2_64.lib
-        liblzo2.so
     HINTS
         ${_lib_hints}
     PATH_SUFFIXES


Find the protobuf version automatically

Find the protobuf version automatically

--- tensorflow_cc/cmake/ProtobufExternal.cmake
+++ tensorflow_cc/cmake/ProtobufExternal.cmake
@@ -1,4 +1,18 @@
-set(PROTOBUF_ARCHIVE https://github.com/protocolbuffers/protobuf/archive/v3.9.2.zip)
+# Find the proper protobuf archive url.
+file(DOWNLOAD
+  "https://raw.githubusercontent.com/tensorflow/tensorflow/${TENSORFLOW_TAG}/tensorflow/workspace2.bzl"
+  "${CMAKE_CURRENT_BINARY_DIR}/tmp/workspace2.bzl"
+)
+file(READ
+  "${CMAKE_CURRENT_BINARY_DIR}/tmp/workspace2.bzl"
+  workspace2_str
+)
+string(REGEX MATCH
+  "https://github.com/protocolbuffers/protobuf/archive/v[.0-9]+.zip"
+  PROTOBUF_ARCHIVE
+  "${workspace2_str}"
+)
+message("Will build Protobuf from '${PROTOBUF_ARCHIVE}'.")

 ExternalProject_Add(
   protobuf-external


FIX (#4432): use SHARED_LIBRARY_SUFFIX for QT plugins

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -527,14 +527,14 @@
           DESTINATION ${plugin_dest_dir}
 		  CONFIGURATIONS Release

-		  FILES_MATCHING REGEX "[^d]4\\.dll$"
+		  FILES_MATCHING REGEX "[^d]4?\\${CMAKE_SHARED_LIBRARY_SUFFIX}$"
 		  )

   INSTALL(DIRECTORY "${QT_PLUGINS_DIR}"
           DESTINATION ${plugin_dest_dir}
 		  CONFIGURATIONS Debug

-		  FILES_MATCHING PATTERN "*d4.dll"
+		  FILES_MATCHING REGEX "d4?\\${CMAKE_SHARED_LIBRARY_SUFFIX}$"
 		  )

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


[cmake] make WASM_TOOLCHAIN mandatory (for a while)

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -1,7 +1,11 @@
-find_package(Wasm REQUIRED)
+find_package(Wasm)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(WASM_TOOLCHAIN DEFAULT_MSG WASM_FOUND)
+
+if (NOT WASM_TOOLCHAIN_FOUND)
+    return()
+endif()

 macro(compile_wast)
   #read arguments include ones that we don't since arguments get forwared "as is" and we don't want to threat unknown argument names as values


Apply quoting: EXT_CXX_FLAGS & EXT_C_FLAGS

--- external/External.cmake
+++ external/External.cmake
@@ -47,8 +47,8 @@
     set (EXT_CXX_FLAGS)
     set (EXT_C_FLAGS)
 elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-    set (EXT_CXX_FLAGS -w -fPIC)
-    set (EXT_C_FLAGS   -w -fPIC)
+    set (EXT_CXX_FLAGS "-fPIC -w")
+    set (EXT_C_FLAGS   "-fPIC -w")
 endif ()

 ###########


Bug#11766815 INVALID SYSTEM CHECK TIME_T_UNSIGNED

The check for unsigned time_t failed, on all platforms, due to missing #include.

from CMakeFiles/CMakeError.log
with this patch: error: size of array array is negative
without this patch: error: time_t undeclared (first use in this function)

--- configure.cmake
+++ configure.cmake
@@ -1,5 +1,4 @@
-
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -603,6 +602,7 @@

 # check whether time_t is unsigned
 CHECK_C_SOURCE_COMPILES("
+#include <time.h>
 int main()
 {
   int array[(((time_t)-1) > 0) ? 1 : -1];


MDEV-10117 - update HeidiSQL to current version

--- win/packaging/heidisql.cmake
+++ win/packaging/heidisql.cmake
@@ -1,4 +1,4 @@
-SET(HEIDISQL_BASE_NAME "HeidiSQL_9.1_Portable")
+SET(HEIDISQL_BASE_NAME "HeidiSQL_9.3_Portable")
 SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
 SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}")
 SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})


Add suffix to release tag

Add suffix to release tag

--- cmake/modules/hunter_download_cache_raw_file.cmake
+++ cmake/modules/hunter_download_cache_raw_file.cmake
@@ -74,7 +74,8 @@
       if(NOT is_github)
         set(url "${server}/raw/${suffix}")
       else()
-        set(url "${server}/releases/download/cache/${suffix}")
+        string(SUBSTRING "${suffix}" 0 7 cache_tag)
+        set(url "${server}/releases/download/cache-${cache_tag}/${suffix}")
       endif()

       hunter_status_debug("Downloading file (try #${x} of ${total_retry}):")


Separate c and c++ warning requirements

Separate c and c++ warning requirements

We require -Wnon-virtual-dtor which is only applicable for c++ targets.
This patch makes c compiler happy.

Signed-off-by: Dmitry Rogozhkin <01f0df9cc32cbf6a7f0faa5c8376e6cf28354d70@intel.com>

--- builder/FindGlobals.cmake
+++ builder/FindGlobals.cmake
@@ -90,10 +90,11 @@
     set(no_warnings "-Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-unused")
   endif()

-  set(warnings "-Wall -Wformat -Wformat-security -Wnon-virtual-dtor")
+  set(c_warnings "-Wall -Wformat -Wformat-security")
+  set(cxx_warnings "${c_warnings} -Wnon-virtual-dtor")

-  set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -pipe -fPIC ${warnings} ${no_warnings}")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fPIC ${warnings} ${no_warnings}")
+  set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -pipe -fPIC ${c_warnings} ${no_warnings}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fPIC ${cxx_warnings} ${no_warnings}")
   append("-fPIE -pie" CMAKE_EXEC_LINKER_FLAGS)

   # CACHE + FORCE should be used only here to make sure that this parameters applied globally


Add NO_INSTALL option.

Add NO_INSTALL option.

	* build-aux/cmake/modules/Gostai.cmake (gostai_add_library): Here.

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -432,7 +432,7 @@
   parse_arguments(
     ${name}
     "SOURCES;MOCS;UIS;CPPFLAGS;INCLUDE_DIRS;LIBRARIES;RESOURCES"
-    "QTPLUGIN"
+    "QTPLUGIN;NO_INSTALL"
     ${ARGN})

   # =================== #
@@ -513,17 +513,21 @@
   # Install files #
   # ============= #

-  if(${name}_QTPLUGIN)
-    install(TARGETS ${name} DESTINATION ${PLUGINS_DIR})
-  else(${name}_QTPLUGIN)
-    install(TARGETS ${name} DESTINATION ${LIBRARIES_DIR})
-  endif(${name}_QTPLUGIN)
+  if(NOT ${name}_NO_INSTALL)
+    if(${name}_QTPLUGIN)
+      install(TARGETS ${name} DESTINATION ${PLUGINS_DIR})
+    else(${name}_QTPLUGIN)
+      install(TARGETS ${name} DESTINATION ${LIBRARIES_DIR})
+    endif(${name}_QTPLUGIN)
+  endif(NOT ${name}_NO_INSTALL)

   # ========================== #
   # Deploy dependent libraries #
   # ========================== #

-  dldep_install(${name})
+  if(NOT ${name}_NO_INSTALL)
+    dldep_install(${name})
+  endif(NOT ${name}_NO_INSTALL)

 endfunction(gostai_add_library name)


BUG: incorrect arg name

BUG: incorrect arg name

--- Packaging/testing.cmake
+++ Packaging/testing.cmake
@@ -20,7 +20,7 @@
   set(selftester_CMD ${pkg_extracted_dir}/tools/selftester.bat)
   set(selftester_ARGS "/q")
 else()
-  set(install_package_ARGS "--target;${pkg_extracted_dir};--no-progress")
+  set(install_package_ARGS "--noprogress;--target;${pkg_extracted_dir}")
   set(install_package_CMD "${PACKAGE_OUTPUT_FILE}")
   #selftester
   set(selftester_CMD ${pkg_extracted_dir}/tools/selftester.sh)


Reintroduce find_package(Git) call in project template

--- Applications/PluginGenerator/ProjectTemplate/SuperBuild.cmake
+++ Applications/PluginGenerator/ProjectTemplate/SuperBuild.cmake
@@ -12,6 +12,8 @@
 if(EXTERNAL_MITK_DIR)
   set(MITK_DIR ${EXTERNAL_MITK_DIR})
 endif()
+
+find_package(Git REQUIRED)

 #-----------------------------------------------------------------------------
 # External project settings


qibuild update

qibuild update

--- qibuild.cmake
+++ qibuild.cmake
@@ -6,89 +6,16 @@
 # This file is part of the qibuild project    #
 ###############################################

-set(QIBUILD_BOOTSTRAP_VERSION 8)
+set(QIBUILD_BOOTSTRAP_VERSION 9)

-
-##
-# Create a use_qibuild.cmake file in CMAKE_BINARY_DIR,
-# and include it.
-# This allow us to find all qibuild/qibuild.cmake
-function(bootstrap)
-  find_program(PYTHON_EXECUTABLE NAMES python2 python python.exe
-    PATHS
-      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
-      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
-  )
-
-
-  if(NOT PYTHON_EXECUTABLE)
-    message(STATUS
-      "
-      Could not find python executable.
-
-      Please check your setup.
-
-      "
-    )
-    message(FATAL_ERROR "")
-  endif()
-
-  get_filename_component(_python_root ${PYTHON_EXECUTABLE} PATH)
-  find_program(QI_BUILD_EXECUTABLE NAMES qibuild.py qibuild
-    PATHS
-      "${_python_root}/Scripts"
-  )
-
-  if(NOT QI_BUILD_EXECUTABLE)
-    message(STATUS
-      "
-      Could not find qibuild executable.
-
-      Please check your setup.
-
-      "
-    )
-    message(FATAL_ERROR "")
-  endif()
-  set(_cmd ${PYTHON_EXECUTABLE} ${QI_BUILD_EXECUTABLE})
-  set(_cmd ${_cmd} configure --single --bootstrap "--build-directory=${CMAKE_BINARY_DIR}")
-  execute_process(
-      COMMAND ${_cmd}
-      RESULT_VARIABLE  _retcode
-      OUTPUT_VARIABLE  _stdout
-      ERROR_VARIABLE   _stderr
-      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-      )
-  if(NOT ${_retcode} EQUAL 0)
-    message(STATUS
-        "
-        qibuild bootstrap fail!
-        Log:
-        ====
-        ${_cmd}
-        ${_stdout}
-        ${_stderr}
-
-        ===
-
-        Please file a bug report with a comple CMake log
-        "
-    )
-      message(FATAL_ERROR "")
-  endif()
-endfunction()
-
-
-include(qibuild/general OPTIONAL RESULT_VARIABLE _qibuild_found)
-if(_qibuild_found)
-  return()
+# Someone used qibuild and generated a dependencies.cmake
+# file (for the dependencies and where to find qibuild/cmake file),
+# so just use it.
+if(EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
+  include(${CMAKE_BINARY_DIR}/dependencies.cmake)
 endif()

-if(NOT EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
-  bootstrap()
-endif()
-
-include(${CMAKE_BINARY_DIR}/dependencies.cmake)
-
-
+# Someone called cmake with a toolchain file that is
+# able to find qibuild/cmake code, so just include it.
+# Else, fail loudly.
 include(qibuild/general)


fix issue with nsync which copies the headers every build

reworked nsync to be like png and zlib cmake files.
it copied the nsync headers on every build and this triggered rebuild of the whole tensorflow project

--- tensorflow/contrib/cmake/external/nsync.cmake
+++ tensorflow/contrib/cmake/external/nsync.cmake
@@ -20,14 +20,6 @@
 set(nsync_BUILD ${CMAKE_CURRENT_BINARY_DIR}/nsync/src/nsync)
 set(nsync_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/nsync/install)

-# put nsync includes in the directory where they are expected
-add_custom_target(nsync_create_destination_dir
-    COMMAND ${CMAKE_COMMAND} -E make_directory ${nsync_INCLUDE_DIR}
-    DEPENDS nsync)
-
-add_custom_target(nsync_copy_headers_to_destination
-    DEPENDS nsync_create_destination_dir)
-
 if(WIN32)
   set(nsync_HEADERS "${nsync_BUILD}/public/*.h")
   set(nsync_STATIC_LIBRARIES ${nsync_INSTALL}/lib/nsync.lib)
@@ -49,7 +41,35 @@
         -DCMAKE_BUILD_TYPE:STRING=Release
         -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
         -DCMAKE_INSTALL_PREFIX:STRING=${nsync_INSTALL}
-	-DNSYNC_LANGUAGE:STRING=c++11)
+    -DNSYNC_LANGUAGE:STRING=c++11)

-add_custom_command(TARGET nsync_copy_headers_to_destination PRE_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${nsync_INSTALL}/include/ ${nsync_INCLUDE_DIR}/)
+set(nsync_HEADERS
+    "${nsync_INSTALL}/include/nsync.h"
+    "${nsync_INSTALL}/include/nsync_atomic.h"
+    "${nsync_INSTALL}/include/nsync_counter.h"
+    "${nsync_INSTALL}/include/nsync_cpp.h"
+    "${nsync_INSTALL}/include/nsync_cv.h"
+    "${nsync_INSTALL}/include/nsync_debug.h"
+    "${nsync_INSTALL}/include/nsync_mu.h"
+    "${nsync_INSTALL}/include/nsync_mu_wait.h"
+    "${nsync_INSTALL}/include/nsync_note.h"
+    "${nsync_INSTALL}/include/nsync_once.h"
+    "${nsync_INSTALL}/include/nsync_time.h"
+    "${nsync_INSTALL}/include/nsync_time_internal.h"
+    "${nsync_INSTALL}/include/nsync_waiter.h"
+)
+
+# put nsync includes in the directory where they are expected
+add_custom_target(nsync_create_destination_dir
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${nsync_INCLUDE_DIR}
+    DEPENDS nsync)
+
+add_custom_target(nsync_copy_headers_to_destination
+    DEPENDS nsync_create_destination_dir)
+
+foreach(header_file ${nsync_HEADERS})
+  add_custom_command(TARGET nsync_copy_headers_to_destination PRE_BUILD
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different ${header_file} ${nsync_INCLUDE_DIR}/)
+endforeach()
+
+


Cleanup FindGflags & use installed gflags CMake config if present.

- Split out gflags namespace detection methods:
  check_cxx_source_compiles() & regex, into separate functions.
- Use installed/exported gflags CMake configuration (present for
  versions >= 2.1) if available, unless user expresses a preference not
  to, or specifies search directories, in which case fall back to manual
  search for components.
-- Prefer installed gflags CMake configurations over exported gflags
   build directories on all OSs.
- Remove custom version of check_cxx_source_compiles() that attempted
  to force the build type of the test project.  This only worked for
  NMake on Windows, not MSVC as msbuild ignored our attempts to force
  the build type.  Now we always use the regex method on Windows if
  we cannot find an installed gflags CMake configuration which works
  even on MSVC by bypassing msbuild.
- Add default search paths for gflags on Windows.

Change-Id: I083b267d97a7a5838a1314f3d41a61ae48d5a2d7

--- cmake/FindGflags.cmake
+++ cmake/FindGflags.cmake
@@ -31,6 +31,12 @@

 # FindGflags.cmake - Find Google gflags logging library.
 #
+# This module will attempt to find gflags, either via an exported CMake
+# configuration (generated by gflags >= 2.1 which are built with CMake), or
+# by performing a standard search for all gflags components.  The order of
+# precedence for these two methods of finding gflags is controlled by:
+# GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION.
+#
 # This module defines the following variables:
 #
 # GFLAGS_FOUND: TRUE iff gflags is found.
@@ -42,8 +48,19 @@
 #                   gflags to be something else (i.e. google for legacy
 #                   compatibility).
 #
-# The following variables control the behaviour of this module:
-#
+# The following variables control the behaviour of this module when an exported
+# gflags CMake configuration is not found.
+#
+# GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION: TRUE/FALSE, iff TRUE then
+#                           then prefer using an exported CMake configuration
+#                           generated by gflags >= 2.1 over searching for the
+#                           gflags components manually.  Otherwise (FALSE)
+#                           ignore any exported gflags CMake configurations and
+#                           always perform a manual search for the components.
+#                           Default: TRUE iff user does not define this variable
+#                           before we are called, and does NOT specify either
+#                           GFLAGS_INCLUDE_DIR_HINTS or GFLAGS_LIBRARY_DIR_HINTS
+#                           otherwise FALSE.
 # GFLAGS_INCLUDE_DIR_HINTS: List of additional directories in which to
 #                           search for gflags includes, e.g: /timbuktu/include.
 # GFLAGS_LIBRARY_DIR_HINTS: List of additional directories in which to
@@ -65,8 +82,8 @@
 # GFLAGS_LIBRARY: gflags library, not including the libraries of any
 #                 dependencies.

-# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when
-# FindGflags was invoked.
+# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when FindGflags was
+# invoked, necessary for MSVC.
 MACRO(GFLAGS_RESET_FIND_LIBRARY_PREFIX)
   IF (MSVC)
     SET(CMAKE_FIND_LIBRARY_PREFIXES "${CALLERS_CMAKE_FIND_LIBRARY_PREFIXES}")
@@ -106,311 +123,397 @@
   ENDIF ()
 ENDMACRO(GFLAGS_REPORT_NOT_FOUND)

-# A cut down version of CMake's check_cxx_source_compiles() macro, which
-# supports specification of the CMAKE_BUILD_TYPE with which the test should
-# be compiled (but not REGEX matching of the output).  This is important
-# on Windows, for at least the NMake generator, which otherwise chooses
-# Debug, when the gflags library will typically be compiled in Release, and
-# MSVC will then fail to build, thus making all check_cxx_source_compiles()
-# tests fail.
-#
-# As per the CMake check_cxx_source_compiles() macro, we assume the following
-# variables can be set before this is invoked:
-#
-#    CMAKE_REQUIRED_FLAGS - String of compile command line flags.
-#    CMAKE_REQUIRED_DEFINITIONS - List of macros to define (-DFOO=bar).
-#    CMAKE_REQUIRED_INCLUDES - List of include directories.
-#    CMAKE_REQUIRED_LIBRARIES - List of libraries to link.
-#
-# This macro is a derivative of the CMake check_cxx_source_compiles() macro
-# distributed under the BSD License, Copyright 2005-2009 Kitware, Inc.
-MACRO(CHECK_CXX_SOURCE_COMPILES_WITH_BUILD_TYPE
-    SOURCE BUILD_TYPE VAR)
-  # Do not rerun test if output variable has an assigned value, ie is not
-  # an empty string.
-  IF ("${VAR}" MATCHES "^${VAR}$")
-    # Verify that the BUILD_TYPE is sane.
-    IF (NOT "${BUILD_TYPE}" STREQUAL "Release" AND
-        NOT "${BUILD_TYPE}" STREQUAL "Debug" AND
-        NOT "${BUILD_TYPE}" STREQUAL "RelWithDebInfo" AND
-        NOT "${BUILD_TYPE}" STREQUAL "MinSizeRel" AND
-        NOT "${BUILD_TYPE}" STREQUAL "")
-      MESSAGE(FATAL_ERROR "Invalid BUILD_TYPE: ${BUILD_TYPE}, is not a "
-        "valid CMAKE_BUILD_TYPE option.")
+# Verify that all variable names passed as arguments are defined (can be empty
+# but must be defined) or raise a fatal error.
+MACRO(GFLAGS_CHECK_VARS_DEFINED)
+  FOREACH(CHECK_VAR ${ARGN})
+    IF (NOT DEFINED ${CHECK_VAR})
+      MESSAGE(FATAL_ERROR "Ceres Bug: ${CHECK_VAR} is not defined.")
     ENDIF()
-
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
-      "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
-
-    SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
-    IF (CMAKE_REQUIRED_LIBRARIES)
-      SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
-        LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
-    ENDIF()
-
-    SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
-    IF (CMAKE_REQUIRED_INCLUDES)
-      SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
-        "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
-    ENDIF()
-
-    FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
-      "${SOURCE}\n")
-
-    MESSAGE(STATUS "Performing Test ${VAR}")
-    # Pass the CMAKE_BUILD_TYPE to the CMake test project created to execute
-    # the test (main difference over CMake's check_cxx_source_compiles() macro).
-    TRY_COMPILE(${VAR}
-      ${CMAKE_BINARY_DIR}
-      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
-      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-      ${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}
-      CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-      "-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE}"
-      "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
-      OUTPUT_VARIABLE OUTPUT)
-
-    IF (${VAR})
-      MESSAGE(STATUS "Performing Test ${VAR} - Success")
-      SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
-        "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
-        "${OUTPUT}\n"
-        "Source file was:\n${SOURCE}\n")
-    ELSE()
-      MESSAGE(STATUS "Performing Test ${VAR} - Failed")
-      SET(${VAR} "" CACHE INTERNAL "Test ${VAR}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
-        "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
-        "${OUTPUT}\n"
-        "Source file was:\n${SOURCE}\n")
-    ENDIF()
-  ENDIF()
-ENDMACRO()
-
-# Handle possible presence of lib prefix for libraries on MSVC, see
-# also GFLAGS_RESET_FIND_LIBRARY_PREFIX().
-IF (MSVC)
-  # Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES
-  # s/t we can set it back before returning.
-  SET(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
-  # The empty string in this list is important, it represents the case when
-  # the libraries have no prefix (shared libraries / DLLs).
-  SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "" "${CMAKE_FIND_LIBRARY_PREFIXES}")
-ENDIF (MSVC)
-
-# Search user-installed locations first, so that we prefer user installs
-# to system installs where both exist.
-#
-# TODO: Add standard Windows search locations for gflags.
-LIST(APPEND GFLAGS_CHECK_INCLUDE_DIRS
-  /usr/local/include
-  /usr/local/homebrew/include # Mac OS X
-  /opt/local/var/macports/software # Mac OS X.
-  /opt/local/include
-  /usr/include)
-LIST(APPEND GFLAGS_CHECK_LIBRARY_DIRS
-  /usr/local/lib
-  /usr/local/homebrew/lib # Mac OS X.
-  /opt/local/lib
-  /usr/lib)
-
-# Search supplied hint directories first if supplied.
-FIND_PATH(GFLAGS_INCLUDE_DIR
-  NAMES gflags/gflags.h
-  PATHS ${GFLAGS_INCLUDE_DIR_HINTS}
-  ${GFLAGS_CHECK_INCLUDE_DIRS})
-IF (NOT GFLAGS_INCLUDE_DIR OR
-    NOT EXISTS ${GFLAGS_INCLUDE_DIR})
-  GFLAGS_REPORT_NOT_FOUND(
-    "Could not find gflags include directory, set GFLAGS_INCLUDE_DIR "
-    "to directory containing gflags/gflags.h")
-ENDIF (NOT GFLAGS_INCLUDE_DIR OR
-       NOT EXISTS ${GFLAGS_INCLUDE_DIR})
-
-FIND_LIBRARY(GFLAGS_LIBRARY NAMES gflags
-  PATHS ${GFLAGS_LIBRARY_DIR_HINTS}
-  ${GFLAGS_CHECK_LIBRARY_DIRS})
-IF (NOT GFLAGS_LIBRARY OR
-    NOT EXISTS ${GFLAGS_LIBRARY})
-  GFLAGS_REPORT_NOT_FOUND(
-    "Could not find gflags library, set GFLAGS_LIBRARY "
-    "to full path to libgflags.")
-ENDIF (NOT GFLAGS_LIBRARY OR
-       NOT EXISTS ${GFLAGS_LIBRARY})
-
-# gflags typically requires a threading library (which is OS dependent), note
-# that this defines the CMAKE_THREAD_LIBS_INIT variable.  If we are able to
-# detect threads, we assume that gflags requires it.
-FIND_PACKAGE(Threads QUIET)
-SET(GFLAGS_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-# On Windows (including MinGW), the Shlwapi library is used by gflags if
-# available.
-IF (WIN32)
-  INCLUDE(CheckIncludeFileCXX)
-  CHECK_INCLUDE_FILE_CXX("shlwapi.h" HAVE_SHLWAPI)
-  IF (HAVE_SHLWAPI)
-    LIST(APPEND GFLAGS_LINK_LIBRARIES shlwapi.lib)
-  ENDIF(HAVE_SHLWAPI)
-ENDIF (WIN32)
-
-# Mark internally as found, then verify. GFLAGS_REPORT_NOT_FOUND() unsets
-# if called.
-SET(GFLAGS_FOUND TRUE)
-
-# Identify what namespace gflags was built with.
-IF (GFLAGS_INCLUDE_DIR AND NOT GFLAGS_NAMESPACE)
-  # To handle Windows peculiarities / CMake bugs on MSVC we try two approaches
-  # to detect the gflags namespace:
-  #
-  # 1) Try to use a custom version of check_cxx_source_compiles():
-  #    check_cxx_source_compiles_with_build_type(),
-  #    to compile a trivial program with the two choices for the gflags
-  #    namespace.
-  #
-  #    This works on all OSs except Windows.  On Windows, if using NMake
-  #    generator the previous method also works, if using Visual Studio, it does
-  #    not, because our explicit instruction regarding the CMAKE_BUILD_TYPE is
-  #    ignored by msbuild.  This breaks detection because MSVC requires that the
-  #    build type of the test project used by check_cxx_source_compiles() match
-  #    that of gflags.  However, msbuild forces the test project to use Debug,
-  #    but gflags will be built in Release.
-  #
-  # 2) [In the event 1) fails] Use regex on the gflags.h header file to try to
-  #    determine the gflags namespace.  Whilst this is less robust than 1),
-  #    it does avoid any interaction with msbuild.
-
-  # On Windows, it is required that the build type of the test app match that
-  # of gflags, as CMAKE_BUILD_TYPE may not be defined when this is called, we
-  # try each in turn.
-  LIST(APPEND TEST_BUILD_TYPES Release Debug)
-  FOREACH(BUILD_TYPE ${TEST_BUILD_TYPES})
-    STRING(TOUPPER "${BUILD_TYPE}" BUILD_TYPE_UPPERCASE)
-    # Setup include path & link library for gflags for CHECK_CXX_SOURCE_COMPILES.
-    SET(CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
-    SET(CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
-    # First try the (older) google namespace.  Note that the output variable
-    # MUST be unique to the build type as otherwise the test is not repeated as
-    # it is assumed to have already been performed.
-    CHECK_CXX_SOURCE_COMPILES_WITH_BUILD_TYPE(
-      "#include <gflags/gflags.h>
+  ENDFOREACH()
+ENDMACRO(GFLAGS_CHECK_VARS_DEFINED)
+
+# Use check_cxx_source_compiles() to compile trivial test programs to determine
+# the gflags namespace.  This works on all OSs except Windows.  If using Visual
+# Studio, it fails because msbuild forces check_cxx_source_compiles() to use
+# CMAKE_BUILD_TYPE=Debug for the test project, which usually breaks detection
+# because MSVC requires that the test project use the same build type as gflags,
+# which would normally be built in Release.
+#
+# Defines: GFLAGS_NAMESPACE in the caller's scope with the detected namespace,
+#          which is blank (empty string, will test FALSE is CMake conditionals)
+#          if detection failed.
+FUNCTION(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_TRY_COMPILE)
+  # Verify that all required variables are defined.
+  GFLAGS_CHECK_VARS_DEFINED(
+    GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)
+  # Ensure that GFLAGS_NAMESPACE is always unset on completion unless
+  # we explicitly set if after having the correct namespace.
+  SET(GFLAGS_NAMESPACE "" PARENT_SCOPE)
+
+  INCLUDE(CheckCXXSourceCompiles)
+  # Setup include path & link library for gflags for CHECK_CXX_SOURCE_COMPILES.
+  SET(CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
+  SET(CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
+  # First try the (older) google namespace.  Note that the output variable
+  # MUST be unique to the build type as otherwise the test is not repeated as
+  # it is assumed to have already been performed.
+  CHECK_CXX_SOURCE_COMPILES(
+    "#include <gflags/gflags.h>
      int main(int argc, char * argv[]) {
        google::ParseCommandLineFlags(&argc, &argv, true);
        return 0;
      }"
-     ${BUILD_TYPE}
-     GFLAGS_IN_GOOGLE_NAMESPACE_${BUILD_TYPE_UPPERCASE})
-   IF (GFLAGS_IN_GOOGLE_NAMESPACE_${BUILD_TYPE_UPPERCASE})
-     SET(GFLAGS_NAMESPACE google)
-     BREAK()
-   ELSE (GFLAGS_IN_GOOGLE_NAMESPACE_${BUILD_TYPE_UPPERCASE})
-     # Try (newer) gflags namespace instead.  Note that the output variable
-     # MUST be unique to the build type as otherwise the test is not repeated as
-     # it is assumed to have already been performed.
-     SET(CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
-     SET(CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
-     CHECK_CXX_SOURCE_COMPILES_WITH_BUILD_TYPE(
-       "#include <gflags/gflags.h>
-       int main(int argc, char * argv[]) {
-         gflags::ParseCommandLineFlags(&argc, &argv, true);
-         return 0;
-       }"
-       ${BUILD_TYPE}
-       GFLAGS_IN_GFLAGS_NAMESPACE_${BUILD_TYPE_UPPERCASE})
-     IF (GFLAGS_IN_GFLAGS_NAMESPACE_${BUILD_TYPE_UPPERCASE})
-       SET(GFLAGS_NAMESPACE gflags)
-       BREAK()
-     ENDIF (GFLAGS_IN_GFLAGS_NAMESPACE_${BUILD_TYPE_UPPERCASE})
-   ENDIF (GFLAGS_IN_GOOGLE_NAMESPACE_${BUILD_TYPE_UPPERCASE})
- ENDFOREACH()
-
- IF (NOT GFLAGS_NAMESPACE)
-   # Failed to determine gflags namespace using
-   # check_cxx_source_compiles_with_build_type() method, try and obtain it
-   # using regex on the gflags header instead.
-   MESSAGE(STATUS "Failed to find gflags namespace using using "
-     "check_cxx_source_compiles(), trying namespace regex instead, "
-     "this is expected on Windows.")
-   # Scan gflags.h to identify what namespace gflags was built with.
-   SET(GFLAGS_HEADER_FILE ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
-   IF (NOT EXISTS ${GFLAGS_HEADER_FILE})
-     GFLAGS_REPORT_NOT_FOUND(
-       "Could not find file: ${GFLAGS_HEADER_FILE} "
-       "containing namespace information in gflags install located at: "
-       "${GFLAGS_INCLUDE_DIR}.")
-   ELSE (NOT EXISTS ${GFLAGS_HEADER_FILE})
-     FILE(READ ${GFLAGS_HEADER_FILE} GFLAGS_HEADER_FILE_CONTENTS)
-
-     STRING(REGEX MATCH "namespace [A-Za-z]+"
-       GFLAGS_NAMESPACE "${GFLAGS_HEADER_FILE_CONTENTS}")
-     STRING(REGEX REPLACE "namespace ([A-Za-z]+)" "\\1"
-       GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}")
-
-     IF (NOT GFLAGS_NAMESPACE)
+     GFLAGS_IN_GOOGLE_NAMESPACE)
+  IF (GFLAGS_IN_GOOGLE_NAMESPACE)
+    SET(GFLAGS_NAMESPACE google PARENT_SCOPE)
+    RETURN()
+  ENDIF()
+
+  # Try (newer) gflags namespace instead.  Note that the output variable
+  # MUST be unique to the build type as otherwise the test is not repeated as
+  # it is assumed to have already been performed.
+  SET(CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
+  SET(CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
+  CHECK_CXX_SOURCE_COMPILES(
+    "#include <gflags/gflags.h>
+     int main(int argc, char * argv[]) {
+        gflags::ParseCommandLineFlags(&argc, &argv, true);
+        return 0;
+     }"
+     GFLAGS_IN_GFLAGS_NAMESPACE)
+  IF (GFLAGS_IN_GFLAGS_NAMESPACE)
+    SET(GFLAGS_NAMESPACE gflags PARENT_SCOPE)
+    RETURN()
+  ENDIF (GFLAGS_IN_GFLAGS_NAMESPACE)
+ENDFUNCTION(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_TRY_COMPILE)
+
+# Use regex on the gflags headers to attempt to determine the gflags namespace.
+# Checks both gflags.h (contained namespace on versions < 2.1.2) and
+# gflags_declare.h, which contains the namespace on versions >= 2.1.2.
+# In general, this method should only be used when
+# GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_TRY_COMPILE() cannot be used, or has
+# failed.
+#
+# Defines: GFLAGS_NAMESPACE in the caller's scope with the detected namespace,
+#          which is blank (empty string, will test FALSE is CMake conditionals)
+#          if detection failed.
+FUNCTION(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_REGEX)
+  # Verify that all required variables are defined.
+  GFLAGS_CHECK_VARS_DEFINED(GFLAGS_INCLUDE_DIR)
+  # Ensure that GFLAGS_NAMESPACE is always undefined on completion unless
+  # we explicitly set if after having the correct namespace.
+  SET(GFLAGS_NAMESPACE "" PARENT_SCOPE)
+
+  # Scan gflags.h to identify what namespace gflags was built with.  On
+  # versions of gflags < 2.1.2, gflags.h was configured with the namespace
+  # directly, on >= 2.1.2, gflags.h uses the GFLAGS_NAMESPACE #define which
+  # is defined in gflags_declare.h, we try each location in turn.
+  SET(GFLAGS_HEADER_FILE ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
+  IF (NOT EXISTS ${GFLAGS_HEADER_FILE})
+    GFLAGS_REPORT_NOT_FOUND(
+      "Could not find file: ${GFLAGS_HEADER_FILE} "
+      "containing namespace information in gflags install located at: "
+      "${GFLAGS_INCLUDE_DIR}.")
+  ENDIF()
+  FILE(READ ${GFLAGS_HEADER_FILE} GFLAGS_HEADER_FILE_CONTENTS)
+
+  STRING(REGEX MATCH "namespace [A-Za-z]+"
+    GFLAGS_NAMESPACE "${GFLAGS_HEADER_FILE_CONTENTS}")
+  STRING(REGEX REPLACE "namespace ([A-Za-z]+)" "\\1"
+    GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}")
+
+  IF (NOT GFLAGS_NAMESPACE)
+    GFLAGS_REPORT_NOT_FOUND(
+      "Failed to extract gflags namespace from header file: "
+      "${GFLAGS_HEADER_FILE}.")
+  ENDIF (NOT GFLAGS_NAMESPACE)
+
+  IF (GFLAGS_NAMESPACE STREQUAL "google" OR
+      GFLAGS_NAMESPACE STREQUAL "gflags")
+    # Found valid gflags namespace from gflags.h.
+    SET(GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}" PARENT_SCOPE)
+    RETURN()
+  ENDIF()
+
+  # Failed to find gflags namespace from gflags.h, gflags is likely a new
+  # version, check gflags_declare.h, which in newer versions (>= 2.1.2) contains
+  # the GFLAGS_NAMESPACE #define, which is then referenced in gflags.h.
+  SET(GFLAGS_DECLARE_FILE ${GFLAGS_INCLUDE_DIR}/gflags/gflags_declare.h)
+  IF (NOT EXISTS ${GFLAGS_DECLARE_FILE})
+    GFLAGS_REPORT_NOT_FOUND(
+      "Could not find file: ${GFLAGS_DECLARE_FILE} "
+      "containing namespace information in gflags install located at: "
+      "${GFLAGS_INCLUDE_DIR}.")
+  ENDIF()
+  FILE(READ ${GFLAGS_DECLARE_FILE} GFLAGS_DECLARE_FILE_CONTENTS)
+
+  STRING(REGEX MATCH "#define GFLAGS_NAMESPACE [A-Za-z]+"
+    GFLAGS_NAMESPACE "${GFLAGS_DECLARE_FILE_CONTENTS}")
+  STRING(REGEX REPLACE "#define GFLAGS_NAMESPACE ([A-Za-z]+)" "\\1"
+    GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}")
+
+  IF (NOT GFLAGS_NAMESPACE)
+    GFLAGS_REPORT_NOT_FOUND(
+      "Failed to extract gflags namespace from declare file: "
+      "${GFLAGS_DECLARE_FILE}.")
+  ENDIF (NOT GFLAGS_NAMESPACE)
+
+  IF (GFLAGS_NAMESPACE STREQUAL "google" OR
+      GFLAGS_NAMESPACE STREQUAL "gflags")
+    # Found valid gflags namespace from gflags.h.
+    SET(GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}" PARENT_SCOPE)
+    RETURN()
+  ENDIF()
+ENDFUNCTION(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_REGEX)
+
+# -----------------------------------------------------------------
+# By default, if the user has expressed no preference for using an exported
+# gflags CMake configuration over performing a search for the installed
+# components, and has not specified any hints for the search locations, then
+# prefer a gflags exported configuration if available.
+IF (NOT DEFINED GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION
+    AND NOT GFLAGS_INCLUDE_DIR_HINTS
+    AND NOT GFLAGS_LIBRARY_DIR_HINTS)
+  MESSAGE(STATUS "No preference for use of exported gflags CMake configuration "
+    "set, and no hints for include/library directories provided. "
+    "Defaulting to preferring an installed/exported gflags CMake configuration "
+    "if available.")
+  SET(GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION TRUE)
+ENDIF()
+
+IF (GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION)
+  # Try to find an exported CMake configuration for gflags, as generated by
+  # gflags versions >= 2.1.
+  #
+  # We search twice, s/t we can invert the ordering of precedence used by
+  # find_package() for exported package build directories, and installed
+  # packages (found via CMAKE_SYSTEM_PREFIX_PATH), listed as items 6) and 7)
+  # respectively in [1].
+  #
+  # By default, exported build directories are (in theory) detected first, and
+  # this is usually the case on Windows.  However, on OS X & Linux, the install
+  # path (/usr/local) is typically present in the PATH environment variable
+  # which is checked in item 4) in [1] (i.e. before both of the above, unless
+  # NO_SYSTEM_ENVIRONMENT_PATH is passed).  As such on those OSs installed
+  # packages are usually detected in preference to exported package build
+  # directories.
+  #
+  # To ensure a more consistent response across all OSs, and as users usually
+  # want to prefer an installed version of a package over a locally built one
+  # where both exist (esp. as the exported build directory might be removed
+  # after installation), we first search with NO_CMAKE_PACKAGE_REGISTRY which
+  # means any build directories exported by the user are ignored, and thus
+  # installed directories are preferred.  If this fails to find the package
+  # we then research again, but without NO_CMAKE_PACKAGE_REGISTRY, so any
+  # exported build directories will now be detected.
+  #
+  # To prevent confusion on Windows, we also pass NO_CMAKE_BUILDS_PATH (which
+  # is item 5) in [1]), to not preferentially use projects that were built
+  # recently with the CMake GUI to ensure that we always prefer an installed
+  # version if available.
+  #
+  # [1] http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:find_package
+  FIND_PACKAGE(gflags QUIET
+                      NO_MODULE
+                      NO_CMAKE_PACKAGE_REGISTRY
+                      NO_CMAKE_BUILDS_PATH)
+  IF (gflags_FOUND)
+    MESSAGE(STATUS "Found installed version of gflags: ${gflags_DIR}")
+  ELSE(gflags_FOUND)
+    # Failed to find an installed version of gflags, repeat search allowing
+    # exported build directories.
+    MESSAGE(STATUS "Failed to find installed version of gflags, searching for "
+      "gflags build directories exported with CMake.")
+    # Again pass NO_CMAKE_BUILDS_PATH, as we know that gflags is exported and
+    # do not want to treat projects built with the CMake GUI preferentially.
+    FIND_PACKAGE(gflags QUIET
+                        NO_MODULE
+                        NO_CMAKE_BUILDS_PATH)
+    IF (gflags_FOUND)
+      MESSAGE(STATUS "Found exported gflags build directory: ${gflags_DIR}")
+    ENDIF(gflags_FOUND)
+  ENDIF(gflags_FOUND)
+
+  SET(FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION ${gflags_FOUND})
+  IF (FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION)
+    MESSAGE(STATUS "Detected gflags version: ${gflags_VERSION}")
+    SET(GFLAGS_FOUND ${gflags_FOUND})
+    SET(GFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR})
+    SET(GFLAGS_LIBRARY ${gflags_LIBRARIES})
+
+    # gflags does not export the namespace in their CMake configuration, so
+    # use our function to determine what it should be, as it can be either
+    # gflags or google dependent upon version & configuration.
+    #
+    # NOTE: We use the regex method to determine the namespace here, as
+    #       check_cxx_source_compiles() will not use imported targets, which
+    #       is what gflags will be in this case.
+    GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_REGEX()
+
+    IF (NOT GFLAGS_NAMESPACE)
       GFLAGS_REPORT_NOT_FOUND(
-        "Failed to extract gflags namespace from header file: "
-        "${GFLAGS_HEADER_FILE}.")
-     ENDIF (NOT GFLAGS_NAMESPACE)
-
-     # Verify that the namespace is either google or gflags.  Strictly
-     # speaking the users can specify something else when building gflags,
-     # but doing so would cause so many compatibility issues, that they should
-     # not have done, so any mismatch is almost certainly a regex failure.
-     IF (NOT GFLAGS_NAMESPACE STREQUAL "google" AND
-         NOT GFLAGS_NAMESPACE STREQUAL "gflags")
-       GFLAGS_REPORT_NOT_FOUND(
-         "Failed to extract valid gflags namespace from header file: "
-         "${GFLAGS_HEADER_FILE}, result: ${GFLAGS_NAMESPACE} is not "
-         "google or gflags.")
-     ENDIF()
-   ENDIF (NOT EXISTS ${GFLAGS_HEADER_FILE})
- ENDIF (NOT GFLAGS_NAMESPACE)
-
- IF (NOT GFLAGS_NAMESPACE)
-   GFLAGS_REPORT_NOT_FOUND(
-     "Failed to determine gflags namespace either by "
-     "check_cxx_source_compiles(), or namespace regex.")
- ENDIF (NOT GFLAGS_NAMESPACE)
-ENDIF (GFLAGS_INCLUDE_DIR AND NOT GFLAGS_NAMESPACE)
-
-# Make the GFLAGS_NAMESPACE a cache variable s/t the user can view it, and could
-# overwrite it in the CMake GUI.
-SET(GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}" CACHE STRING
-  "gflags namespace (google or gflags)" FORCE)
-
-# gflags does not seem to provide any record of the version in its
-# source tree, thus cannot extract version.
-
-# Catch case when caller has set GFLAGS_NAMESPACE in the cache / GUI
-# with an invalid value.
-IF (GFLAGS_NAMESPACE AND
-    NOT GFLAGS_NAMESPACE STREQUAL "google" AND
-    NOT GFLAGS_NAMESPACE STREQUAL "gflags")
-  GFLAGS_REPORT_NOT_FOUND(
-    "Caller defined GFLAGS_NAMESPACE:"
-    " ${GFLAGS_NAMESPACE} is not valid, not google or gflags.")
-ENDIF ()
-# Catch case when caller has set GFLAGS_INCLUDE_DIR in the cache / GUI and
-# thus FIND_[PATH/LIBRARY] are not called, but specified locations are
-# invalid, otherwise we would report the library as found.
-IF (GFLAGS_INCLUDE_DIR AND
+        "Failed to determine gflags namespace using regex for gflags "
+        "version: ${gflags_VERSION} exported here: ${gflags_DIR} using CMake.")
+    ENDIF (NOT GFLAGS_NAMESPACE)
+  ELSE (FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION)
+    MESSAGE(STATUS "Failed to find an installed/exported CMake configuration "
+      "for gflags, will perform search for installed gflags components.")
+  ENDIF (FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION)
+ENDIF(GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION)
+
+IF (NOT GFLAGS_FOUND)
+  # Either failed to find an exported gflags CMake configuration, or user
+  # told us not to use one.  Perform a manual search for all gflags components.
+
+  # Handle possible presence of lib prefix for libraries on MSVC, see
+  # also GFLAGS_RESET_FIND_LIBRARY_PREFIX().
+  IF (MSVC)
+    # Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES
+    # s/t we can set it back before returning.
+    SET(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
+    # The empty string in this list is important, it represents the case when
+    # the libraries have no prefix (shared libraries / DLLs).
+    SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "" "${CMAKE_FIND_LIBRARY_PREFIXES}")
+  ENDIF (MSVC)
+
+  # Search user-installed locations first, so that we prefer user installs
+  # to system installs where both exist.
+  LIST(APPEND GFLAGS_CHECK_INCLUDE_DIRS
+    /usr/local/include
+    /usr/local/homebrew/include # Mac OS X
+    /opt/local/var/macports/software # Mac OS X.
+    /opt/local/include
+    /usr/include)
+  LIST(APPEND GFLAGS_CHECK_PATH_SUFFIXES
+    gflags/include # Windows (for C:/Program Files prefix).
+    gflags/Include ) # Windows (for C:/Program Files prefix).
+
+  LIST(APPEND GFLAGS_CHECK_LIBRARY_DIRS
+    /usr/local/lib
+    /usr/local/homebrew/lib # Mac OS X.
+    /opt/local/lib
+    /usr/lib)
+  LIST(APPEND GFLAGS_CHECK_LIBRARY_SUFFIXES
+    gflags/lib # Windows (for C:/Program Files prefix).
+    gflags/Lib ) # Windows (for C:/Program Files prefix).
+
+  # Search supplied hint directories first if supplied.
+  FIND_PATH(GFLAGS_INCLUDE_DIR
+    NAMES gflags/gflags.h
+    PATHS ${GFLAGS_INCLUDE_DIR_HINTS}
+    ${GFLAGS_CHECK_INCLUDE_DIRS}
+    PATH_SUFFIXES ${GFLAGS_CHECK_PATH_SUFFIXES})
+  IF (NOT GFLAGS_INCLUDE_DIR OR
+      NOT EXISTS ${GFLAGS_INCLUDE_DIR})
+    GFLAGS_REPORT_NOT_FOUND(
+      "Could not find gflags include directory, set GFLAGS_INCLUDE_DIR "
+      "to directory containing gflags/gflags.h")
+  ENDIF (NOT GFLAGS_INCLUDE_DIR OR
+    NOT EXISTS ${GFLAGS_INCLUDE_DIR})
+
+  FIND_LIBRARY(GFLAGS_LIBRARY NAMES gflags
+    PATHS ${GFLAGS_LIBRARY_DIR_HINTS}
+    ${GFLAGS_CHECK_LIBRARY_DIRS}
+    PATH_SUFFIXES ${GFLAGS_CHECK_LIBRARY_SUFFIXES})
+  IF (NOT GFLAGS_LIBRARY OR
+      NOT EXISTS ${GFLAGS_LIBRARY})
+    GFLAGS_REPORT_NOT_FOUND(
+      "Could not find gflags library, set GFLAGS_LIBRARY "
+      "to full path to libgflags.")
+  ENDIF (NOT GFLAGS_LIBRARY OR
+    NOT EXISTS ${GFLAGS_LIBRARY})
+
+  # gflags typically requires a threading library (which is OS dependent), note
+  # that this defines the CMAKE_THREAD_LIBS_INIT variable.  If we are able to
+  # detect threads, we assume that gflags requires it.
+  FIND_PACKAGE(Threads QUIET)
+  SET(GFLAGS_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+  # On Windows (including MinGW), the Shlwapi library is used by gflags if
+  # available.
+  IF (WIN32)
+    INCLUDE(CheckIncludeFileCXX)
+    CHECK_INCLUDE_FILE_CXX("shlwapi.h" HAVE_SHLWAPI)
+    IF (HAVE_SHLWAPI)
+      LIST(APPEND GFLAGS_LINK_LIBRARIES shlwapi.lib)
+    ENDIF(HAVE_SHLWAPI)
+  ENDIF (WIN32)
+
+  # Mark internally as found, then verify. GFLAGS_REPORT_NOT_FOUND() unsets
+  # if called.
+  SET(GFLAGS_FOUND TRUE)
+
+  # Identify what namespace gflags was built with.
+  IF (GFLAGS_INCLUDE_DIR AND NOT GFLAGS_NAMESPACE)
+    # To handle Windows peculiarities / CMake bugs on MSVC we try two approaches
+    # to detect the gflags namespace:
+    #
+    # 1) Try to use check_cxx_source_compiles() to compile a trivial program
+    #    with the two choices for the gflags namespace.
+    #
+    # 2) [In the event 1) fails] Use regex on the gflags headers to try to
+    #    determine the gflags namespace.  Whilst this is less robust than 1),
+    #    it does avoid any interaction with msbuild.
+    GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_TRY_COMPILE()
+
+    IF (NOT GFLAGS_NAMESPACE)
+      # Failed to determine gflags namespace using check_cxx_source_compiles()
+      # method, try and obtain it using regex on the gflags headers instead.
+      MESSAGE(STATUS "Failed to find gflags namespace using using "
+        "check_cxx_source_compiles(), trying namespace regex instead, "
+        "this is expected on Windows.")
+      GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_REGEX()
+
+      IF (NOT GFLAGS_NAMESPACE)
+        GFLAGS_REPORT_NOT_FOUND(
+          "Failed to determine gflags namespace either by "
+          "check_cxx_source_compiles(), or namespace regex.")
+      ENDIF (NOT GFLAGS_NAMESPACE)
+    ENDIF (NOT GFLAGS_NAMESPACE)
+  ENDIF (GFLAGS_INCLUDE_DIR AND NOT GFLAGS_NAMESPACE)
+
+  # Make the GFLAGS_NAMESPACE a cache variable s/t the user can view it, and could
+  # overwrite it in the CMake GUI.
+  SET(GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}" CACHE STRING
+    "gflags namespace (google or gflags)" FORCE)
+
+  # gflags does not seem to provide any record of the version in its
+  # source tree, thus cannot extract version.
+
+  # Catch case when caller has set GFLAGS_NAMESPACE in the cache / GUI
+  # with an invalid value.
+  IF (GFLAGS_NAMESPACE AND
+      NOT GFLAGS_NAMESPACE STREQUAL "google" AND
+      NOT GFLAGS_NAMESPACE STREQUAL "gflags")
+    GFLAGS_REPORT_NOT_FOUND(
+      "Caller defined GFLAGS_NAMESPACE:"
+      " ${GFLAGS_NAMESPACE} is not valid, not google or gflags.")
+  ENDIF ()
+  # Catch case when caller has set GFLAGS_INCLUDE_DIR in the cache / GUI and
+  # thus FIND_[PATH/LIBRARY] are not called, but specified locations are
+  # invalid, otherwise we would report the library as found.
+  IF (GFLAGS_INCLUDE_DIR AND
+      NOT EXISTS ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
+    GFLAGS_REPORT_NOT_FOUND(
+      "Caller defined GFLAGS_INCLUDE_DIR:"
+      " ${GFLAGS_INCLUDE_DIR} does not contain gflags/gflags.h header.")
+  ENDIF (GFLAGS_INCLUDE_DIR AND
     NOT EXISTS ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
-  GFLAGS_REPORT_NOT_FOUND(
-    "Caller defined GFLAGS_INCLUDE_DIR:"
-    " ${GFLAGS_INCLUDE_DIR} does not contain gflags/gflags.h header.")
-ENDIF (GFLAGS_INCLUDE_DIR AND
-       NOT EXISTS ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
-# TODO: This regex for gflags library is pretty primitive, we use lowercase
-#       for comparison to handle Windows using CamelCase library names, could
-#       this check be better?
-STRING(TOLOWER "${GFLAGS_LIBRARY}" LOWERCASE_GFLAGS_LIBRARY)
-IF (GFLAGS_LIBRARY AND
+  # TODO: This regex for gflags library is pretty primitive, we use lowercase
+  #       for comparison to handle Windows using CamelCase library names, could
+  #       this check be better?
+  STRING(TOLOWER "${GFLAGS_LIBRARY}" LOWERCASE_GFLAGS_LIBRARY)
+  IF (GFLAGS_LIBRARY AND
+      NOT "${LOWERCASE_GFLAGS_LIBRARY}" MATCHES ".*gflags[^/]*")
+    GFLAGS_REPORT_NOT_FOUND(
+      "Caller defined GFLAGS_LIBRARY: "
+      "${GFLAGS_LIBRARY} does not match gflags.")
+  ENDIF (GFLAGS_LIBRARY AND
     NOT "${LOWERCASE_GFLAGS_LIBRARY}" MATCHES ".*gflags[^/]*")
-  GFLAGS_REPORT_NOT_FOUND(
-    "Caller defined GFLAGS_LIBRARY: "
-    "${GFLAGS_LIBRARY} does not match gflags.")
-ENDIF (GFLAGS_LIBRARY AND
-       NOT "${LOWERCASE_GFLAGS_LIBRARY}" MATCHES ".*gflags[^/]*")
+
+  GFLAGS_RESET_FIND_LIBRARY_PREFIX()
+
+ENDIF(NOT GFLAGS_FOUND)

 # Set standard CMake FindPackage variables if found.
 IF (GFLAGS_FOUND)
@@ -418,8 +521,6 @@
   SET(GFLAGS_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
 ENDIF (GFLAGS_FOUND)

-GFLAGS_RESET_FIND_LIBRARY_PREFIX()
-
 # Handle REQUIRED / QUIET optional arguments.
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gflags DEFAULT_MSG
@@ -429,6 +530,7 @@
 # leave them visible in the standard GUI for the user to set manually.
 IF (GFLAGS_FOUND)
   MARK_AS_ADVANCED(FORCE GFLAGS_INCLUDE_DIR
-                         GFLAGS_LIBRARY
-                         GFLAGS_NAMESPACE)
+    GFLAGS_LIBRARY
+    GFLAGS_NAMESPACE
+    gflags_DIR) # Autogenerated by find_package(gflags)
 ENDIF (GFLAGS_FOUND)


Adjust the GST backend to the way phonon is installed now (see phonon-vlc's related commit)

--- cmake/FindPhonon.cmake
+++ cmake/FindPhonon.cmake
@@ -1,53 +1,16 @@
 # Find Phonon

 # Copyright (c) 2010, Harald Sitter <sitter@kde.org>
+# Copyright (c) 2011, Alexander Neundorf <neundorf@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-if (NOT PHONON_BUILDSYSTEM_DIR)
-    find_program(PC_EXECUTABLE NAMES pkg-config
-    PATH_SUFFIXES bin
-    HINTS
-    ${CMAKE_INSTALL_PREFIX}
-    ONLY_CMAKE_FIND_ROOT_PATH
-    )
+find_package(Phonon NO_MODULE)
+if(PHONON_FOUND)
+    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
+endif()

-    if (NOT PC_EXECUTABLE)
-        if (Phonon_FIND_REQUIRED)
-            message(FATAL_ERROR "ERROR: Could not find pkg-config [required to find Phonon].")
-        endif (Phonon_FIND_REQUIRED)
-    endif (NOT PC_EXECUTABLE)
+include(FindPackageHandleStandardArgs)

-    if (PC_EXECUTABLE)
-        execute_process(COMMAND "${PC_EXECUTABLE}" --variable=buildsystemdir phonon
-                        OUTPUT_VARIABLE _data_DIR
-                        ERROR_QUIET
-                        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        file(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
-        find_path(PHONON_BUILDSYSTEM_DIR FindPhononInternal.cmake HINTS ${_data_DIR})
-    endif (PC_EXECUTABLE)
-endif (NOT PHONON_BUILDSYSTEM_DIR)
-
-if (PHONON_BUILDSYSTEM_DIR)
-    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
-
-    if (Phonon_FIND_REQUIRED)
-        set(_req REQUIRED)
-    endif (Phonon_FIND_REQUIRED)
-    if (PHONON_FIND_QUIETLY)
-        set(_quiet QUIET)
-    endif (PHONON_FIND_QUIETLY)
-
-    find_package(PhononInternal ${_req} ${_quiet})
-else (PHONON_BUILDSYSTEM_DIR)
-    if (_data_DIR)
-        if (Phonon_FIND_REQUIRED)
-            message(FATAL_ERROR "ERROR: FindPhonon.cmake not found in ${_data_DIR}")
-        endif (Phonon_FIND_REQUIRED)
-    else (_data_DIR)
-        if (Phonon_FIND_REQUIRED)
-            message(FATAL_ERROR "ERROR: Either pkg-config can not find its phonon config, or you are not using a recent enough Phonon version.")
-        endif (Phonon_FIND_REQUIRED)
-    endif (_data_DIR)
-endif (PHONON_BUILDSYSTEM_DIR)
+find_package_handle_standard_args(Phonon  DEFAULT_MSG  Phonon_DIR )


PAR: changed macro name and added instructions

--- cmake/GenParFile.cmake
+++ cmake/GenParFile.cmake
@@ -1,4 +1,20 @@
-macro(add_parfile PARMODULE PARSOURCES PARHEADERS PARLINKDEF PARLIBDEPS)
+# This CMake macro generates a target that, in turn, will generate a PARfile for the given library.
+#
+# Usage: in the CMakeLists.txt, for a given library, add the following:
+#   add_target_parfile(${MODULE} "${SRCS}" "${HDRS}" "${MODULE}LinkDef.h" "${LIBDEPS}")
+#
+# Arguments are, in order:
+#  - library's name: for libBLAHBLAH it will generate a target BLAHBLAH.par
+#  - source files: classes to include in the PARfile, they must be exactly the ones used to generate
+#    the library
+#  - headers
+#  - the LinkDef used by ROOT
+#  - dependent libraries: used to generate the rootmap
+#
+# To generate a parfile, if enabled in its CMakeLists.txt, go to the build directory and run:
+#   make BLAHBLAH.par
+
+macro(add_target_parfile PARMODULE PARSOURCES PARHEADERS PARLINKDEF PARLIBDEPS)

   message(STATUS "PARfile generation: ${PARMODULE}")


fix formatting

fix formatting

--- cmake/LLVMIRUtil.cmake
+++ cmake/LLVMIRUtil.cmake
@@ -13,7 +13,7 @@

 set(LLVM_IR_UTIL_VERSION_MAJOR "2")
 set(LLVM_IR_UTIL_VERSION_MINOR "4")
-set(LLVM_IR_UTIL_VERSION_PATCH "3")
+set(LLVM_IR_UTIL_VERSION_PATCH "4")

 string(CONCAT LLVM_IR_UTIL_VERSION
   ${LLVM_IR_UTIL_VERSION_MAJOR} "."
@@ -75,7 +75,8 @@
   get_property(IN_FILES TARGET ${DEPENDS_TRGT} PROPERTY SOURCES)
   get_property(LINKER_LANGUAGE TARGET ${DEPENDS_TRGT} PROPERTY LINKER_LANGUAGE)

-  debug("@llvmir_attach_bc_target ${DEPENDS_TRGT} linker lang: ${LINKER_LANGUAGE}")
+  debug(
+    "@llvmir_attach_bc_target ${DEPENDS_TRGT} linker lang: ${LINKER_LANGUAGE}")

   llvmir_set_compiler(${LINKER_LANGUAGE})

@@ -90,7 +91,8 @@
   llvmir_extract_include_dirs_properties(IN_INCLUDES ${DEPENDS_TRGT})

   # language standards flags
-  llvmir_extract_standard_flags(IN_STANDARD_FLAGS ${DEPENDS_TRGT} ${LINKER_LANGUAGE})
+  llvmir_extract_standard_flags(IN_STANDARD_FLAGS
+    ${DEPENDS_TRGT} ${LINKER_LANGUAGE})

   # compile options
   llvmir_extract_compile_option_properties(IN_COMPILE_OPTIONS ${DEPENDS_TRGT})
@@ -120,11 +122,11 @@

     catuniq(CURRENT_COMPILE_FLAGS ${IN_COMPILE_FLAGS} ${IN_FILE_COMPILE_FLAGS})
     debug("@llvmir_attach_bc_target ${DEPENDS_TRGT} compile flags: \
-      ${CURRENT_COMPILE_FLAGS}")
-
-      set(CMD_ARGS "-emit-llvm" ${IN_STANDARD_FLAGS} ${IN_LANG_FLAGS}
-        ${IN_COMPILE_OPTIONS} ${CURRENT_COMPILE_FLAGS} ${CURRENT_DEFS}
-        ${IN_INCLUDES})
+    ${CURRENT_COMPILE_FLAGS}")
+
+    set(CMD_ARGS "-emit-llvm" ${IN_STANDARD_FLAGS} ${IN_LANG_FLAGS}
+      ${IN_COMPILE_OPTIONS} ${CURRENT_COMPILE_FLAGS} ${CURRENT_DEFS}
+      ${IN_INCLUDES})

     add_custom_command(OUTPUT ${FULL_OUT_LLVMIR_FILE}
       COMMAND ${LLVMIR_COMPILER}
@@ -208,7 +210,8 @@

     add_custom_command(OUTPUT ${FULL_OUT_LLVMIR_FILE}
       COMMAND ${LLVMIR_OPT}
-      ARGS ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${INFILE} -o ${FULL_OUT_LLVMIR_FILE}
+      ARGS
+      ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${INFILE} -o ${FULL_OUT_LLVMIR_FILE}
       DEPENDS ${INFILE}
       COMMENT "Generating LLVM bitcode ${OUT_LLVMIR_FILE}"
       VERBATIM)
@@ -283,7 +286,8 @@

     add_custom_command(OUTPUT ${FULL_OUT_LLVMIR_FILE}
       COMMAND ${LLVMIR_DISASSEMBLER}
-      ARGS ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${INFILE} -o ${FULL_OUT_LLVMIR_FILE}
+      ARGS
+      ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${INFILE} -o ${FULL_OUT_LLVMIR_FILE}
       DEPENDS ${INFILE}
       COMMENT "Disassembling LLVM bitcode ${OUT_LLVMIR_FILE}"
       VERBATIM)
@@ -358,7 +362,8 @@

     add_custom_command(OUTPUT ${FULL_OUT_LLVMIR_FILE}
       COMMAND ${LLVMIR_ASSEMBLER}
-      ARGS ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${INFILE} -o ${FULL_OUT_LLVMIR_FILE}
+      ARGS
+      ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${INFILE} -o ${FULL_OUT_LLVMIR_FILE}
       DEPENDS ${INFILE}
       COMMENT "Assembling LLVM bitcode ${OUT_LLVMIR_FILE}"
       VERBATIM)
@@ -447,7 +452,9 @@

   add_custom_command(OUTPUT ${FULL_OUT_LLVMIR_FILE}
     COMMAND llvm-link
-    ARGS ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} -o ${FULL_OUT_LLVMIR_FILE} ${IN_FULL_LLVMIR_FILES}
+    ARGS
+    ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS}
+    -o ${FULL_OUT_LLVMIR_FILE} ${IN_FULL_LLVMIR_FILES}
     DEPENDS ${IN_FULL_LLVMIR_FILES}
     COMMENT "Linking LLVM bitcode ${OUT_LLVMIR_FILE}"
     VERBATIM)
@@ -575,7 +582,8 @@
     list(APPEND IN_FULL_LLVMIR_FILES "${IN_LLVMIR_DIR}/${IN_LLVMIR_FILE}")
   endforeach()

-  add_library(${TRGT} ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${IN_FULL_LLVMIR_FILES})
+  add_library(${TRGT}
+    ${LLVMIR_ATTACH_UNPARSED_ARGUMENTS} ${IN_FULL_LLVMIR_FILES})

   set_property(TARGET ${TRGT} PROPERTY LINKER_LANGUAGE ${LINKER_LANGUAGE})
   set_property(TARGET ${TRGT} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${OUT_DIR})


remove glfw for now

remove glfw for now

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -24,6 +24,9 @@
 # Optional dependencies

 if (USE_OPENGL)
+    #add_subdirectory(external/glfw)
+    #include_directories(external/glfw/include)
+    #target_link_libraries(${CORE_LIBRARY_NAME} glfw)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTC_USE_OPENGL")
     find_package(OpenGL REQUIRED)
     find_package(GLFW3 REQUIRED)
@@ -83,10 +86,6 @@

 include_directories(include)
 include_directories(external/include)
-include_directories(pakua/external/asio/include)
-add_subdirectory(external/glfw)
-include_directories(external/glfw/include)
-target_link_libraries(${CORE_LIBRARY_NAME} glfw)

 add_custom_target(
         clangformat


Append dl library to LUA_LIBRARIES list

Append dl library to LUA_LIBRARIES list

--- cmake/custom/lua.cmake
+++ cmake/custom/lua.cmake
@@ -16,3 +16,18 @@
   list(APPEND CMAKE_PREFIX_PATH ${LUA_ROOT})
 endif()
 find_package(Lua 5.3 EXACT REQUIRED)
+
+# Append the dl library to the LUA_LIBRARIES list for a statically
+# linked Lua library.
+# This contraption is needed for CMake older than 3.6.0
+# This is adapted from:
+# https://github.com/Kitware/CMake/blob/v3.8.2/Modules/FindLua.cmake
+if(CMAKE_VERSION VERSION_LESS 3.8.0)
+  if(UNIX AND NOT APPLE AND NOT BEOS)
+    # include dl library for statically-linked Lua library
+    get_filename_component(LUA_LIB_EXT ${LUA_LIBRARY} EXT)
+    if(LUA_LIB_EXT STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX)
+      list(APPEND LUA_LIBRARIES ${CMAKE_DL_LIBS})
+    endif()
+  endif()
+endif()


Bug #47797 CMake, engine can't specify additional libraries to link with   - Make it possible for the CmakeLists.txt files in an engine to use    ${engine}_LIBS to set additional libraries to link with  Example: NDBCLUSTER_LIBS = ndbclient

--- storage/mysql_storage_engine.cmake
+++ storage/mysql_storage_engine.cmake
@@ -7,6 +7,8 @@
 # Remarks:
 # ${engine}_SOURCES  variable containing source files to produce the library must set before
 # calling this macro
+# ${engine}_LIBS variable containing extra libraries to link with may be set
+

 MACRO(MYSQL_STORAGE_ENGINE engine)
 IF(NOT SOURCE_SUBLIBS)
@@ -22,6 +24,9 @@
     #Create static library. The name of the library is <storage_engine>.lib
     ADD_LIBRARY(${libname} ${${engine}_SOURCES})
     ADD_DEPENDENCIES(${libname} GenError)
+    IF(${engine}_LIBS)
+      TARGET_LINK_LIBRARIES(${libname} ${${engine}_LIBS})
+    ENDIF(${engine}_LIBS)
     MESSAGE("build ${engine} as static library")
   ELSEIF(${ENGINE_BUILD_TYPE} STREQUAL "DYNAMIC")
     ADD_DEFINITIONS(-DMYSQL_DYNAMIC_PLUGIN)
@@ -30,6 +35,9 @@
     SET(dyn_libname ha_${libname})
     ADD_LIBRARY(${dyn_libname} SHARED ${${engine}_SOURCES})
     TARGET_LINK_LIBRARIES (${dyn_libname}  mysqld)
+    IF(${engine}_LIBS)
+      TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS})
+    ENDIF(${engine}_LIBS)
     MESSAGE("build ${engine} as DLL")
   ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
 ENDIF(NOT SOURCE_SUBLIBS)


minor fix in log output

minor fix in log output

--- ctest_ext.cmake
+++ ctest_ext.cmake
@@ -641,7 +641,7 @@
             ctest_ext_info("Clean binary directory : ${CTEST_BINARY_DIRECTORY}")
             ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
         elseif(CTEST_UPDATE_CMAKE_CACHE AND EXISTS "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
-            ctest_ext_info("Remove old CMake cache : ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt}")
+            ctest_ext_info("Remove old CMake cache : ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
             file(REMOVE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
         endif()


Set Launcher as default application Don't copy curl.dll on non-windows system

--- support/cmake/support_macros.cmake
+++ support/cmake/support_macros.cmake
@@ -191,6 +191,7 @@

     set(DEFAULT_APPLICATIONS
         "OpenSpace"
+        "Launcher"
     )
     mark_as_advanced(DEFAULT_APPLICATIONS)

@@ -237,8 +238,9 @@
                     endif ()

-                    copy_files(${APPLICATION_NAME} "${CURL_ROOT_DIR}/lib/libcurl.dll")
-
+                    if (WIN32)
+                        copy_files(${APPLICATION_NAME} "${CURL_ROOT_DIR}/lib/libcurl.dll")
+                    endif ()
             endif ()

             list(APPEND applications ${APPLICATION_NAME})


Fix broken Fortran detection from missing build directory

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -51,6 +51,7 @@
   if(CMAKE_Fortran_COMPILER)
     set(fcomp_args "-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}")
   endif()
+  file(MAKE_DIRECTORY "${ADIOS2_BINARY_DIR}/cmake/check_f90")
   execute_process(
     COMMAND
       "${CMAKE_COMMAND}" "${fcomp_args}" "${ADIOS2_SOURCE_DIR}/cmake/check_f90"


updated link to Xlink in config.cmake of hunter

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -13,9 +13,9 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2020.2"
+    VERSION "luxonis-2020.2test"
     URL  "https://github.com/luxonis/XLink/archive/test_usb_info.zip"
-    SHA1 "50242e3a0f8de87a6534f3cb16342ffc692dc421"
+    SHA1 "4b0c3cbf16edbfb66a5f08c0bba32639970f2760"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
 )


fix windows build

fix windows build


xcc: Drop the seemingly unused XCC_BUILD variable

Drop the seemingly unused XCC_BUILD variable because it depends on
Kconfig and we need to cut the toolchain's dependency on Kconfig.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/toolchain/xcc.cmake
+++ cmake/toolchain/xcc.cmake
@@ -7,7 +7,6 @@

 set(CROSS_COMPILE  ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-)
 set(SYSROOT_DIR    ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
-set(XCC_BUILD      $ENV{XTENSA_BUILD_PATHS}/$ENV{TOOLCHAIN_VER}/${CONFIG_SOC})

 # xt-xcc does not support -Og, so make it -O0
 set(OPTIMIZE_FOR_DEBUG_FLAG "-O0")


Squashed 'external/BootsOnTheGround/' changes from 9be8333..b4ce245

b4ce245 [changed] pulled out BOTG.cmake include

git-subtree-dir: external/BootsOnTheGround
git-subtree-split: b4ce24532ea72c8cd8d0b864c9096df7f2fbb607

--- external/BootsOnTheGround/cmake/BOTG_INCLUDE.cmake
+++ external/BootsOnTheGround/cmake/BOTG_INCLUDE.cmake
@@ -19,9 +19,9 @@
         MESSAGE( ERROR "[BootsOnTheGround] BOTG_SOURCE_DIR=${BOTG_SOURCE_DIR} does not exist!")
     ENDIF()

-    # Includes all the "BootsOnTheGround" (BOTG) functions.
-    INCLUDE( "${BOTG_SOURCE_DIR}/cmake/BOTG.cmake" )
-
 ENDIF()

+# Includes all the "BootsOnTheGround" (BOTG) functions.
+INCLUDE( "${BOTG_SOURCE_DIR}/cmake/BOTG.cmake" )

+


amalgamous build disabled

amalgamous build disabled

--- deps/luajit.cmake
+++ deps/luajit.cmake
@@ -5,11 +5,7 @@
 # Redistribution and use of this file is allowed according to the terms of the MIT license.
 # Debugged and (now seriously) modified by Ronan Collobert, for Torch7

-cmake_minimum_required(VERSION 2.8.9)
-
 project(LuaJIT C ASM)
-
-set(CMAKE_BUILD_TYPE Release)

 SET(LUAJIT_DIR ${CMAKE_CURRENT_LIST_DIR}/luajit)

@@ -19,7 +15,7 @@
   ${CMAKE_CURRENT_BINARY_DIR}
 )

-OPTION(WITH_AMALG "Build eveything in one shot (needs memory)" ON)
+OPTION(WITH_AMALG "Build eveything in one shot (needs memory)" OFF)

 # Ugly warnings
 IF(MSVC)
@@ -274,8 +270,8 @@
   ${LUAJIT_DIR}/src/lj_lib.c
   ${LUAJIT_DIR}/src/lj_alloc.c
   ${LUAJIT_DIR}/src/lib_aux.c
-  ${LUAJIT_DIR}/${SRC_LJLIB}
-  ${LUAJIT_DIR}/src/lib_init.c)
+  ${LUAJIT_DIR}/src/lib_init.c
+  ${SRC_LJLIB})

 SET(SRC_BUILDVM
   ${LUAJIT_DIR}/src/host/buildvm.c
@@ -322,7 +318,6 @@
   )

 ## COMPILE
-set(LUAJIT_DIR ${LUAJIT_DIR})
 include_directories(
   ${LUAJIT_DIR}/dynasm
   ${LUAJIT_DIR}/src


Incrementing version to 0.7.0

Incrementing version to 0.7.0

Change-Id: I9f032d04461abb401a81d2211c1b2879d129a095

--- Version.cmake
+++ Version.cmake
@@ -9,7 +9,7 @@
 # Version info

 set(SimpleITK_VERSION_MAJOR 0)
-set(SimpleITK_VERSION_MINOR 6)
+set(SimpleITK_VERSION_MINOR 7)
 set(SimpleITK_VERSION_PATCH 0)
 #set(SimpleITK_VERSION_TWEAK "")


port-to-0.9: Remove deprecated Find file

--- cmake/modules/FindTelepathyQt4.cmake
+++ cmake/modules/FindTelepathyQt4.cmake
@@ -1,43 +0,0 @@
-# Try to find the Qt4 binding of the Telepathy library
-# TELEPATHY_QT4_FOUND - system has TelepathyQt4
-# TELEPATHY_QT4_INCLUDE_DIR - the TelepathyQt4 include directory
-# TELEPATHY_QT4_LIBRARIES - Link these to use TelepathyQt4
-
-# Copyright (c) 2008, Allen Winter <winter@kde.org>
-# Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-set(TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
-if(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
-  # Already in cache, be silent
-  set(TELEPATHY_QT4_FIND_QUIETLY TRUE)
-endif(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
-
-find_package(PkgConfig)
-if(PKG_CONFIG_FOUND)
-    if (TelepathyQt4_FIND_VERSION_EXACT)
-        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4=${TelepathyQt4_FIND_VERSION})
-    else (TelepathyQt4_FIND_VERSION_EXACT)
-        pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=${TelepathyQt4_FIND_VERSION})
-    endif (TelepathyQt4_FIND_VERSION_EXACT)
-endif(PKG_CONFIG_FOUND)
-
-find_path(TELEPATHY_QT4_INCLUDE_DIR
-          NAMES TelepathyQt4/Types
-          HINTS
-          ${PC_TELEPATHY_QT4_INCLUDEDIR}
-          ${PC_TELEPATHY_QT4_INCLUDE_DIRS}
-)
-
-find_library(TELEPATHY_QT4_LIBRARIES
-             NAMES telepathy-qt4
-             HINTS
-             ${PC_TELEPATHY_QT4_LIBDIR}
-             ${PC_TELEPATHY_QT4_LIBRARY_DIRS}
-)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(TELEPATHY_QT4 DEFAULT_MSG
-                                  TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)