Add compiler definitions to target_compile_definitions.

--- cmake/BuildFlags.cmake
+++ cmake/BuildFlags.cmake
@@ -1,39 +1,32 @@
-# Empty default flags
-set(CMAKE_C_FLAGS "")
-set(CMAKE_CXX_FLAGS "")
+# '*' indicates CMake default option
+# '+' indicates default compiler behavior
+
+# Set global flags and remove defaults
+if (MSVC)
+  set(CMAKE_CXX_FLAGS "/EHsc")  #*Specifies the model of exception handling (sc options).
+else ()
+  set(CMAKE_CXX_FLAGS "")
+endif()
 set(CMAKE_CXX_FLAGS_RELEASE "")
 set(CMAKE_CXX_FLAGS_DEBUG "")
-set(CMAKE_EXE_LINKER_FLAGS "")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")

 add_library(cse_common_interface INTERFACE)

-  # '*' indicates CMake default option
-  # '+' indicates default compiler behavior
-
-  #================#
-  # Compiler flags #
-  #================#
+#==================#
+# Compiler options #
+#==================#

 target_compile_options(cse_common_interface INTERFACE
-  # MSVC common compiler flags
   $<$<CXX_COMPILER_ID:MSVC>:
-    /DWIN32       #*
-    /D_WINDOWS    #*
-    /D_CONSOLE    #
-    /DINCNE       # CSE-specific
     /W3           #*Warning level
-    # /WX           # Turn all warnings into errors
+    # /WX         # Turn all warnings into errors
     /GR           #*Enable Run-Time Type Information TODO: keep?
-    /EHsc         #*Specifies the model of exception handling (sc options).
     /nologo       # Suppresses display of sign-on banner.
     /fp:precise   #+Specifies floating-point behavior.
     /fp:except-   # Specifies floating-point behavior.
     /arch:IA32    # Specifies the architecture for code generation (no special instructions).
-    # MSVC Release Flags
+
     $<$<CONFIG:Release>:
-      # /DNDEBUG  #* TODO: Add back?
       # /MD       #*Creates a multithreaded DLL using MSVCRT.lib.
       /MT         # Creates a multithreaded executable file using LIBCMT.lib.
       /GF         # Enables string pooling.
@@ -50,13 +43,12 @@
       /GS-        # Buffers security check.
       /MP         # Compiles multiple source files by using multiple processes.
     >
-    # # MSVC DEBUG Flags
+
     $<$<CONFIG:Debug>:
-      /D_DEBUG    #*
       # /MDd      #*Creates a debug multithreaded DLL using MSVCRT.lib.
-      /MTd        # Creates a debug multithreaded executable file using LIBCMTD.lib.
+      # /MTd      # Creates a debug multithreaded executable file using LIBCMTD.lib. (set through CMAKE_MSVC_RUNTIME_LIBRARY)
       /Zi         #*Generates complete debugging information.
-      /Ob0      #*Controls inline expansion (level 0 -- disabled).
+      /Ob0        #*Controls inline expansion (level 0 -- disabled).
       /Od         #*Disables optimization.
       /RTC1       #*Enables run-time error checking.
     >
@@ -66,14 +58,33 @@
     -Wall
   >
   # Flags for Clang
-  $<$<CXX_COMPILER_ID:Clang>:
+  $<$<CXX_COMPILER_ID:Clang,AppleClang>:
     -Wall
   >
 )

-#==============#
-# Linker flags #
-#==============#
+#======================#
+# Compiler definitions #
+#======================#
+
+target_compile_definitions(cse_common_interface INTERFACE
+  INCNE       # CSE-specific
+  $<$<CXX_COMPILER_ID:MSVC>:
+    WIN32       #*
+    _WINDOWS    #*
+    _CONSOLE    #
+    $<$<CONFIG:Release>:
+      # NDEBUG  #* TODO: Add back?
+    >
+    $<$<CONFIG:Debug>:
+      _DEBUG    #*
+    >
+  >
+)
+
+#================#
+# Linker options #
+#================#

 target_link_options(cse_common_interface INTERFACE
   $<$<CXX_COMPILER_ID:MSVC>:    # MSVC Link Flags
@@ -94,6 +105,6 @@
   >
   $<$<CXX_COMPILER_ID:GNU>:     # GCC Link Flags
   >
-  $<$<CXX_COMPILER_ID:Clang>:   # Clang Link Flags
+  $<$<CXX_COMPILER_ID:Clang,AppleClang>:   # Clang Link Flags
   >
 )


cmake/BuildPCRE2.cmake: prevent global install using INSTALL_COMMAND="" [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -40,9 +40,9 @@
   URL "${PROJECT_SOURCE_DIR}/3rdparty/tar/pcre2-10.23-patched.tar.gz"
   UPDATE_COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_SOURCE_DIR}/3rdparty/tar/pcre2-10.23/CMakeLists_fixed.txt" "${CMAKE_CURRENT_BINARY_DIR}/pcre2/src/pcre2/CMakeLists.txt"
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}/pcre2"
-  INSTALL_DIR ${PROJECT_SOURCE_DIR}
   CMAKE_ARGS ${_PCRE2_CMAKE_ARGS}
   CMAKE_CACHE_ARGS ${_CMAKE_CACHE_ARGS}
+  INSTALL_COMMAND ""
   )
 SET (PCRE2_INCLUDE_DIR "${3RDPARTY_OUTPUT_PATH}/include")
 IF (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL Debug) OR (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo))


Compatibility with cmake 3.7

Compatibility with cmake 3.7

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -130,7 +130,9 @@
     return()
   endif()

-  dpf__add_executable("${NAME}-jack")
+  dpf__create_dummy_source_list(_no_srcs)
+
+  dpf__add_executable("${NAME}-jack" ${_no_srcs})
   dpf__add_plugin_main("${NAME}-jack" "jack")
   dpf__add_ui_main("${NAME}-jack" "jack" "${DGL_LIBRARY}")
   target_link_libraries("${NAME}-jack" PRIVATE "${NAME}-dsp" "${NAME}-ui")
@@ -149,7 +151,9 @@
 # Add build rules for a DSSI plugin.
 #
 function(dpf__build_ladspa NAME)
-  dpf__add_module("${NAME}-ladspa")
+  dpf__create_dummy_source_list(_no_srcs)
+
+  dpf__add_module("${NAME}-ladspa" ${_no_srcs})
   dpf__add_plugin_main("${NAME}-ladspa" "ladspa")
   target_link_libraries("${NAME}-ladspa" PRIVATE "${NAME}-dsp")
   set_target_properties("${NAME}-ladspa" PROPERTIES
@@ -172,7 +176,9 @@
     return()
   endif()

-  dpf__add_module("${NAME}-dssi")
+  dpf__create_dummy_source_list(_no_srcs)
+
+  dpf__add_module("${NAME}-dssi" ${_no_srcs})
   dpf__add_plugin_main("${NAME}-dssi" "dssi")
   target_link_libraries("${NAME}-dssi" PRIVATE "${NAME}-dsp")
   set_target_properties("${NAME}-dssi" PROPERTIES
@@ -181,7 +187,7 @@
     PREFIX "")

   if(DGL_LIBRARY)
-    dpf__add_executable("${NAME}-dssi-ui")
+    dpf__add_executable("${NAME}-dssi-ui" ${_no_srcs})
     dpf__add_ui_main("${NAME}-dssi-ui" "dssi" "${DGL_LIBRARY}")
     target_link_libraries("${NAME}-dssi-ui" PRIVATE "${NAME}-ui")
     set_target_properties("${NAME}-dssi-ui" PROPERTIES
@@ -200,7 +206,9 @@
 # Add build rules for a LV2 plugin.
 #
 function(dpf__build_lv2 NAME DGL_LIBRARY MONOLITHIC)
-  dpf__add_module("${NAME}-lv2")
+  dpf__create_dummy_source_list(_no_srcs)
+
+  dpf__add_module("${NAME}-lv2" ${_no_srcs})
   dpf__add_plugin_main("${NAME}-lv2" "lv2")
   target_link_libraries("${NAME}-lv2" PRIVATE "${NAME}-dsp")
   set_target_properties("${NAME}-lv2" PROPERTIES
@@ -215,7 +223,7 @@
       set_target_properties("${NAME}-lv2" PROPERTIES
         OUTPUT_NAME "${NAME}")
     else()
-      dpf__add_module("${NAME}-lv2-ui")
+      dpf__add_module("${NAME}-lv2-ui" ${_no_srcs})
       dpf__add_ui_main("${NAME}-lv2-ui" "lv2" "${DGL_LIBRARY}")
       target_link_libraries("${NAME}-lv2-ui" PRIVATE "${NAME}-ui")
       set_target_properties("${NAME}-lv2-ui" PROPERTIES
@@ -241,7 +249,9 @@
 # Add build rules for a VST plugin.
 #
 function(dpf__build_vst NAME DGL_LIBRARY)
-  dpf__add_module("${NAME}-vst")
+  dpf__create_dummy_source_list(_no_srcs)
+
+  dpf__add_module("${NAME}-vst" ${_no_srcs})
   dpf__add_plugin_main("${NAME}-vst" "vst")
   dpf__add_ui_main("${NAME}-vst" "vst" "${DGL_LIBRARY}")
   target_link_libraries("${NAME}-vst" PRIVATE "${NAME}-dsp" "${NAME}-ui")
@@ -479,6 +489,20 @@
   set("${VAR}" "${_file}" PARENT_SCOPE)
 endfunction()

+# dpf__create_dummy_source_list
+# ------------------------------------------------------------------------------
+#
+# Create a dummy source list which is equivalent to compiling nothing.
+# This is only for compatibility with older CMake versions, which refuse to add
+# targets without any sources.
+#
+macro(dpf__create_dummy_source_list VAR)
+  set("${VAR}")
+  if(CMAKE_VERSION VERSION_LESS "3.11")
+    dpf__ensure_sources_non_empty("${VAR}")
+  endif()
+endmacro()
+
 # dpf__warn_once
 # ------------------------------------------------------------------------------
 #


Update FILE_PATTERNS, INPUT

Update FILE_PATTERNS, INPUT

--- cmake/DoxygenDoc.cmake
+++ cmake/DoxygenDoc.cmake
@@ -17,10 +17,11 @@
     EXTRACT_ALL             = YES
     EXTRACT_PRIVATE         = NO
     EXTRACT_STATIC          = NO
-    FILE_PATTERNS           = *.h *.hpp *.hxx *.c *.cc *.cpp *.cxx *.dox *.md ${FERN_EXTERNAL_SOURCES_FILE_PATTERNS}
+    FILE_PATTERNS           = *.h *.hpp *.hxx *.c *.cc *.cpp *.cxx *.dox *.md ${DEVBASE_DOXYGEN_EXTERNAL_SOURCES_FILE_PATTERNS}
     FULL_PATH_NAMES         = YES
     GENERATE_LATEX          = NO
     GENERATE_TODOLIST       = ${DEVBASE_DOXYGEN_GENERATE_TODOLIST}
+    INPUT                   = ${DEVBASE_DOXYGEN_INPUT}
     HAVE_DOT                = YES
     INCLUDE_GRAPH           = YES
     INHERIT_DOCS            = YES


Overhaul FindBrotli to fix weird issues (#604)

Should get rid of the issue about not being able to create an ALIAS on
MinGW, as well as the "No REQUIRED_VARS" issue.

Fixes #603 (hopefully)

--- cmake/FindBrotli.cmake
+++ cmake/FindBrotli.cmake
@@ -5,69 +5,132 @@
 # The targets will have the same names, but it will use the static libs.
 #
 # Valid find_package COMPONENTS names: "decoder", "encoder", and "common"
+# Note that if you're requiring "decoder" or "encoder", then "common" will be automatically added as required.
 #
 # Defines the libraries (if found): Brotli::decoder, Brotli::encoder, Brotli::common
 # and the includes path variable: Brotli_INCLUDE_DIR
+#
+# If it's failing to find the libraries, try setting BROTLI_ROOT_DIR to the folder containing your library & include dir.

-function(brotli_err_msg _err_msg)
+# If they asked for a specific version, warn/fail since we don't support it.
+# TODO: if they start distributing the version somewhere, implement finding it.
+# But currently there's a version header that doesn't seem to get installed.
+if(Brotli_FIND_VERSION)
+	set(_brotli_version_error_msg "FindBrotli.cmake doesn't have version support!")
 	# If the package is required, throw a fatal error
 	# Otherwise, if not running quietly, we throw a warning
 	if(Brotli_FIND_REQUIRED)
-		message(FATAL_ERROR "${_err_msg}")
+		message(FATAL_ERROR "${_brotli_version_error_msg}")
 	elseif(NOT Brotli_FIND_QUIETLY)
-		message(WARNING "${_err_msg}")
+		message(WARNING "${_brotli_version_error_msg}")
 	endif()
-endfunction()
-
-# If they asked for a specific version, warn/fail since we don't support it.
-if(Brotli_FIND_VERSION)
-	brotli_err_msg("FindBrotli.cmake doesn't have version support!")
 endif()

-# Since both decoder & encoder require the common lib (I think), force its requirement..
+# Since both decoder & encoder require the common lib, force its requirement..
 # if the user is requiring either of those other libs.
 if(Brotli_FIND_REQUIRED_decoder OR Brotli_FIND_REQUIRED_encoder)
 	set(Brotli_FIND_REQUIRED_common TRUE)
 endif()

+# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+# Credit to FindOpenSSL.cmake for this
+if(BROTLI_USE_STATIC_LIBS)
+  set(_brotli_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+  if(WIN32)
+    set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+  else()
+    set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
+  endif()
+endif()
+
 # Make PkgConfig optional, since some users (mainly Windows) don't have it.
 # But it's a lot more clean than manually using find_library.
 find_package(PkgConfig QUIET)
-if(PKG_CONFIG_FOUND)
-	if(BROTLI_USE_STATIC_LIBS)
-		# Have to use _STATIC to tell PkgConfig to find the static libs.
-		pkg_check_modules(Brotli_common_STATIC QUIET IMPORTED_TARGET libbrotlicommon)
-		pkg_check_modules(Brotli_decoder_STATIC QUIET IMPORTED_TARGET libbrotlidec)
-		pkg_check_modules(Brotli_encoder_STATIC QUIET IMPORTED_TARGET libbrotlienc)
-	else()
-		pkg_check_modules(Brotli_common QUIET IMPORTED_TARGET libbrotlicommon)
-		pkg_check_modules(Brotli_decoder QUIET IMPORTED_TARGET libbrotlidec)
-		pkg_check_modules(Brotli_encoder QUIET IMPORTED_TARGET libbrotlienc)
-	endif()
-endif()

 # Only used if the PkgConfig libraries aren't used.
 find_path(Brotli_INCLUDE_DIR
-	NAMES "brotli/decode.h" "brotli/encode.h"
-	PATH_SUFFIXES "include" "includes"
+	NAMES
+		"brotli/decode.h"
+		"brotli/encode.h"
+	HINTS
+		${BROTLI_ROOT_DIR}
+	PATH_SUFFIXES
+		"include"
+		"includes"
 	DOC "The path to Brotli's include directory."
 )
+# Hides this var from the GUI
+mark_as_advanced(Brotli_INCLUDE_DIR)

-# Also check if Brotli_decoder was defined, as it can be passed by the end-user
-if(NOT TARGET PkgConfig::Brotli_decoder AND NOT Brotli_decoder AND NOT TARGET PkgConfig::Brotli_decoder_STATIC)
+# Just used for PkgConfig stuff in the loop below
+set(_brotli_stat_str "")
+if(BROTLI_USE_STATIC_LIBS)
+	set(_brotli_stat_str "_STATIC")
+endif()
+
+# Lets us know we are using the PkgConfig libraries
+# Will be set false if any non-pkgconf vars are used
+set(_brotli_using_pkgconf TRUE)
+
+# Each string here is "ComponentName;LiteralName" (the semi-colon is a delimiter)
+foreach(_listvar "common;common" "decoder;dec" "encoder;enc")
+	# Split the component name and literal library name from the listvar
+	list(GET _listvar 0 _component_name)
+	list(GET _listvar 1 _libname)
+
+	if(PKG_CONFIG_FOUND)
+		# These need to be GLOBAL for MinGW when making ALIAS libraries against them.
+		if(BROTLI_USE_STATIC_LIBS)
+			# Have to use _STATIC to tell PkgConfig to find the static libs.
+			pkg_check_modules(Brotli_${_component_name}_STATIC QUIET GLOBAL IMPORTED_TARGET libbrotli${_libname})
+		else()
+			pkg_check_modules(Brotli_${_component_name} QUIET GLOBAL IMPORTED_TARGET libbrotli${_libname})
+		endif()
+	endif()
+
+	# Check if the target was already found by Pkgconf
+	if(TARGET PkgConfig::Brotli_${_component_name} OR TARGET PkgConfig::Brotli_${_component_name}_STATIC)
+		# Can't use generators for ALIAS targets, so you get this jank
+		add_library(Brotli::${_component_name} ALIAS PkgConfig::Brotli_${_component_name}${_brotli_stat_str})
+
+		# Tells HANDLE_COMPONENTS we found the component
+		set(Brotli_${_component_name}_FOUND TRUE)
+		if(Brotli_FIND_REQUIRED_${_component_name})
+			# If the lib is required, we can add its literal path as a required var for FindPackageHandleStandardArgs
+			# Since it won't accept the PkgConfig targets
+			if(BROTLI_USE_STATIC_LIBS)
+				list(APPEND _brotli_req_vars "Brotli_${_component_name}_STATIC_LIBRARIES")
+			else()
+				list(APPEND _brotli_req_vars "Brotli_${_component_name}_LINK_LIBRARIES")
+			endif()
+		endif()
+
+		# Skip searching for the libs with find_library since it was already found by Pkgconf
+		continue()
+	endif()
+
+	# Lets us know we aren't using the PkgConfig libraries
+	set(_brotli_using_pkgconf FALSE)
+	if(Brotli_FIND_REQUIRED_${_component_name})
+		# If it's required, we can set the name used in find_library as a required var for FindPackageHandleStandardArgs
+		list(APPEND _brotli_req_vars "Brotli_${_component_name}")
+	endif()
+
 	if(BROTLI_USE_STATIC_LIBS)
-		list(APPEND _brotli_decoder_lib_names
-			"brotlidec-static"
-			"libbrotlidec-static"
+		list(APPEND _brotli_lib_names
+			"brotli${_libname}-static"
+			"libbrotli${_libname}-static"
 		)
 	else()
-		list(APPEND _brotli_decoder_lib_names
-			"brotlidec"
-			"libbrotlidec"
+		list(APPEND _brotli_lib_names
+			"brotli${_libname}"
+			"libbrotli${_libname}"
 		)
 	endif()
-	find_library(Brotli_decoder
-		NAMES ${_brotli_decoder_lib_names}
+
+	find_library(Brotli_${_component_name}
+		NAMES ${_brotli_lib_names}
+		HINTS ${BROTLI_ROOT_DIR}
 		PATH_SUFFIXES
 			"lib"
 			"lib64"
@@ -75,121 +138,41 @@
 			"libs64"
 			"lib/x86_64-linux-gnu"
 	)
-endif()
+	# Hide the library variable from the Cmake GUI
+	mark_as_advanced(Brotli_${_component_name})

-# Also check if Brotli_encoder was defined, as it can be passed by the end-user
-if(NOT TARGET PkgConfig::Brotli_encoder AND NOT Brotli_encoder AND NOT TARGET PkgConfig::Brotli_encoder_STATIC)
-	if(BROTLI_USE_STATIC_LIBS)
-		list(APPEND _brotli_encoder_lib_names
-			"brotlienc-static"
-			"libbrotlienc-static"
+	# Unset since otherwise it'll stick around for the next loop and break things
+	unset(_brotli_lib_names)
+
+	# Check if find_library found the library
+	if(Brotli_${_component_name})
+		# Tells HANDLE_COMPONENTS we found the component
+		set(Brotli_${_component_name}_FOUND TRUE)
+
+		add_library("Brotli::${_component_name}" UNKNOWN IMPORTED)
+		# Attach the literal library and include dir to the IMPORTED target for the end-user
+		set_target_properties("Brotli::${_component_name}" PROPERTIES
+			INTERFACE_INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIR}"
+			IMPORTED_LOCATION "${Brotli_${_component_name}}"
 		)
 	else()
-		list(APPEND _brotli_encoder_lib_names
-			"brotlienc"
-			"libbrotlienc"
-		)
-	endif()
-	find_library(Brotli_encoder
-		NAMES ${_brotli_encoder_lib_names}
-		PATH_SUFFIXES
-			"lib"
-			"lib64"
-			"libs"
-			"libs64"
-			"lib/x86_64-linux-gnu"
-	)
-endif()
-
-# Also check if Brotli_common was defined, as it can be passed by the end-user
-if(NOT TARGET PkgConfig::Brotli_common AND NOT Brotli_common AND NOT TARGET PkgConfig::Brotli_common_STATIC)
-	if(BROTLI_USE_STATIC_LIBS)
-		list(APPEND _brotli_common_lib_names
-			"brotlicommon-static"
-			"libbrotlicommon-static"
-		)
-	else()
-		list(APPEND _brotli_common_lib_names
-			"brotlicommon"
-			"libbrotlicommon"
-		)
-	endif()
-	find_library(Brotli_common
-		NAMES ${_brotli_common_lib_names}
-		PATH_SUFFIXES
-			"lib"
-			"lib64"
-			"libs"
-			"libs64"
-			"lib/x86_64-linux-gnu"
-	)
-endif()
-
-set(_brotli_req_vars "")
-# Generic loop to either create all the aliases for the end-user, or throw errors/warnings.
-# Note that the case here needs to match the case we used elsewhere in this file.
-foreach(_target_name "common" "decoder" "encoder")
-	# The PkgConfig IMPORTED_TARGET has PkgConfig:: prefixed to it.
-	if(TARGET PkgConfig::Brotli_${_target_name} OR TARGET PkgConfig::Brotli_${_target_name}_STATIC)
-		set(_stat_str "")
-		if(BROTLI_USE_STATIC_LIBS)
-			set(_stat_str "_STATIC")
-		endif()
-		# Can't use generators for ALIAS targets, so you get this jank
-		add_library(Brotli::${_target_name} ALIAS PkgConfig::Brotli_${_target_name}${_stat_str})
-
-			# The PkgConfig version of the library has a slightly different path to its lib.
-		if(Brotli_FIND_REQUIRED_${_target_name})
-			if(BROTLI_USE_STATIC_LIBS)
-				list(APPEND _brotli_req_vars "Brotli_${_target_name}_STATIC_LIBRARIES")
-			else()
-				list(APPEND _brotli_req_vars "Brotli_${_target_name}_LINK_LIBRARIES")
-			endif()
-		endif()
-	# This will only trigger for libraries we found using find_library
-	elseif(Brotli_${_target_name})
-		add_library("Brotli::${_target_name}" UNKNOWN IMPORTED)
-		# Safety-check the includes dir
-		if(NOT Brotli_INCLUDE_DIR)
-			brotli_err_msg("Failed to find Brotli's includes directory. Try manually defining \"Brotli_INCLUDE_DIR\" to Brotli's header path on your system.")
-		endif()
-		# Attach the literal library and include dir to the IMPORTED target for the end-user
-		set_target_properties("Brotli::${_target_name}" PROPERTIES
-			INTERFACE_INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIR}"
-			IMPORTED_LOCATION "${Brotli_${_target_name}}"
-		)
-		# Attach the library from find_library to our required vars (if it's required)
-		if(Brotli_FIND_REQUIRED_${_target_name})
-			list(APPEND _brotli_req_vars "Brotli_${_target_name}")
-		endif()
-	# This will only happen if it's a required library but we didn't find it.
-	elseif(Brotli_FIND_REQUIRED_${_target_name})
-		# Only bother with an error/failure if they actually required the lib.
-		brotli_err_msg("Failed to find Brotli's ${_target_name} library. Try manually defining \"Brotli_${_target_name}\" to its path on your system.")
-		# If the compnent was required but not found, you set XXX_FOUND to false to signify failure to find component(s)
-		# This is used in find_package_handle_standard_args's HANDLE_COMPONENTS (I think)
-		set(Brotli_FOUND FALSE)
+		# Tells HANDLE_COMPONENTS we found the component
+		set(Brotli_${_component_name}_FOUND FALSE)
 	endif()
 endforeach()

 include(FindPackageHandleStandardArgs)
+# Sets Brotli_FOUND, and fails the find_package(Brotli) call if it was REQUIRED but missing libs.
 find_package_handle_standard_args(Brotli
-	FOUND_VAR Brotli_FOUND
-	REQUIRED_VARS ${_brotli_req_vars}
+	FOUND_VAR
+		Brotli_FOUND
+	REQUIRED_VARS
+		Brotli_INCLUDE_DIR
+		${_brotli_required_targets}
 	HANDLE_COMPONENTS
 )

-if(Brotli_FOUND)
-	include(FindPackageMessage)
-	foreach(_lib_name ${_brotli_req_vars})
-		# TODO: remove this if/when The Cmake PkgConfig file fixes the non-quiet message about libbrotlicommon being found.
-		if(${_lib_name} MATCHES "common")
-			# This avoids a duplicate "Found Brotli: /usr/lib/libbrotlicommon.so" type message.
-			continue()
-		endif()
-		# Double-expand the var to get the actual path instead of the variable's name.
-		find_package_message(Brotli "Found Brotli: ${${_lib_name}}"
-			"[${${_lib_name}}][${Brotli_INCLUDE_DIR}]"
-		)
-	endforeach()
+# Restore the original find library ordering
+if(BROTLI_USE_STATIC_LIBS)
+  set(CMAKE_FIND_LIBRARY_SUFFIXES ${_brotli_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
 endif()


Add KERNEL_INCLUDE_DIRS for cmake libbpf tests

We need custom kernel headers also for libbpf detection.

Signed-off-by: Jiri Olsa <2c6594f608aa3d41e98d48846a6328831f7084ad@kernel.org>

--- cmake/FindLibBpf.cmake
+++ cmake/FindLibBpf.cmake
@@ -45,11 +45,14 @@
 # We need btf_dump support, set LIBBPF_BTF_DUMP_FOUND
 # when it's found.
 if (LIBBPF_FOUND)
+  if (KERNEL_INCLUDE_DIRS)
+    set(INCLUDE_KERNEL -isystem ${KERNEL_INCLUDE_DIRS})
+  endif()
   include(CheckSymbolExists)
   # adding also elf for static build check
   SET(CMAKE_REQUIRED_LIBRARIES ${LIBBPF_LIBRARIES} elf z)
   # libbpf quirk, needs upstream fix
-  SET(CMAKE_REQUIRED_DEFINITIONS -include stdbool.h)
+  SET(CMAKE_REQUIRED_DEFINITIONS -include stdbool.h ${INCLUDE_KERNEL})
   check_symbol_exists(btf_dump__new "${LIBBPF_INCLUDE_DIRS}/bpf/btf.h" HAVE_BTF_DUMP)
   if (HAVE_BTF_DUMP)
     set(LIBBPF_BTF_DUMP_FOUND TRUE)


properly handle zeromq installed in a custom dir

when zeromq is installed in a custom location
use -DZEROMQ=/location/zeromq

--- cmake/FindZeroMQ.cmake
+++ cmake/FindZeroMQ.cmake
@@ -12,18 +12,18 @@
 if(ZEROMQ)
     # ZeroMQ is installed in a custom place
     find_library(ZEROMQ_LIBRARIES NAMES zmq
-                PATH ${ZEROMQ}/lib
+                PATHS ${ZEROMQ}/lib
                 NO_DEFAULT_PATH
                 DOC "Path to libzmq)"
             )

     find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
-                PATH ${ZEROMQ}/lib
+                PATHS ${ZEROMQ}/lib
                 NO_DEFAULT_PATH
                 DOC "Path to libzmq)"
             )

-    find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hh zmq_utils.h}
+    find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.h zmq_utils.h zmq.hpp}
                 PATHS ${ZEROMQ}/include
                 NO_DEFAULT_PATH
                 DOC "Path to ZeroMQ include header files."


Suppress GoogleTest warnings on windows (MSVC) too. (#1320)

Fixes #1209

--- cmake/GoogleTest.cmake
+++ cmake/GoogleTest.cmake
@@ -30,7 +30,11 @@
 include(${GOOGLETEST_PREFIX}/googletest-paths.cmake)

 # googletest doesn't seem to want to stay build warning clean so let's not hurt ourselves.
-add_compile_options(-w)
+if (MSVC)
+  add_compile_options(/wd4244 /wd4722)
+else()
+  add_compile_options(-w)
+endif()

 # Add googletest directly to our build. This defines
 # the gtest and gtest_main targets.


Fixed ConfigurePackages to support manually built OGRE.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -142,9 +142,9 @@

 macro (configure_ogre)
 	SET(OGRE_HOME $ENV{OGRE_HOME})
-#	if ("${OGRE_HOME}" STREQUAL "")
+	if ("${OGRE_HOME}" STREQUAL "")
 		SET(OGRE_HOME ${ENV_NAALI_DEP_PATH}/Ogre)
-#	endif()
+	endif()

     # DX blitting define for naali
     add_definitions(-DUSE_D3D9_SUBSURFACE_BLIT)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/KWSys/vtksys/kwsysDateStamp.cmake
+++ Utilities/KWSys/vtksys/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   11)
+SET(KWSYS_DATE_STAMP_DAY   12)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/KWSys/vtksys/kwsysDateStamp.cmake
+++ Utilities/KWSys/vtksys/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   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


riscos.cmake: Set CMAKE_xxx_FLAGS as INTERNAL not STRING

--- cmake/riscos.cmake
+++ cmake/riscos.cmake
@@ -22,8 +22,8 @@
 set(CMAKE_CXX_COMPILER ${crossbin}/${prefix}g++)
 set(CMAKE_C_COMPILER ${crossbin}/${prefix}gcc)

-set(CMAKE_ASM_ASASM_FLAGS "" CACHE STRING "" FORCE)
-set(CMAKE_C_FLAGS "-mlibscl -mhard-float" CACHE STRING "" FORCE)
+set(CMAKE_ASM_ASASM_FLAGS "" CACHE INTERNAL "") # INTERNAL implies FORCE
+set(CMAKE_C_FLAGS "-mlibscl -mhard-float" CACHE INTERNAL "")

 # Don't embed function names in MinSizeRel builds, but do everywhere else.
 if(CMAKE_BUILD_TYPE MATCHES MinSizeRel)


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -44,6 +44,10 @@
 # OpenGL ES libraries). Additional dependencies are specified by the
 # components. The optional components are:
 #
+#  AnyAudioImporter             - Any audio importer
+#  AnyImageConverter            - Any image converter
+#  AnyImageImporter             - Any image importer
+#  AnySceneImporter             - Any scene importer
 #  Audio                        - Audio library
 #  DebugTools                   - DebugTools library
 #  MeshTools                    - MeshTools library
@@ -53,6 +57,7 @@
 #  Shapes                       - Shapes library
 #  Text                         - Text library
 #  TextureTools                 - TextureTools library
+#  Trade                        - Trade library
 #  GlfwApplication              - GLFW application
 #  GlutApplication              - GLUT application
 #  GlxApplication               - GLX application
@@ -83,7 +88,7 @@
 #
 # Example usage with specifying additional components is::
 #
-#  find_package(Magnum REQUIRED MeshTools Primitives GlutApplication)
+#  find_package(Magnum REQUIRED Trade MeshTools Primitives GlutApplication)
 #
 # For each component is then defined:
 #
@@ -202,8 +207,20 @@
 #   DEALINGS IN THE SOFTWARE.
 #

-# Dependencies
-find_package(Corrade REQUIRED Utility PluginManager)
+# Corrade library dependencies
+set(_MAGNUM_CORRADE_DEPENDENCIES )
+foreach(_component ${Magnum_FIND_COMPONENTS})
+    string(TOUPPER ${_component} _COMPONENT)
+
+    # Unrolling the transitive dependencies here so this doesn't need to be
+    # after resolving inter-component dependencies. Listing also all plugins.
+    if(_component MATCHES "^(Audio|DebugTools|MeshTools|Primitives|Text|TextureTools|Trade|.+Importer|.+ImageConverter|.+Font)$")
+        set(_MAGNUM_${_COMPONENT}_CORRADE_DEPENDENCIES PluginManager)
+    endif()
+
+    list(APPEND _MAGNUM_CORRADE_DEPENDENCIES ${_MAGNUM_${_COMPONENT}_CORRADE_DEPENDENCIES})
+endforeach()
+find_package(Corrade REQUIRED Utility ${_MAGNUM_CORRADE_DEPENDENCIES})

 # Root include dir
 find_path(MAGNUM_INCLUDE_DIR
@@ -298,8 +315,7 @@

     # Dependent libraries
     set_property(TARGET Magnum::Magnum APPEND PROPERTY INTERFACE_LINK_LIBRARIES
-         Corrade::Utility
-         Corrade::PluginManager)
+         Corrade::Utility)

     # Dependent libraries and includes
     if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
@@ -336,6 +352,8 @@
         set(_MAGNUM_${_COMPONENT}_DEPENDENCIES TextureTools)
     elseif(_component STREQUAL DebugTools)
         set(_MAGNUM_${_COMPONENT}_DEPENDENCIES MeshTools Primitives SceneGraph Shaders Shapes)
+    elseif(_component STREQUAL MeshTools)
+        set(_MAGNUM_${_COMPONENT}_DEPENDENCIES Trade)
     elseif(_component STREQUAL OpenGLTester)
         if(MAGNUM_TARGET_HEADLESS OR CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID)
             set(_MAGNUM_${_COMPONENT}_DEPENDENCIES WindowlessEglApplication)
@@ -356,6 +374,8 @@
                 set(_MAGNUM_${_COMPONENT}_DEPENDENCIES WindowlessWindowsEglApplication)
             endif()
         endif()
+    elseif(_component STREQUAL Primitives)
+        set(_MAGNUM_${_COMPONENT}_DEPENDENCIES Trade)
     elseif(_component STREQUAL MagnumFont)
         set(_MAGNUM_${_COMPONENT}_DEPENDENCIES TgaImporter) # and below
     elseif(_component STREQUAL MagnumFontConverter)
@@ -366,6 +386,8 @@

     if(_component MATCHES ".+AudioImporter")
         list(APPEND _MAGNUM_${_COMPONENT}_DEPENDENCIES Audio)
+    elseif(_component MATCHES ".+(Importer|ImageConverter)")
+        list(APPEND _MAGNUM_${_COMPONENT}_DEPENDENCIES Trade)
     elseif(_component MATCHES ".+(Font|FontConverter)")
         list(APPEND _MAGNUM_${_COMPONENT}_DEPENDENCIES Text TextureTools)
     endif()
@@ -390,8 +412,8 @@

 # Component distinction (listing them explicitly to avoid mistakes with finding
 # components from other repositories)
-set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|AndroidApplication|GlfwApplication|GlutApplication|GlxApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessEglApplication|WindowlessGlxApplication|WindowlessIosApplication|WindowlessWglApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext|OpenGLTester)$")
-set(_MAGNUM_PLUGIN_COMPONENTS "^(MagnumFont|MagnumFontConverter|ObjImporter|TgaImageConverter|TgaImporter|WavAudioImporter)$")
+set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|Trade|AndroidApplication|GlfwApplication|GlutApplication|GlxApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessEglApplication|WindowlessGlxApplication|WindowlessIosApplication|WindowlessWglApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext|OpenGLTester)$")
+set(_MAGNUM_PLUGIN_COMPONENTS "^(AnyAudioImporter|AnyImageConverter|AnyImageImporter|AnySceneImporter|MagnumFont|MagnumFontConverter|ObjImporter|TgaImageConverter|TgaImporter|WavAudioImporter)$")
 set(_MAGNUM_EXECUTABLE_COMPONENTS "^(distancefieldconverter|fontconverter|imageconverter|info|al-info)$")

 # Find all components
@@ -608,7 +630,7 @@
             set_property(TARGET Magnum::${_component} APPEND PROPERTY
                 INTERFACE_INCLUDE_DIRECTORIES ${OPENAL_INCLUDE_DIR})
             set_property(TARGET Magnum::${_component} APPEND PROPERTY
-                INTERFACE_LINK_LIBRARIES ${OPENAL_LIBRARY})
+                INTERFACE_LINK_LIBRARIES ${OPENAL_LIBRARY} Corrade::PluginManager)

         # No special setup for DebugTools library

@@ -627,12 +649,32 @@
         # No special setup for SceneGraph library
         # No special setup for Shaders library
         # No special setup for Shapes library
-        # No special setup for Text library
+
+        # Text library
+        elseif(_component STREQUAL Text)
+            set_property(TARGET Magnum::${_component} APPEND PROPERTY
+                INTERFACE_LINK_LIBRARIES Corrade::PluginManager)

         # TextureTools library
         elseif(_component STREQUAL TextureTools)
             set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Atlas.h)
-        endif()
+
+        # Trade library
+        elseif(_component STREQUAL Trade)
+            set_property(TARGET Magnum::${_component} APPEND PROPERTY
+                INTERFACE_LINK_LIBRARIES Corrade::PluginManager)
+        endif()
+
+        # No special setup for AnyAudioImporter plugin
+        # No special setup for AnyImageConverter plugin
+        # No special setup for AnyImageImporter plugin
+        # No special setup for AnySceneImporter plugin
+        # No special setup for MagnumFont plugin
+        # No special setup for MagnumFontConverter plugin
+        # No special setup for ObjImporter plugin
+        # No special setup for TgaImageConverter plugin
+        # No special setup for TgaImporter plugin
+        # No special setup for WavAudioImporter plugin

         # Find library/plugin includes
         if(_component MATCHES ${_MAGNUM_LIBRARY_COMPONENTS} OR _component MATCHES ${_MAGNUM_PLUGIN_COMPONENTS})


FindMagnum.cmake: use CORRADE_*_LIBRARIES, not *_LIBRARY.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -311,8 +311,8 @@
     ${MAGNUM_INCLUDE_DIR}/OpenGL
     ${CORRADE_INCLUDE_DIR})
 set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARY}
-    ${CORRADE_UTILITY_LIBRARY}
-    ${CORRADE_PLUGINMANAGER_LIBRARY})
+    ${CORRADE_UTILITY_LIBRARIES}
+    ${CORRADE_PLUGINMANAGER_LIBRARIES})
 if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
     set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES} ${OPENGL_gl_LIBRARY})
 else()


Squashed '3rdparty/github/cmake-utils/' changes from d480cb97..e13b3c7a

e13b3c7a Fix FP constants

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

--- cmake/FindFpclassify.cmake
+++ cmake/FindFpclassify.cmake
@@ -41,7 +41,7 @@
               COMPILE_DEFINITIONS -DC_${KEYWORD}=${KEYWORD} -DHAVE_MATH_H=${_HAVE_MATH_H} -DHAVE_FLOAT_H=${_HAVE_FLOAT_H})
             IF (C_HAS_${KEYWORD})
               MESSAGE(STATUS "Looking for ${KEYWORD} - found")
-              SET (C_${KEYWORD} "${_C_${KEYWORD}}" CACHE STRING "C ${KEYWORD} implementation")
+              SET (C_${KEYWORD} ${KEYWORD} CACHE STRING "C ${KEYWORD} implementation")
               MARK_AS_ADVANCED (C_${KEYWORD})
             ENDIF ()
           ENDFOREACH ()


Use project-wide lock for InstallPackage.cmake

Former-commit-id: 106d80561b59eadb6a98aa174e8e555d53e7c564

--- cmake/InstallPackage.cmake
+++ cmake/InstallPackage.cmake
@@ -26,7 +26,7 @@
 # by running cmake in a subprocess. The current CMake configuration is transmitted
 # by setting the flags manually.
 function(install_package pkg_name)
-    file(LOCK $ENV{HOME} DIRECTORY GUARD FUNCTION TIMEOUT 600)
+    file(LOCK $ENV{HOME}/cmake.${PROJECT_NAME}.lock GUARD FUNCTION TIMEOUT 600)

     set(options CONFIG MODULE CHECK QUIET DEBUG INSTALL_PREFIX_PKGNAME)
     set(oneValueArgs VERSION INSTALL_DIR BUILD_DIR FIND_NAME TARGET_NAME)
@@ -168,17 +168,22 @@
         endif()
         foreach(tgt ${PKG_TARGET_HINTS})
             if(TARGET ${tgt})
-                set(${pkg_name}_TARGET ${tgt})
-                set(${pkg_name}_TARGET ${tgt} PARENT_SCOPE)
-                set(${pkg_name}_FOUND TRUE PARENT_SCOPE)
-                set(${pkg_find_name}_TARGET ${tgt} PARENT_SCOPE)
-                set(${pkg_find_name}_FOUND TRUE PARENT_SCOPE)
-                mark_as_advanced(${pkg_name}_TARGET)
+                set(PKG_${pkg_name}_TARGET ${tgt})
+                set(PKG_${pkg_name}_TARGET ${tgt} PARENT_SCOPE)
+                set(PKG_${pkg_name}_FOUND TRUE PARENT_SCOPE)
+                set(PKG_${pkg_find_name}_TARGET ${tgt} PARENT_SCOPE)
+                set(PKG_${pkg_find_name}_FOUND TRUE PARENT_SCOPE)
+                set(PKG_INSTALLED_TARGETS ${PKG_INSTALLED_TARGETS};${tgt})
+                list(REMOVE_DUPLICATES PKG_INSTALLED_TARGETS)
+                set(PKG_INSTALLED_TARGETS ${PKG_INSTALLED_TARGETS} PARENT_SCOPE)
+                mark_as_advanced(PKG_${pkg_name}_TARGET)
+                mark_as_advanced(PKG_${pkg_find_name}_TARGET)
+                mark_as_advanced(PKG_INSTALLED_TARGETS)
                 break()
             endif()
         endforeach()
-        if(${pkg_name}_TARGET)
-            message(DEBUG "Found ${pkg_name}: [${${pkg_name}_TARGET}]")
+        if(TARGET ${PKG_${pkg_name}_TARGET})
+            message(DEBUG "Found ${pkg_name}: [${PKG_${pkg_name}_TARGET}]")
         else()
             message(WARNING "Found ${pkg_name} but no target matches [${PKG_TARGET_HINTS}]")
         endif()
@@ -310,17 +315,22 @@
     endif()
     foreach(tgt ${PKG_TARGET_HINTS})
         if(TARGET ${tgt})
-            set(${pkg_name}_TARGET ${tgt})
-            set(${pkg_name}_TARGET ${tgt} PARENT_SCOPE)
-            set(${pkg_name}_FOUND TRUE PARENT_SCOPE)
-            set(${pkg_find_name}_TARGET ${tgt} PARENT_SCOPE)
-            set(${pkg_find_name}_FOUND TRUE PARENT_SCOPE)
-            mark_as_advanced(${pkg_name}_TARGET)
+            set(PKG_${pkg_name}_TARGET ${tgt})
+            set(PKG_${pkg_name}_TARGET ${tgt} PARENT_SCOPE)
+            set(PKG_${pkg_name}_FOUND TRUE PARENT_SCOPE)
+            set(PKG_${pkg_find_name}_TARGET ${tgt} PARENT_SCOPE)
+            set(PKG_${pkg_find_name}_FOUND TRUE PARENT_SCOPE)
+            set(PKG_INSTALLED_TARGETS ${PKG_INSTALLED_TARGETS};${tgt})
+            list(REMOVE_DUPLICATES PKG_INSTALLED_TARGETS)
+            set(PKG_INSTALLED_TARGETS ${PKG_INSTALLED_TARGETS} PARENT_SCOPE)
+            mark_as_advanced(PKG_${pkg_name}_TARGET)
+            mark_as_advanced(PKG_${pkg_find_name}_TARGET)
+            mark_as_advanced(PKG_INSTALLED_TARGETS)
             break()
         endif()
     endforeach()
-    if(${pkg_name}_TARGET)
-        message(DEBUG "Found ${pkg_name}: [${${pkg_name}_TARGET}]")
+    if(TARGET ${PKG_${pkg_name}_TARGET})
+        message(DEBUG "Found ${pkg_name}: [${PKG_${pkg_name}_TARGET}]")
     else()
         message(WARNING "Found ${pkg_name} but no target matches [${PKG_TARGET_HINTS}]")
     endif()


Updated SHA for OpenVINO on windows to fix onnx bug

--- cmake/ModuleOpenVINO.cmake
+++ cmake/ModuleOpenVINO.cmake
@@ -3,7 +3,7 @@
     if(WIN32)
         fast_download_dependency(openvino
                 2021.4.2
-		7268d5ab14366e2df017a955ca2aa95c7cbd9a6c690f45113a26fb86d9199714
+		fce4a6699f1a53a634645529048fe02fa6bb5128f6293de3778b6ceb4c682176
         )
     elseif(APPLE)
         fast_download_dependency(openvino


cmake git submodules handle all paths consistently

 - relative to the PX4 source directory root

--- cmake/common/px4_git.cmake
+++ cmake/common/px4_git.cmake
@@ -68,19 +68,28 @@
 		REQUIRED TARGET PATH
 		ARGN ${ARGN})

-	execute_process(COMMAND ${PX4_SOURCE_DIR}/Tools/check_submodules.sh ${PATH}
-			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-			)
+	set(REL_PATH)
+
+	if(IS_ABSOLUTE ${PATH})
+		file(RELATIVE_PATH REL_PATH ${PX4_SOURCE_DIR} ${PATH})
+	else()
+		file(RELATIVE_PATH REL_PATH ${PX4_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${PATH})
+	endif()
+
+	execute_process(
+		COMMAND Tools/check_submodules.sh ${REL_PATH}
+		WORKING_DIRECTORY ${PX4_SOURCE_DIR}
+		)

 	string(REPLACE "/" "_" NAME ${PATH})
 	string(REPLACE "." "_" NAME ${NAME})

 	add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/git_init_${NAME}.stamp
-		COMMAND bash ${PX4_SOURCE_DIR}/Tools/check_submodules.sh ${PATH}
+		COMMAND Tools/check_submodules.sh ${REL_PATH}
 		COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/git_init_${NAME}.stamp
 		DEPENDS ${PX4_SOURCE_DIR}/.gitmodules ${PATH}/.git
-		COMMENT "git submodule ${PATH}"
-		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+		COMMENT "git submodule ${REL_PATH}"
+		WORKING_DIRECTORY ${PX4_SOURCE_DIR}
 		USES_TERMINAL
 		)


[cmake] check the presence of opensslconf.h

--- cmake/import_openssl.cmake
+++ cmake/import_openssl.cmake
@@ -24,7 +24,7 @@
 	)

 if(NOT OPENSSL_INC_DIR)
-	axl_find_inc_dir(OPENSSL_INC_DIR openssl/obj_mac.h)
+	axl_find_inc_dir(OPENSSL_INC_DIR openssl/opensslconf.h)
 endif()

 if(NOT OPENSSL_LIB_DIR)
@@ -56,7 +56,7 @@
 		)
 endif()

-if(EXISTS ${OPENSSL_INC_DIR}/openssl/obj_mac.h)
+if(EXISTS ${OPENSSL_INC_DIR}/openssl/opensslconf.h)
 	axl_message("OpenSSL paths:")
 	axl_message("    Includes:"       "${OPENSSL_INC_DIR}")
 	axl_message("    Libraries:"      "${OPENSSL_LIB_DIR}")


cmake: GNUInstallDirs must be included after project()

GNUInstallDirs uses CMAKE_SYSTEM_NAME, which is defined only
after project()

It works in Ubuntu, because they add a local hack which ends
up bypassing the relevant bits of GNUInstallDirs.cmake, but
when using CMake from source, or when using any other
distribution, the way GNUInstallDirs is used in the AWS C++
SDK doesn't work.

By moving the call to GNUInstallDirs into the
apply_post_project_platform_settings() macro, things seem to
work OK.

Tested on Debian Jessie/Stretch/Sid as well as
Ubuntu Trusty/Xenial.

See #527

Signed-off-by: André Draszik <46f1a0bd5592a2f9244ca321b129902a06b53e03@andred.net>

--- cmake/platform/linux.cmake
+++ cmake/platform/linux.cmake
@@ -1,8 +1,6 @@

 message(STATUS "Generating linux build config")
 set(SDK_INSTALL_BINARY_PREFIX "linux")
-
-include(GNUInstallDirs)

 if(SIMPLE_INSTALL)
     include(CMakePackageConfigHelpers)
@@ -19,6 +17,8 @@
 endif()

 macro(apply_post_project_platform_settings)
+    include(GNUInstallDirs)
+
     if(CMAKE_SIZEOF_VOID_P EQUAL 8)
         set(SDK_INSTALL_BINARY_PREFIX "${SDK_INSTALL_BINARY_PREFIX}/intel64")
     else()


Include guard in vita.cmake

Include guard in vita.cmake

--- cmake_toolchain/vita.cmake
+++ cmake_toolchain/vita.cmake
@@ -10,6 +10,12 @@
 ##   - VITA_LIBS_GEN_FLAGS
 ##   - VITA_MKSFOEX_FLAGS
 ##   - VITA_PACK_VPK_FLAGS
+
+## add_include_guard() has been added in 3.10, but it's too recent so we don't use it
+if(__VITA_CMAKE_INCLUDED__)
+  return()
+endif()
+set(__VITA_CMAKE_INCLUDED__ TRUE)

 include(CMakeParseArguments)


Remove the annoying debug output for LTO

--- cmake/LTO.cmake
+++ cmake/LTO.cmake
@@ -218,7 +218,7 @@
           # Optional IPO. Do not use IPO if it's not supported by compiler.
           check_ipo_supported(RESULT __IPO_SUPPORTED OUTPUT output)
           if(NOT __IPO_SUPPORTED)
-            message(WARNING "IPO is not supported: ${output}")
+            message(status "IPO is not supported or broken.")
           else()
             message(STATUS "IPO is supported !")
           endif()


MPI cmake formatting.

MPI cmake formatting.

--- cmake/mpi.cmake
+++ cmake/mpi.cmake
@@ -23,14 +23,14 @@
   else()
     find_package(MPI)
     if (${MPI_COMPILER} STREQUAL "MPI_COMPILER-NOTFOUND")
-      find_program(MPI_COMPILER
-	NAMES mpicxx
-	PATHS /usr/lib64/openmpi/bin
-	DOC "MPI compiler.")
+      find_program(MPI_COMPILER
+        NAMES mpicxx
+        PATHS /usr/lib64/openmpi/bin
+        DOC "MPI compiler.")
       find_library(MPI_LIBRARY
-	NAMES mpi
-	PATHS /usr/lib64/openmpi/lib
-	DOC "MPI library.")
+        NAMES mpi
+        PATHS /usr/lib64/openmpi/lib
+        DOC "MPI library.")
       SET(MPI_LIBRARIES ${MPI_LIBRARY})
     endif()
     SET(OSPRAY_MPI_MULTI_THREADING_FLAG "") #???


[cmake] explicitly set linker language for static libraries (#37642)

This mimicks the same logic used for shared libraries a few lines above.

This will allow the minimal freestanding stdlib to build with #37511, solving errors like

```
ninja: error: build.ninja:4213: multiple rules generate stdlib/public/SwiftOnoneSupport/CMakeFiles/
swiftSwiftOnoneSupport-freestanding-x86_64-static.dir/__/__/
linker-support/magic-symbols-for-install-name.c.o [-w dupbuild=err]
```

Addresses rdar://78336832

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -1343,6 +1343,16 @@
       ${library_search_directories})
     target_link_libraries("${target_static}" PRIVATE
         ${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
+
+    # Force executables linker language to be CXX so that we do not link using the
+    # host toolchain swiftc.
+    if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "ANDROID")
+      set_property(TARGET "${target_static}" PROPERTY
+        LINKER_LANGUAGE "C")
+    else()
+      set_property(TARGET "${target_static}" PROPERTY
+        LINKER_LANGUAGE "CXX")
+    endif()
   endif()

   # Do not add code here.


Add missing header to install target for luajit

--- external/luajit/luajit.cmake
+++ external/luajit/luajit.cmake
@@ -75,6 +75,7 @@

 install(DIRECTORY ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/${INSTALL_FULLDIR}/lib DESTINATION ${INSTALL_DIR})
 install(DIRECTORY ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/${INSTALL_FULLDIR}/share DESTINATION ${INSTALL_DIR})
+install(FILES ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/src/lua.h ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/src/luaconf.h ${CMAKE_BINARY_DIR}/${LUAJIT_DIR}/src/lualib.h DESTINATION ${HAKA_INSTALL_PREFIX}/include)

 set(HAKA_LUAJIT 1)
 set(HAKA_LUA51 1)


cmake-modules :
 + added zlib to cmake script for finding glade because of latest fedora

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@2203 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyGlade.cmake
+++ trunk/cmake-modules/FindThirdPartyGlade.cmake
@@ -21,7 +21,7 @@
 	ADD_DEFINITIONS(${GLADE_CFLAGS} ${GTHREAD_CFLAGS})
 	ADD_DEFINITIONS(${GLADE_CFLAGS_OTHERS} ${GTHREAD_CFLAGS_OTHERS})
 	LINK_DIRECTORIES(${GLADE_LIBRARY_DIRS} ${GTHREAD_LIBRARY_DIRS})
-	FOREACH(GLADE_LIB ${GLADE_LIBRARIES} ${GTHREAD_LIBRARIES})
+	FOREACH(GLADE_LIB ${GLADE_LIBRARIES} ${GTHREAD_LIBRARIES} z)
 		SET(GLADE_LIB1 "GLADE_LIB1-NOTFOUND")
 		FIND_LIBRARY(GLADE_LIB1 NAMES ${GLADE_LIB} PATHS ${GLADE_LIBRARY_DIRS} ${GLADE_LIBDIR} NO_DEFAULT_PATH)
 		FIND_LIBRARY(GLADE_LIB1 NAMES ${GLADE_LIB})


iox-#1345 CMake fix to completely disable logging output

--- iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake
+++ iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake
@@ -16,7 +16,7 @@

 message(STATUS "[i] <<<<<<<<<<<<< Start iceoryx_hoofs configuration: >>>>>>>>>>>>>")

-if(NOT IOX_MINIMAL_LOG_LEVEL)
+if(NOT DEFINED IOX_MINIMAL_LOG_LEVEL)
     set(IOX_MINIMAL_LOG_LEVEL "TRACE")
 endif()
 message(STATUS "[i] IOX_MINIMAL_LOG_LEVEL: " ${IOX_MINIMAL_LOG_LEVEL})


Tweak CPack settings for Windows

Tweak CPack settings for Windows

--- CMake/CPackConfig.cmake
+++ CMake/CPackConfig.cmake
@@ -24,4 +24,5 @@
 set(CPACK_COMPONENT_DEV_DESCRIPTION
   "Header and Library Files for ${CPACK_PROJECT_NAME} Development")

+set(CPACK_NSIS_MODIFY_PATH OFF) # no binaries installed
 include(CommonCPack)


COMP: WIP: missing cmake endif()

COMP: WIP: missing cmake endif()

--- CMake/selxModules.cmake
+++ CMake/selxModules.cmake
@@ -137,6 +137,7 @@
     # Aggregate all interface headers in a separate target for Visual Studio IDE.
     if( ${MODULE}_INTERFACE_FILES )
         target_sources( Interfaces PUBLIC ${${MODULE}_INTERFACE_FILES} )
+    endif()
     if( ${MODULE}_LIBRARY_DIRS )
       list( APPEND SUPERELASTIX_LIBRARY_DIRS ${${MODULE}_LIBRARY_DIRS} )
     endif()


Fix specfile. Use flexisip-proxy instead of "flexisip" for systemd targets.

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -145,7 +145,7 @@
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
 install -p -m 0644 scripts/flexisip-logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d

-install -p -m 0744 scripts/flexisip_stats.py $RPM_BUILD_ROOT%{_bindir}
+install -p -m 0744 scripts/flexisip_cli.py $RPM_BUILD_ROOT%{_bindir}
 install -p -m 0744 scripts/flexisip_monitor.py $RPM_BUILD_ROOT%{_bindir}

 %check
@@ -156,24 +156,33 @@

 %post
 if [ $1 = 1 ]; then
-  /sbin/chkconfig --add flexisip
-  /sbin/chkconfig flexisip on
-  service flexisip start
+  /sbin/chkconfig --add flexisip-proxy
+  /sbin/chkconfig flexisip-proxy on
+  service flexisip-proxy start

   %if @ENABLE_PRESENCE@
   /sbin/chkconfig --add flexisip-presence
   /sbin/chkconfig flexisip-presence on
   service flexisip-presence start
   %endif
+  %if @ENABLE_CONFERENCE@
+  /sbin/chkconfig --add flexisip-conference
+  /sbin/chkconfig flexisip-conference on
+  service flexisip-conference start
+  %endif
 fi

 %preun
 if [ $1 = 0 ]; then
-  service flexisip stop >/dev/null 2>&1 ||:
-  /sbin/chkconfig --del flexisip
+  service flexisip-proxy stop >/dev/null 2>&1 ||:
+  /sbin/chkconfig --del flexisip-proxy
 %if @ENABLE_PRESENCE@
   service flexisip-presence stop >/dev/null 2>&1 ||:
   /sbin/chkconfig --del flexisip-presence
+%endif
+%if @ENABLE_CONFERENCE@
+  service flexisip-conference stop >/dev/null 2>&1 ||:
+  /sbin/chkconfig --del flexisip-conference
 %endif
 fi

@@ -182,6 +191,9 @@
   service flexisip condrestart > /dev/null 2>&1 ||:
 %if @ENABLE_PRESENCE@
   service flexisip-presence condrestart > /dev/null 2>&1 ||:
+%endif
+%if @ENABLE_CONFERENCE@
+  service flexisip-conference condrestart > /dev/null 2>&1 ||:
 %endif
 fi


Fix issue that re-generated message headers every time rosmake got called. #3396

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -783,7 +783,7 @@
     # But we set it to the current time, because setting it to zero causes
     # annoying warning, #3396.
     execute_process(
-      COMMAND python -c "import os; os.utime('${PROJECT_SOURCE_DIR}/srv_gen/generated', None)"
+      COMMAND python -c "import os; os.utime('${PROJECT_SOURCE_DIR}/srv_gen/generated', (1, 1))"
       ERROR_VARIABLE _set_mtime_error
       RESULT_VARIABLE _set_mtime_failed
       OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -820,7 +820,7 @@
     # But we set it to the current time, because setting it to zero causes
     # annoying warning, #3396.
     execute_process(
-      COMMAND python -c "import os; os.utime('${PROJECT_SOURCE_DIR}/msg_gen/generated', None)"
+      COMMAND python -c "import os; os.utime('${PROJECT_SOURCE_DIR}/msg_gen/generated', (1, 1))"
       ERROR_VARIABLE _set_mtime_error
       RESULT_VARIABLE _set_mtime_failed
       OUTPUT_STRIP_TRAILING_WHITESPACE)


bump required cmake version

bump required cmake version

--- README.cmake
+++ README.cmake
@@ -22,7 +22,7 @@
 How to use it?
 ==============

-1. You need CMake 2.6.3 or later to build FluidSynth
+1. You need CMake 3.0.2 or later to build FluidSynth

 2. Unpack the FluidSynth sources somewhere, or checkout the repository,
    and create a build directory. For instance, using a command line shell:


update FindGflags.cmake to work on CentOS 8.x (#1409)

Summary:
Update FindGflags.cmake to work on recent CentOS and RedHat distributions.

On these distributions the CMake package configuration installed by the
gflags-devel RPM is slightly broken, and sets `gflags_INCLUDE_DIR` to a
directory that does not exist.  This happens because `/lib64` is symlinked to
`/usr/lib64`, and CMake ends up searching `/lib64` before `/usr/lib64` by
default when searching for packages.  Therefore it finds `gflags-config.cmake`
via the `/lib64` symlink.  However, `gflags-config.cmake` computes the include
directory relative to where its config file was found, and this relative path
computation only works when using the actual `/usr/lib64` path where it was
installed.  When found via `/lib64` it returns a bogus `//include` path that
does not exist.

This updates `FindGflags.cmake` to verify if the `gflags_INCLUDE_DIR` path
actually exists, and set it to a sane location instead.

This also updates the code to use the `gflags-shared` target that is exported
by the default gflags package configuration if it was only built as a shared
library.

Pull Request resolved: https://github.com/facebook/folly/pull/1409

Reviewed By: yfeldblum

Differential Revision: D23588288

fbshipit-source-id: b68a717953ae0521f568d7bcfd05ca33cd6dc578

--- build/fbcode_builder/CMake/FindGflags.cmake
+++ build/fbcode_builder/CMake/FindGflags.cmake
@@ -41,6 +41,16 @@
   # Re-export the config-specified libs with our local names
   set(LIBGFLAGS_LIBRARY ${gflags_LIBRARIES})
   set(LIBGFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR})
+  if(NOT EXISTS "${gflags_INCLUDE_DIR}")
+    # The gflags-devel RPM on recent RedHat-based systems is somewhat broken.
+    # RedHat symlinks /lib64 to /usr/lib64, and this breaks some of the
+    # relative path computation performed in gflags-config.cmake.  The package
+    # config file ends up being found via /lib64, but the relative path
+    # computation it does only works if it was found in /usr/lib64.
+    # If gflags_INCLUDE_DIR does not actually exist, simply default it to
+    # /usr/include on these systems.
+    set(LIBGFLAGS_INCLUDE_DIR "/usr/include")
+  endif()
   set(LIBGFLAGS_FOUND ${gflags_FOUND})
   # cmake module compat
   set(GFLAGS_FOUND ${gflags_FOUND})
@@ -76,6 +86,20 @@
 # Compat with the gflags CONFIG based detection
 if (LIBGFLAGS_FOUND AND NOT TARGET gflags)
   add_library(gflags UNKNOWN IMPORTED)
-  set_target_properties(gflags PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}")
-  set_target_properties(gflags PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}")
+  if(TARGET gflags-shared)
+    # If the installed gflags CMake package config defines a gflags-shared
+    # target but not gflags, just make the gflags target that we define
+    # depend on the gflags-shared target.
+    target_link_libraries(gflags INTERFACE gflags-shared)
+    # Export LIBGFLAGS_LIBRARY as the gflags-shared target in this case.
+    set(LIBGFLAGS_LIBRARY gflags-shared)
+  else()
+    set_target_properties(
+      gflags
+      PROPERTIES
+        IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+        IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}"
+        INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}"
+    )
+  endif()
 endif()


setting compression type to use for the source archive

--- Resources/CPack/PackageProject.cmake
+++ Resources/CPack/PackageProject.cmake
@@ -122,11 +122,11 @@
     SET(CPACK_BINARY_ZIP "OFF")
 ENDIF(WIN32 AND NOT UNIX)

-SET(CPACK_SOURCE_GENERATOR "ZIP")
+SET(CPACK_SOURCE_GENERATOR "TGZ")
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "OpenMBIR-${OpenMBIR_VERSION_SHORT}-Source")

 #-- Create a bash script file that will upload the latest version to the web server
-set (UPLOAD_FILE_NAME ${CPACK_SOURCE_PACKAGE_FILE_NAME}.zip)
+set (UPLOAD_FILE_NAME ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz)
 configure_file(${PROJECT_RESOURCES_DIR}/upload.sh.in
                ${PROJECT_BINARY_DIR}/src_upload.sh)


Update FW with object tracker KCF fixes

Update FW with object tracker KCF fixes

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "3d9de41af6dc3ea065110836fe05fe2d895795b9")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "f825fda83e06a392d79d2c787ce5e452fabe149b")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Do not enable builtin_xxhash if fail-on-missing=ON

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -242,10 +242,14 @@
 #---Check for xxHash-----------------------------------------------------------------
 if(NOT builtin_xxhash)
   message(STATUS "Looking for xxHash")
-  find_package(xxHash)
-  if(NOT xxHash_FOUND)
-    message(STATUS "xxHash not found. Switching on builtin_xxhash option")
-    set(builtin_xxhash ON CACHE BOOL "" FORCE)
+  if(fail-on-missing)
+    find_package(xxHash REQUIRED)
+  else()
+    find_package(xxHash)
+    if(NOT xxHash_FOUND)
+      message(STATUS "xxHash not found. Switching on builtin_xxhash option")
+      set(builtin_xxhash ON CACHE BOOL "" FORCE)
+    endif()
   endif()
 endif()


Fix builtin_vdt for ARM (tries to use SSE)

The dependency added in the previous commit is not actually necessary,
as it's implicit from the BUILD_BYPRODUCTS of ExternalProject_Add, the
real issue was only that Vdt has SSE enabled by default, and on ARM that
causes problems. This disables the option that adds -msse to CXXFLAGS,
and lets Vdt inherit the C++ compiler and flags from ROOT instead
(including any architecture-specific and optimization flags).

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1456,7 +1456,14 @@
       URL ${lcgpackages}/vdt-${vdt_version}.tar.gz
       URL_HASH SHA256=020ae76518d67476c3cb9a3fdf0683ee982d6b1a5898739000072ce34063072c
       INSTALL_DIR ${CMAKE_BINARY_DIR}
-      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+      CMAKE_ARGS
+        -DSSE=OFF # breaks on ARM without this
+        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+        -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
+        -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+        -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
       BUILD_BYPRODUCTS ${VDT_LIBRARIES}
     )
@@ -1473,9 +1480,6 @@
   add_library(Vdt::Vdt INTERFACE IMPORTED)
   set_property(TARGET Vdt::Vdt PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${VDT_INCLUDE_DIRS}")
   set_property(TARGET Vdt::Vdt PROPERTY INTERFACE_LINK_LIBRARIES "${VDT_LIBRARIES}")
-  if(TARGET VDT)
-    add_dependencies(Vdt::Vdt VDT)
-  endif()
 endif()

 #---Check for VecGeom--------------------------------------------------------------------


[cmake] Inject CMAKE_OSX_SYSROOT into sub-CMake of googletest.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1559,6 +1559,10 @@
       -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=\\\"\\\"
       -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=\\\"\\\")
   endif()
+  if(APPLE)
+    set(EXTRA_GTEST_OPTS
+      -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT})
+  endif()

   ExternalProject_Add(
     googletest


tools: Generate images for ESP32-C2 with required minimal revision

--- components/esptool_py/project_include.cmake
+++ components/esptool_py/project_include.cmake
@@ -55,6 +55,9 @@
 endif()
 if(CONFIG_ESP32C3_REV_MIN)
     set(min_rev ${CONFIG_ESP32C3_REV_MIN})
+endif()
+if(CONFIG_IDF_TARGET_ESP32C2)
+    set(min_rev 1)
 endif()

 if(min_rev)


finder cmake

finder cmake


BUG: set _SB_CURL_LIBRARY with correct path on windows. libname is libcurl_imp.lib

--- SuperBuild/CMake/External_curl.cmake
+++ SuperBuild/CMake/External_curl.cmake
@@ -55,3 +55,10 @@
   )

 SUPERBUILD_PATCH_SOURCE(CURL)
+
+set(_SB_CURL_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
+if(WIN32)
+  set(_SB_CURL_LIBRARY "${SB_INSTALL_PREFIX}/lib/libcurl_imp.lib")
+elseif(UNIX)
+  set(_SB_CURL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libcurl${CMAKE_SHARED_LIBRARY_SUFFIX})
+endif()


Fix: c/p error in cmake module. Closes #270

--- cmake/Modules/FindCheck.cmake
+++ cmake/Modules/FindCheck.cmake
@@ -6,7 +6,7 @@
 #  CHECK_DEFINITIONS - Compiler switches required for using check

 find_package(PkgConfig)
-pkg_check_modules(PC_CHECK QUIET libxml-2.0)
+pkg_check_modules(PC_CHECK QUIET check)

 set(CHECK_DEFINITIONS ${PC_CHECK_CFLAGS_OTHER})


add /usr/include to FindRDKit.cmake search path

--- cmake/Modules/FindRDKit.cmake
+++ cmake/Modules/FindRDKit.cmake
@@ -40,6 +40,7 @@
           $ENV{RDKIT_INCLUDE_PATH}
           $ENV{RDKIT_BASE}/Code
           $ENV{RDBASE}/Code
+	  /usr/include/rdkit
           /usr/local/include/rdkit
           /usr/local/rdkit/include/Code
           /usr/local/rdkit/include


Disable OpenGL when Gtk3 is selected

Disable OpenGL when Gtk3 is selected

The OpenGL library is not supported on Gtk3 which uses the cairo
library for rendering. Cairo, in turn uses hardware acceleration when
supported by the underlying system. Some improvement to performance
may be gained by useing the cairo-gl and cairo-glx libraries included
on modern Gtk3 systems.

See the cairo documentation for further information. The following
link may also be of interest.

http://lists.cairographics.org/archives/cairo/2012-October/023609.html

--- cmake/OpenCVFindLibsGUI.cmake
+++ cmake/OpenCVFindLibsGUI.cmake
@@ -47,7 +47,7 @@
     CHECK_MODULE(gtk+-2.0 HAVE_GTK)
   endif()
   CHECK_MODULE(gthread-2.0 HAVE_GTHREAD)
-  if(WITH_OPENGL)
+  if(WITH_OPENGL AND NOT HAVE_GTK3)
     CHECK_MODULE(gtkglext-1.0 HAVE_GTKGLEXT)
   endif()
 endif()


fix name typo

fix name typo

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -71,8 +71,8 @@

 # FIXME(gangliao): generate cblas target to track all high performance
 # linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)
-SET(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/lib_any_dummy.c)
-FILE(WRITE ${dummyfile} "const char * dummy_any = \"${dummyfile}\";")
+SET(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/cblas_dummy.c)
+FILE(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
 ADD_LIBRARY(cblas STATIC ${dummyfile})
 TARGET_LINK_LIBRARIES(cblas ${CBLAS_LIBRARIES})


fix bug of the cmake variable protobuf_MSVC_STATIC_CRT (#22598)

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -194,7 +194,8 @@
     IF(WIN32)
         SET(OPTIONAL_ARGS ${OPTIONAL_ARGS}
             "-DCMAKE_GENERATOR=${CMAKE_GENERATOR}"
-            "-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}")
+            "-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}"
+            "-Dprotobuf_MSVC_STATIC_RUNTIME=${MSVC_STATIC_CRT}")
     ENDIF()

     SET(PROTOBUF_REPOSITORY  https://github.com/protocolbuffers/protobuf.git)
@@ -224,7 +225,6 @@
                         -DCMAKE_INSTALL_PREFIX=${PROTOBUF_INSTALL_DIR}
                         -DCMAKE_INSTALL_LIBDIR=lib
                         -DBUILD_SHARED_LIBS=OFF
-                        -Dprotobuf_MSVC_STATIC_RUNTIME=${MSVC_STATIC_CRT}
         CMAKE_CACHE_ARGS
                         -DCMAKE_INSTALL_PREFIX:PATH=${PROTOBUF_INSTALL_DIR}
                         -DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}


cmake/modules/FindNUMPY.cmake: Changed to reflect that NumPy is a required dependency.

--- cmake/modules/FindNUMPY.cmake
+++ cmake/modules/FindNUMPY.cmake
@@ -14,22 +14,20 @@
             SET(PYTHON_NUMPY_INCLUDE_DIR "PYTHON_NUMPY_INCLUDE_DIR-NOTFOUND")
         ENDIF()
     ENDIF()
-ELSE()
-    SET(PYTHON_NUMPY_INCLUDE_DIR "PYTHON_NUMPY_INCLUDE_DIR-NOTFOUND")
 ENDIF()

 SET(PYTHON_NUMPY_INCLUDE_DIR ${PYTHON_NUMPY_INCLUDE_DIR}
     CACHE PATH "Path to numpy include files" FORCE)

 IF(PYTHON_NUMPY_INCLUDE_DIR)
-    SET(NUMPY_FOUND TRUE)
+    MESSAGE(STATUS "Found Numpy")
+    MESSAGE(STATUS "  > includes:      ${PYTHON_NUMPY_INCLUDE_DIR}")
+ENDIF()

-    IF (NOT Numpy_FIND_QUIETLY)
-      MESSAGE(STATUS "Found Numpy")
-      MESSAGE(STATUS "  > includes:      ${PYTHON_NUMPY_INCLUDE_DIR}")
-    ENDIF()
-ELSE()
-    IF(Numpy_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find Numpy")
-    ENDIF()
-ENDIF()
+# handle the QUIETLY and REQUIRED arguments and set NUMPY_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMPY DEFAULT_MSG PYTHON_NUMPY_INCLUDE_DIR )
+
+MARK_AS_ADVANCED(PYTHON_NUMPY_INCLUDE_DIR)
+


ARROW-16683: [C++] Add missing dependency to bundled gflags target

Closes #13256 from kou/cpp-gflags-dependency

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1379,6 +1379,7 @@
   add_dependencies(toolchain gflags_ep)

   add_thirdparty_lib(gflags::gflags_static STATIC ${GFLAGS_STATIC_LIB})
+  add_dependencies(gflags::gflags_static gflags_ep)
   set(GFLAGS_LIBRARY gflags::gflags_static)
   set_target_properties(${GFLAGS_LIBRARY}
                         PROPERTIES INTERFACE_COMPILE_DEFINITIONS "GFLAGS_IS_A_DLL=0"


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -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 06)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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   08)
+SET(KWSYS_DATE_STAMP_DAY   09)


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

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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

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


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

 # 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
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2012)

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Don't try to install 3p-leapmotion when leap support is disabled.

--- indra/cmake/LeapMotion.cmake
+++ indra/cmake/LeapMotion.cmake
@@ -6,19 +6,21 @@
   set(LEAPMOTION ON CACHE BOOL "Building with Leap Motion Controller support.")
 endif (INSTALL_PROPRIETARY)

-if (STANDALONE)
-  # *TODO: Standalone support
-else (STANDALONE)
-  include(Prebuilt)
-  use_prebuilt_binary(leap-motion)
-if (DARWIN)
+if( LEAPMOTION )
+  if (STANDALONE)
+    # *TODO: Standalone support
+  else (STANDALONE)
+    include(Prebuilt)
+    use_prebuilt_binary(leap-motion)
+  if (DARWIN)
     set(LEAP_MOTION_LIBRARY libLeap.dylib)
- elseif (WINDOWS)
-   set(LEAP_MOTION_LIBRARY
-	    debug Leapd.dll
-		optimized Leap.dll)
- elseif (LINUX)
-   set(LEAP_MOTION_LIBRARY libLeap.so)
- endif()
-  set(LEAP_MOTION_INCLUDE_DIR ${LIBS_OPEN_DIR}/leap-motion)
-endif (STANDALONE)
+  elseif (WINDOWS)
+    set(LEAP_MOTION_LIBRARY
+        debug Leapd.dll
+        optimized Leap.dll)
+   elseif (LINUX)
+     set(LEAP_MOTION_LIBRARY libLeap.so)
+   endif()
+    set(LEAP_MOTION_INCLUDE_DIR ${LIBS_OPEN_DIR}/leap-motion)
+  endif (STANDALONE)
+endif( LEAPMOTION )


Updated build information in README.cmake: -DBUILD_DASHBOARD_REPORTS=ON

--- README.cmake
+++ README.cmake
@@ -5,7 +5,7 @@
 # setup cmake for developers (debugging symbols on, optimization off, etc.):
 mkdir build-debug
 cd build-debug
-cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON -DTRACE_MEMORY_ALLOCS=OFF -DPythonModular=ON -DCMAKE_INSTALL_PREFIX="$BUILDDIR/install" ..
+cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON -DTRACE_MEMORY_ALLOCS=OFF -DPythonModular=ON -DBUILD_DASHBOARD_REPORTS=ON -DCMAKE_INSTALL_PREFIX="$BUILDDIR/install" ..

 # setup cmake for building the final binaries (debugging off, optimization on):
@@ -24,4 +24,10 @@
 # alternative build targets:
 make -j shogun # only compiling libshogun
 make -j shogun-unit-test # build unit test binary
-make -j unit-tests # build and run unit tests+make -j unit-tests # build and run unit tests
+
+
+# testing/debugging
+ctest -D ExperimentalMemCheck # runs all tests with valgrind (depends on -DBUILD_DASHBOARD_REPORTS=ON)
+cd tests/unit && valgrind --leak-check=full ./shogun-unit-test --gtest_filter=EPInferenceMethod.get_cholesky_probit_likelihood
+cd tests/unit && valgrind --leak-check=full ./shogun-unit-test --gtest_filter=EPInferenceMethod.*


CHG (#1397): perform application tests only with selected images

--- QApplications/MainApp/ApplicationTesting.cmake
+++ QApplications/MainApp/ApplicationTesting.cmake
@@ -1,38 +1,43 @@
-# tests without data
+# tests without data or empty nodes
+SET(datatypes Image Surface PointSet Node)
+
 IF(MITK_APPLICATION_TESTING)
   ADD_TEST(MainAppWithoutData ${EXECUTABLE_OUTPUT_PATH}/MainApp -noMITKOptions -testing)
-  ADD_TEST(MainApp_EmptyImage ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptyImage -noMITKOptions -testing)
-  ADD_TEST(MainApp_EmptySurface ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptySurface -noMITKOptions -testing)
-  ADD_TEST(MainApp_EmptyPointSet ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptyPointSet -noMITKOptions -testing)
-  ADD_TEST(MainApp_EmptyNode ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptyNode -noMITKOptions -testing)
+  FOREACH(datatype ${datatypes})
+    ADD_TEST(MainApp_Empty${datatype} ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmpty${datatype} -noMITKOptions -testing)
+  ENDFOREACH(datatype)
 ENDIF(MITK_APPLICATION_TESTING)
 IF(MITK_FUNCTIONALITY_TESTING)
   FOREACH(FUNC_NAME ${FUNC_LIBRARIES})
     ADD_TEST(${FUNC_NAME}_WithoutData ${EXECUTABLE_OUTPUT_PATH}/MainApp -noMITKOptions -testing ${FUNC_NAME})
-    ADD_TEST(${FUNC_NAME}_EmptyImage ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptyImage -noMITKOptions -testing ${FUNC_NAME})
-    ADD_TEST(${FUNC_NAME}_EmptySurface ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptySurface -noMITKOptions -testing ${FUNC_NAME})
-    ADD_TEST(${FUNC_NAME}_EmptyPointSet ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptyPointSet -noMITKOptions -testing ${FUNC_NAME})
-    ADD_TEST(${FUNC_NAME}_EmptyNode ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmptyNode -noMITKOptions -testing ${FUNC_NAME})
+    FOREACH(datatype ${datatypes})
+      ADD_TEST(${FUNC_NAME}_Empty${datatype} ${EXECUTABLE_OUTPUT_PATH}/MainApp -testEmpty${datatype} -noMITKOptions -testing ${FUNC_NAME})
+    ENDFOREACH(datatype)
   ENDFOREACH(FUNC_NAME)
 ENDIF(MITK_FUNCTIONALITY_TESTING)

-# now test with all data files found
-FILE(GLOB testdatalist ${MITK_SOURCE_DIR}/Testing/Data/*.*)
-LIST(REMOVE_ITEM testdatalist "${MITK_SOURCE_DIR}/Testing/Data/.svn")
-FOREACH(testdataitem ${testdatalist})
-
-  GET_FILENAME_COMPONENT(testdataname ${testdataitem} NAME)
+# now test with some data files
+SET(testdatadir ${MITK_SOURCE_DIR}/Testing/Data/)
+SET(testdatalist
+  binary.stl
+  lungs.vtk
+  Pic2DplusT.pic.gz
+  Pic3D.pic.gz
+  Png2D-bw.png
+  US4DCyl.pic.gz
+)
+FOREACH(testdataname ${testdatalist})

   IF(MITK_FUNCTIONALITY_TESTING)
     FOREACH(FUNC_NAME ${FUNC_LIBRARIES})
-    ADD_TEST(${FUNC_NAME}_${testdataname} ${EXECUTABLE_OUTPUT_PATH}/MainApp ${testdataitem} -noMITKOptions -testing ${FUNC_NAME})
+    ADD_TEST(${FUNC_NAME}_${testdataname} ${EXECUTABLE_OUTPUT_PATH}/MainApp ${testdatadir}/${testdataname} -noMITKOptions -testing ${FUNC_NAME})
     ENDFOREACH(FUNC_NAME)
   ENDIF(MITK_FUNCTIONALITY_TESTING)

   IF(MITK_APPLICATION_TESTING)
-    ADD_TEST(MainApp_${testdataname} ${EXECUTABLE_OUTPUT_PATH}/MainApp ${testdataitem} -noMITKOptions -testing)
+    ADD_TEST(MainApp_${testdataname} ${EXECUTABLE_OUTPUT_PATH}/MainApp ${testdatadir}/${testdataname} -noMITKOptions -testing)
   ENDIF(MITK_APPLICATION_TESTING)

-ENDFOREACH(testdataitem)
+ENDFOREACH(testdataname)


skip following steps in Continuous builds if one step fails

--- VCTest.cmake
+++ VCTest.cmake
@@ -15,10 +15,16 @@
       set(START_TIME ${CTEST_ELAPSED_TIME})
       CTEST_START (Continuous)
       CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
-      CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-      CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-      CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-      CTEST_SUBMIT (RETURN_VALUE res)
+      if(res)
+         CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+         if(res)
+            CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+            if(res)
+               CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+            endif(res)
+         endif(res)
+         CTEST_SUBMIT (RETURN_VALUE res)
+      endif(res)
       ctest_sleep(${START_TIME} 1200 ${CTEST_ELAPSED_TIME})
    endwhile()
 else($ENV{ctest_model} STREQUAL "Continuous")


[cmake] Fix missing hiredis libs when using only REDIS_CLIENT

The CMake find_package() rule was being invoked only when REDIS_SERVER
was set, causing linking errors when libjson-rpc-cpp was built with
REDIS_CLIENT only:

../../lib/libjsonrpccpp-client.so.1.0.0: undefined reference to `freeReplyObject'
../../lib/libjsonrpccpp-client.so.1.0.0: undefined reference to `redisFree'
../../lib/libjsonrpccpp-client.so.1.0.0: undefined reference to `redisCommand'
../../lib/libjsonrpccpp-client.so.1.0.0: undefined reference to `redisConnect'
collect2: error: ld returned 1 exit status

Fix the logic to search for redis also when REDIS_CLIENT is set, so that
the variables are filled correctly in.

--- cmake/CMakeDependencies.cmake
+++ cmake/CMakeDependencies.cmake
@@ -53,7 +53,7 @@
 endif()

 # find hiredis
-if (${REDIS_SERVER})
+if (${REDIS_SERVER} OR ${REDIS_CLIENT})

     find_package(Hiredis REQUIRED)
     message(STATUS "Hiredis header: ${HIREDIS_INCLUDE_DIRS}")


test with and without valgrind

test with and without valgrind

it passes\!

--- phSolver/common/test/testing.cmake
+++ phSolver/common/test/testing.cmake
@@ -15,6 +15,11 @@
 )
 add_test(
   NAME writeFtn
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 valgrind --log-file=vg.%p ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
+  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
   WORKING_DIRECTORY ${CASES}/incompressible/4-procs_case-SyncIO-2
 )
+add_test(
+  NAME writeFtnVG
+  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 valgrind --log-file=vg.%p --leak-check=yes ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
+  WORKING_DIRECTORY ${CASES}/incompressible/4-procs_case-SyncIO-2
+)


CPP-616 - Use uv/version.h as version file for libuv v1.21.0+

libuv v1.21.0+ changed where the version file is located.

--- cmake/modules/CppDriver.cmake
+++ cmake/modules/CppDriver.cmake
@@ -372,6 +372,8 @@

   if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h")
     set(LIBUV_VERSION_HEADER_FILE "${LIBUV_INCLUDE_DIR}/uv-version.h")
+  elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h")
+    set(LIBUV_VERSION_HEADER_FILE "${LIBUV_INCLUDE_DIR}/uv/version.h")
   else()
     set(LIBUV_VERSION_HEADER_FILE "${LIBUV_INCLUDE_DIR}/uv.h")
   endif()


Fix the copyright date on the FindNumPy module

--- cmake/modules/FindNumPy.cmake
+++ cmake/modules/FindNumPy.cmake
@@ -1,5 +1,5 @@
 #ckwg +4
-# Copyright 2010 by Kitware, Inc. All Rights Reserved. Please refer to
+# Copyright 2010, 2012 by Kitware, Inc. All Rights Reserved. Please refer to
 # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
 # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.


Fixed FindQJSON.cmake, FindPackage(QJSON) (without the REQUIRED flag) is no longer failing. Thanks to Aurélien Gâteau.

--- cmake/modules/FindQJSON.cmake
+++ cmake/modules/FindQJSON.cmake
@@ -17,7 +17,7 @@
     # use pkg-config to get the values of QJSON_INCLUDE_DIRS
     # and QJSON_LIBRARY_DIRS to add as hints to the find commands.
     include (FindPkgConfig)
-    pkg_check_modules (QJSON REQUIRED QJson>=0.5)
+    pkg_check_modules (QJSON QJson>=0.5)
   endif (NOT WIN32)

   find_library (QJSON_LIBRARIES


runsuite feature: adds a variable extra_ctest_args which can be defined to
pass extra args to ctest_test(), such as INCLUDE_LABEL.

SVN-Revision: 3007

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -49,6 +49,9 @@
 #      include("${PATH_TO_DR_EXPORTS}/cmake/runsuite_common_post.cmake")
 #    Also define build_source_package to build the package_source
 #    CPack target (only for non-Visual Studio generators).
+#
+# extra_ctest_args can also be defined to pass extra args to ctest_test(),
+# such as INCLUDE_LABEL.

 # Unfinished features in i#66 (now under i#121):
 # * have a list of known failures and label w/ " (known: i#XX)"
@@ -585,6 +588,7 @@
           set(ctest_test_args ${ctest_test_args} EXCLUDE ${arg_exclude})
         endif ("${cmake_ver_string}" VERSION_LESS "2.6.3")
       endif (NOT "${arg_exclude}" STREQUAL "")
+      set(ctest_test_args ${ctest_test_args} ${extra_ctest_args})
       if ("${cmake_ver_string}" VERSION_LESS "2.8.")
         # Parallel tests not supported
         set(RUN_PARALLEL OFF)
@@ -601,9 +605,9 @@
         # Note that adding -j to CMAKE_COMMAND does not work, though invoking
         # this script with -j does work, but we want parallel by default.
         ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}"
-          PARALLEL_LEVEL ${PROCESSOR_COUNT})
+          PARALLEL_LEVEL ${PROCESSOR_COUNT} ${ctest_test_args})
       else (RUN_PARALLEL)
-        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
+        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" ${ctest_test_args})
       endif (RUN_PARALLEL)
     endif (NOT test_only_in_long OR ${TEST_LONG})
   endif (build_success EQUAL 0 AND run_tests)


#55 Fix finding of headers in FindsfeMovie.cmake

--- cmake/Modules/FindsfeMovie.cmake
+++ cmake/Modules/FindsfeMovie.cmake
@@ -49,11 +49,9 @@
 	$ENV{SFEMOVIE_ROOT})

 find_path(
-	SFEMOVIE_INCLUDE_DIR
-	sfeMovie/Movie.hpp
-	PATH_SUFFIXES
-		include
-	PATHS ${LIBRARY_SEARCH_PATHS}}
+	SFEMOVIE_INCLUDE_DIR sfeMovie/Movie.hpp
+	PATH_SUFFIXES include
+	PATHS ${LIBRARY_SEARCH_PATHS}
 )

 find_library(


cmake: allow # in metadata

cmake: allow # in metadata

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -565,7 +565,7 @@
 	else ()
 	STRING(REGEX REPLACE "\"- +infos/status *= *([-a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/status\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
 	endif ()
-	STRING(REGEX REPLACE "\"- +infos/metadata *= *([/a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/metadata\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
+	STRING(REGEX REPLACE "\"- +infos/metadata *= *([/#a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/metadata\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
 	STRING(REGEX REPLACE "\"- +infos/plugins *= *([a-zA-Z0-9 ]*)\\\\n\"" "keyNew(\"system/elektra/modules/${p}/infos/plugins\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
 	STRING(REGEX REPLACE "\"- +infos/description *= *(.*)\\\\n\"\n\"" "keyNew(\"system/elektra/modules/${p}/infos/description\",\nKEY_VALUE, \"\\1\", KEY_END)," contents "${contents}")
 	# allow macros:


Fix boost build (with and without cannot be used simultaneously)

--- cmakemodules/DownloadBoost.cmake
+++ cmakemodules/DownloadBoost.cmake
@@ -5,7 +5,7 @@
     UPDATE_COMMAND ""
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ./bootstrap.sh
-    BUILD_COMMAND ./b2 -s NO_BZIP2=1 --prefix=<INSTALL_DIR> --with-system --with-filesystem --with-program_options --without-python install
+    BUILD_COMMAND ./b2 -s NO_BZIP2=1 --prefix=<INSTALL_DIR> --with-system --with-filesystem --with-program_options install
     #BUILD_COMMAND ./b2 --show-libraries
     INSTALL_COMMAND ""
 )


Exporting tensorflow package for cmake (#14554)

* Exporting Targets

* reverting changes within tf_core_framework.cmake

--- tensorflow/contrib/cmake/tf_shared_lib.cmake
+++ tensorflow/contrib/cmake/tf_shared_lib.cmake
@@ -95,10 +95,18 @@
   add_dependencies(tensorflow tensorflow_static)
 endif(WIN32)

-install(TARGETS tensorflow
+target_include_directories(tensorflow PUBLIC
+    $<INSTALL_INTERFACE:include/>
+    $<INSTALL_INTERFACE:include/external/nsync/public>)
+
+install(TARGETS tensorflow EXPORT tensorflow_export
         RUNTIME DESTINATION bin
         LIBRARY DESTINATION lib
         ARCHIVE DESTINATION lib)
+
+install(EXPORT tensorflow_export
+        FILE TensorflowConfig.cmake
+        DESTINATION lib/cmake)

 # install necessary headers
 # tensorflow headers


Fix CMake target name for abseil

Fix CMake target name for abseil

--- chainerx_cc/third_party/abseil.cmake
+++ chainerx_cc/third_party/abseil.cmake
@@ -2,7 +2,7 @@
 project(abseil-download NONE)

 include(ExternalProject)
-ExternalProject_Add(pybind11
+ExternalProject_Add(abseil
     GIT_REPOSITORY    https://github.com/abseil/abseil-cpp.git
     GIT_TAG           20190808
     SOURCE_DIR        "${CMAKE_CURRENT_BINARY_DIR}/abseil"


Enable C++17 build option

Enable C++17 build option

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -99,7 +99,7 @@
 ROOT_BUILD_OPTION(cuda OFF "Use CUDA if it is found in the system")
 ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
 ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
-#ROOT_BUILD_OPTION(cxx17 OFF "Build using C++17 compatible mode, requires gcc >= 7.1.0 or clang")
+ROOT_BUILD_OPTION(cxx17 OFF "Build using C++17 compatible mode, requires gcc >= 7.2.0 or clang")
 ROOT_BUILD_OPTION(cxxmodules OFF "Compile with C++ modules enabled.")
 ROOT_BUILD_OPTION(davix ON "DavIx library for HTTP/WEBDAV access")
 ROOT_BUILD_OPTION(dcache OFF "dCache support, requires libdcap from DESY")


moved up libbot revision

moved up libbot revision

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -3,7 +3,7 @@
 set(lcm_pod_depends)

 set(libbot-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/libbot-drc)
-set(libbot-drc_revision 8329)
+set(libbot-drc_revision 8331)
 set(libbot-drc_depends)

 set(Eigen_pod_url https://github.com/RobotLocomotion/eigen-pod.git)


update common_utils external and remove concise-args

concise-args is now a submodule in common_utils

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -36,13 +36,9 @@
 set(occ-map_revision 34ab71fa693216d2c0508f0f2680b9a68994f473)
 set(occ-map_depends libbot opencv-pod)

-set(concise-args_url https://github.com/abachrach/concise-args.git)
-set(concise-args_revision 4aeee5afe6ab5296a2620081a4cf4529885d6dc9)
-set(concise-args_depends)
-
 set(common_utils_url https://github.com/mitdrc/common_utils.git)
-set(common_utils_revision edc762537aee1bc264392f6902dbcc97b0f563f7)
-set(common_utils_depends Eigen_pod libbot occ-map octomap-pod concise-args)
+set(common_utils_revision 7fc252e3b1baf8ec6a19ee812ae114e8ee460dbd)
+set(common_utils_depends Eigen_pod libbot occ-map octomap-pod)

 set(frsm_url ssh://git@github.com/mitdrc/frsm.git)
 set(frsm_revision bbf1d83023ae35ecf595c93e46b8601206be9e9b)
@@ -130,7 +126,6 @@
   libmultisense
   multisense-lcm
   occ-map
-  concise-args
   common_utils
   frsm
   kinect


qt-tools.cmake: do not call find_package(Qt4)

The risk is that upstream CMake module
(in /usr/share/cmake-3.0/Modules/FindQt4.cmake") sets some
qt variables that conflict with the one we set
in our wrapper modules (in qibuild/cmake/qibuild/modules)

Instead, just call ``include(Qt4Macros.cmake)`` directly,
after having looked for uic, moc and rcc.

Change-Id: Iaced1bfa3ae0e55cca0a1a96d5b89821bbc260ec

--- cmake/qibuild/modules/qt-tools.cmake
+++ cmake/qibuild/modules/qt-tools.cmake
@@ -8,33 +8,12 @@
 # look for moc and uic, and the copy-paste the macros from
 # QT_USE_FILE ...

-# Note: when cross-compiling, you should set QT_USE_QMAKE
-# to false so that we do not use qmake from the system.
+get_filename_component(_ROOT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)

-get_filename_component(_ROOT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
-if(NOT DEFINED QT_USE_QMAKE)
-  find_program(QT_QMAKE NAMES qmake-qt4 qmake)
-  if(QT_QMAKE)
-    set(QT_USE_QMAKE TRUE CACHE INTERNAL "" FORCE)
-  else()
-    set(QT_USE_QMAKE FALSE CACHE INTERNAL "" FORCE)
-  endif()
-endif()
-
-if(QT_USE_QMAKE)
-  # Use upstream cmake files:
-  find_package(Qt4 COMPONENTS "")
-  include(Qt4Macros)
-else()
-  # Using a qt package from a desktop toolchain:
-  # look for moc, uic and rcc in the package before
-  # including Qt4Macros
-  find_program(QT_MOC_EXECUTABLE NAMES moc-qt4 moc)
-  find_program(QT_UIC_EXECUTABLE NAMES uic-qt4 uic)
-  find_program(QT_RCC_EXECUTABLE NAMES rcc-qt4 rcc)
-  include("${_ROOT_DIR}/Qt4Macros.cmake")
-endif()
-
+find_program(QT_MOC_EXECUTABLE NAMES moc-qt4 moc)
+find_program(QT_UIC_EXECUTABLE NAMES uic-qt4 uic)
+find_program(QT_RCC_EXECUTABLE NAMES rcc-qt4 rcc)
+include("${_ROOT_DIR}/Qt4Macros.cmake")

 #! Generate qt.conf. Assumes qi_use_lib(... QT_QTCORE) has been called
 #


[FIX] config file name

[FIX] config file name

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -137,25 +137,26 @@
     fi
     local new_configs=""
     local idx=0
-    local c=config.cuda.$idx
+    local c=config.ref.$idx
 	idx=$(($idx + 1))
     echo "OPT_KERNEL_INLINING = false" >> $c
     echo "OPT_LOOP_PEELING = false" >> $c
     new_configs="$new_configs $c"

-    c=config.cuda.$idx
+    c=config.ref.$idx
 	idx=$(($idx + 1))
     echo "OPT_KERNEL_INLINING = true" >> $c
     echo "OPT_LOOP_PEELING = false" >> $c
     new_configs="$new_configs $c"

-    c=config.cuda.$idx
+    c=config.ref.$idx
 	idx=$(($idx + 1))
     echo "OPT_LOOP_PEELING = true" >> $c
     new_configs="$new_configs $c"

     echo $new_configs
 }
+
 function generate_translation_configurations_cuda()
 {
     local configs=""


A file missing in commit 7fbbb1ea from yesterday.

--- src/DIPlib_sources.cmake
+++ src/DIPlib_sources.cmake
@@ -193,6 +193,7 @@
 measurement/feature_grey_inertia.h
 measurement/feature_grey_major_axes.h
 measurement/feature_grey_mu.h
+measurement/feature_grey_size.h
 measurement/feature_inertia.h
 measurement/feature_major_axes.h
 measurement/feature_mass.h


Turn off STOP_ON_WARNING default for release branches (#2861)

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -80,7 +80,11 @@
 ###########################################################################
 # Turn on more detailed warnings and optionally consider warnings as errors
 #
-option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
+if (${PROJECT_NAME}_SUPPORTED_RELEASE)
+    option (STOP_ON_WARNING "Stop building if there are any compiler warnings" OFF)
+else ()
+    option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
+endif()
 option (EXTRA_WARNINGS "Enable lots of extra pedantic warnings" OFF)
 if (NOT MSVC)
     add_compile_options ("-Wall")


uv.cmake: fix case of "userenv" library

uv.cmake: fix case of "userenv" library

This fixes linking errors when cross-compiling luv using MinGW.
A Unix filesystem backing userenv.lib file is case-sensitive.

--- deps/uv.cmake
+++ deps/uv.cmake
@@ -200,7 +200,7 @@
     psapi.lib
     iphlpapi.lib
     advapi32.lib
-    Userenv.lib
+    userenv.lib
   )
 endif()


Disabled some of the photoacoustic lib tests

--- Modules/PhotoacousticsLib/test/files.cmake
+++ Modules/PhotoacousticsLib/test/files.cmake
@@ -12,6 +12,12 @@

   ################## DISABLED TESTS #####################################################

+  #mitkSimulationBatchGeneratorTest.cpp #T25298
+  #mitkPhotoacousticIOTest.cpp #T25298
+  #mitkMCThreadHandlerTest.cpp #T25298
+  #mitkPhotoacousticVesselTreeTest.cpp #T25298
+  #mitkPhotoacousticVesselMeanderStrategyTest.cpp #T25298
+  #mitkMcxyzXmlTest.cpp #T25298
   ################# RUNNING TESTS #######################################################

   mitkSlicedVolumeGeneratorTest.cpp
@@ -20,14 +26,8 @@
   mitkPhotoacoustic3dVolumeTest.cpp
   mitkPhotoacousticVolumeTest.cpp
   mitkPhotoacousticVesselTest.cpp
-  mitkPhotoacousticVesselTreeTest.cpp
-  mitkPhotoacousticVesselMeanderStrategyTest.cpp
-  mitkMcxyzXmlTest.cpp
   mitkPhotoacousticComposedVolumeTest.cpp
   mitkPhotoacousticNoiseGeneratorTest.cpp
-  mitkPhotoacousticIOTest.cpp
-  mitkMCThreadHandlerTest.cpp
-  mitkSimulationBatchGeneratorTest.cpp
   mitkPropertyCalculatorTest.cpp
 )


Add reformat target

Add reformat target

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -13,6 +13,7 @@

 message(STATUS "Found clang-format at ${CLANG_FORMAT_PROGRAM}")
 add_custom_target(format VERBATIM)
+add_custom_target(reformat VERBATIM)

 function(format TARGET)
     list(APPEND TOUCH_PATHS)
@@ -23,24 +24,28 @@
         set(FULL_SOURCE_PATH "${TARGET_DIR}/${SOURCE_FILE}")
         file(RELATIVE_PATH REL_PATH "${CMAKE_SOURCE_DIR}" "${FULL_SOURCE_PATH}")

-        set(FULL_TOUCH_PATH "${CMAKE_BINARY_DIR}/${REL_PATH}.touch")
+        set(FULL_TOUCH_PATH "${CMAKE_BINARY_DIR}/${REL_PATH}.format.touch")
         get_filename_component(TOUCH_DIR "${FULL_TOUCH_PATH}" DIRECTORY)
         list(APPEND TOUCH_PATHS "${FULL_TOUCH_PATH}")

         file(MAKE_DIRECTORY "${TOUCH_DIR}")
-        message(STATUS "Formatting to ${FULL_TOUCH_PATH}")
         add_custom_command(
-                OUTPUT "${FULL_TOUCH_PATH}"
-                COMMAND "${CLANG_FORMAT_PROGRAM}" -i -style=file "${SOURCE_FILE}"
-                COMMAND "${CMAKE_COMMAND}" -E touch "${FULL_TOUCH_PATH}"
-                DEPENDS "${FULL_SOURCE_PATH}"
-                COMMENT "${SOURCE_FILE}"
-                WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+            OUTPUT "${FULL_TOUCH_PATH}"
+            COMMAND "${CLANG_FORMAT_PROGRAM}" -i -style=file "${SOURCE_FILE}"
+            COMMAND "${CMAKE_COMMAND}" -E touch "${FULL_TOUCH_PATH}"
+            DEPENDS "${FULL_SOURCE_PATH}"
+            COMMENT "${SOURCE_FILE}"
+            WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         )
     endforeach()
-    message(STATUS ${TOUCH_PATHS})

     add_custom_target(${TARGET}-format VERBATIM DEPENDS ${TOUCH_PATHS})
+    add_custom_target(
+        ${TARGET}-reformat VERBATIM
+        COMMAND "${CMAKE_COMMAND}" -E remove ${TOUCH_PATHS}
+        COMMENT "Clearing format dependencies"
+    )

     add_dependencies(format ${TARGET}-format)
+    add_dependencies(reformat ${TARGET}-reformat)
 endfunction()


Sphinx -> Breathe in FindBreathe.cmake

Sphinx -> Breathe in FindBreathe.cmake

--- cmake/FindBreathe.cmake
+++ cmake/FindBreathe.cmake
@@ -1,12 +1,12 @@
-# - This module looks for Sphinx
-# Find the Sphinx documentation generator
+# - This module looks for Breathe
+# Find the Breathe Sphinx-Doxygen bridge.
 #
 # This modules defines
 #  BREATHE_DIR
 #  BREATHE_FOUND

 find_path(BREATHE_DIR NAMES breathe.cmake
-  DOC "breathe dir"
+  DOC "breathe directory."
 )

 include(FindPackageHandleStandardArgs)