Fixed a problem where d would not be added to debug builds

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -82,7 +82,11 @@
   set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib PARENT_SCOPE)

   # Postfix on all debug libraries should be "d"
-  set(CMAKE_DEBUG_POSTFIX d${CMAKE_DEBUG_POSTFIX} PARENT_SCOPE)
+  # PARENT_SCOPE causes the variable to not be set locally, and we
+  # rely on this value in the following loop....
+
+  set(CMAKE_DEBUG_POSTFIX "d${CMAKE_DEBUG_POSTFIX}")
+  set(CMAKE_DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} PARENT_SCOPE)

   # 64-bit installations should suffix with 64 regardless of the CPU type (arm or intel)
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)


add common unix utilities to dependencies so that vmime configure module works

--- dependencies.cmake
+++ dependencies.cmake
@@ -21,6 +21,7 @@
 #  THE SOFTWARE.

+SET ( AWK_FIND_REQUIRED FALSE )
 SET ( Boost_FIND_REQUIRED TRUE )
 SET ( Boost_USE_MULTITHREADED ON )
 SET ( Boost_USE_STATIC_LIBS OFF )
@@ -31,6 +32,7 @@
 SET ( CPPDB_SQLITE3_DRIVER_FIND_REQUIRED TRUE )
 SET ( CRYPTOPP_FIND_REQUIRED TRUE )
 SET ( CURLPP_FIND_REQUIRED TRUE )
+SET ( CUT_FIND_REQUIRED FALSE )
 SET ( GEOIP_FIND_REQUIRED TRUE )
 SET ( GIT_FIND_REQUIRED TRUE )
 SET ( GRAPHICS_MAGICKPP_FIND_REQUIRED FALSE )
@@ -39,6 +41,7 @@
 SET ( GRAPHICS_MAGICKPP_CONFIG_FIND_REQUIRED FALSE )
 SET ( GRAPHICS_MAGICK_CONFIG_FIND_REQUIRED FALSE )
 SET ( GRAPHICS_MAGICK_WAND_CONFIG_FIND_REQUIRED FALSE )
+SET ( GREP_FIND_REQUIRED FALSE )
 SET ( GULP_FIND_REQUIRED TRUE )
 SET ( GEOLITE_COUNTRY_FIND_REQUIRED TRUE )
 SET ( GEOLITE_CITY_FIND_REQUIRED TRUE )
@@ -58,9 +61,11 @@
 SET ( MYSQL_FIND_REQUIRED FALSE )
 SET ( NPM_FIND_REQUIRED TRUE )
 SET ( PGSQL_FIND_REQUIRED FALSE )
+SET ( SED_FIND_REQUIRED FALSE )
 SET ( SODIUM_FIND_REQUIRED TRUE )
 SET ( SQLITE3_FIND_REQUIRED TRUE )
 SET ( Threads_FIND_REQUIRED TRUE )
+SET ( TR_FIND_REQUIRED FALSE )
 SET ( VMIME_FIND_REQUIRED TRUE )
 SET ( WT_FIND_REQUIRED TRUE )
 IF ( "${WT_APPLICATION_TYPE}" STREQUAL "FASTCGI" )
@@ -86,6 +91,10 @@
 INCLUDE_DIRECTORIES ( SYSTEM ${Boost_INCLUDE_DIRS} )

+### Common Unix Utilities ###
+FIND_PACKAGE ( CommonUnixUtilities )
+
+
 ### CppDB ###
 FIND_PACKAGE ( CppDB )
 INCLUDE_DIRECTORIES ( SYSTEM ${CPPDB_INCLUDE_DIR} )


Add comment improvements

Add comment improvements

--- toolchain/tc-linux-win32.cmake
+++ toolchain/tc-linux-win32.cmake
@@ -1,5 +1,7 @@

-# Toolchain file to cross compile from host linux to target win32
+# Toolchain file to cross compile from host linux to target Windows 32-bit
+# This file assumes you are on Linux and have installed the mingw-w64-*
+# packages to cross compile c++ programs

 #define the target.
 set(CMAKE_SYSTEM_NAME Windows)
@@ -7,6 +9,7 @@
 # http://www.vtk.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
 #set(CMAKE_SYSTEM_VERSION 1)

+# define the compilers
 set(CMAKE_C_COMPILER    i686-w64-mingw32-gcc)
 set(CMAKE_CXX_COMPILER  i686-w64-mingw32-g++)
 set(CMAKE_RC_COMPILER   i686-w64-mingw32-windres)


remove dot in docs (strange core dump)

remove dot in docs (strange core dump)

--- src/Doxyfile.cmake
+++ src/Doxyfile.cmake
@@ -2127,7 +2127,7 @@
 # set to NO
 # The default value is: YES.

-HAVE_DOT               = YES
+HAVE_DOT               = NO

 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
 # to run in parallel. When set to 0 doxygen will base this on the number of


fix update command

fix update command

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

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -74,7 +74,7 @@
 endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")

 ## -- Update Command
-set(CTEST_UPDATE_COMMAND               "${CTEST_SVN_COMMAND} update")
+set(CTEST_UPDATE_COMMAND               "${CTEST_SVN_COMMAND}")


- Minor fix to Android toolchain, it should already do it, but it doesn't

--- cmake/Toolchains/all-android.toolchain.cmake
+++ cmake/Toolchains/all-android.toolchain.cmake
@@ -1701,3 +1701,5 @@

 message("-- Disabling RTTI and exceptions")
 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions" )
+
+include_directories( SYSTEM ${ANDROID_SYSROOT}/usr/include )


revert unintended change

revert unintended change

--- build_settings.cmake
+++ build_settings.cmake
@@ -28,7 +28,7 @@
 endif()

 # C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} -mtune=intel ${EXTRA_C_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} -mtune=intel ${EXTRA_C_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${CXX_SPECIFIC_WARN_OPTS} -std=c++1z -fvisibility-inlines-hidden -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")

 # Linker flags


Disable deprecation warnings from lz4.

Disable deprecation warnings from lz4.

--- build_settings.cmake
+++ build_settings.cmake
@@ -20,7 +20,7 @@
 set(WARN_OPTS "-Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -DLZ4_DISABLE_DEPRECATE_WARNINGS -march=westmere -mtune=intel")

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -Wnon-virtual-dtor -fvisibility-inlines-hidden -fdiagnostics-color=auto")


Enable c++2a

Enable c++2a

--- build_settings.cmake
+++ build_settings.cmake
@@ -78,10 +78,11 @@
 if (VESPA_USE_SANITIZER)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${VESPA_USE_SANITIZER}")
 endif()
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${CXX_SPECIFIC_WARN_OPTS} -std=c++2a -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${CXX_SPECIFIC_WARN_OPTS} -std=c++1z -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
 else()
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${CXX_SPECIFIC_WARN_OPTS} -std=c++1z -fvisibility-inlines-hidden -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden ")
 endif()

 # Linker flags


Updated

Updated

--- cmake/CMLFlags.cmake
+++ cmake/CMLFlags.cmake
@@ -11,14 +11,6 @@
 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_ALIASES=\"${CML_NO_ALIASES}\"")
 ELSE()
 	MESSAGE(STATUS "Using math functions aliases")
-ENDIF()
-
-OPTION(CML_LONG_DOUBLE_MATH "Use long double-precision floating point values" BOOL:TRUE)
-IF(CML_LONG_DOUBLE_MATH)
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_LONG_DOUBLE_MATH=\"${CML_LONG_DOUBLE_MATH}\"")
-	MESSAGE(STATUS "Using long double-precision floating point values")
-ELSE()
-	MESSAGE(STATUS "Using double-precision floating point values")
 ENDIF()

 OPTION(CML_NO_STDBOOL "Use stdbool.h" BOOL:FALSE)
@@ -41,11 +33,3 @@
 ELSE()
 	MESSAGE(STATUS "Using math.h")
 ENDIF()
-
-IF(mint_t)
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dmint_t=\"${mint_t}\"")
-ENDIF()
-
-IF(mfloat_t)
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dmfloat_t=\"${mfloat_t}\"")
-ENDIF()


CMake: Cache clip test result

CMake: Cache clip test result

--- cmake/ClipMode.cmake
+++ cmake/ClipMode.cmake
@@ -2,91 +2,91 @@
 include (CMakePushCheckState)

 macro (CLIP_MODE)
+	if ((NOT DEFINED CPU_CLIPS_NEGATIVE) AND (NOT DEFINED CPU_CLIPS_POSITIVE))
+		set (CLIP_MODE_POSITIVE_MESSAGE "Target processor clips on positive float to int conversion")
+		set (CLIP_MODE_NEGATIVE_MESSAGE "Target processor clips on negative float to int conversion")

-	set (CLIP_MODE_POSITIVE_MESSAGE "Target processor clips on positive float to int conversion")
-	set (CLIP_MODE_NEGATIVE_MESSAGE "Target processor clips on negative float to int conversion")
+		message (STATUS "Checking processor clipping capabilities...")

-	message (STATUS "Checking processor clipping capabilities...")
+		if (CMAKE_CROSSCOMPILING)

-	if (CMAKE_CROSSCOMPILING)
+			set (CLIP_MSG "disabled")
+			set (CPU_CLIPS_POSITIVE FALSE CACHE BOOL ${CLIP_MODE_POSITIVE_MESSAGE})
+			set (CPU_CLIPS_NEGATIVE FALSE CACHE BOOL ${CLIP_MODE_NEGATIVE_MESSAGE})

-		set (CLIP_MSG "disabled")
-		set (CPU_CLIPS_POSITIVE FALSE CACHE BOOL ${CLIP_MODE_POSITIVE_MESSAGE})
-		set (CPU_CLIPS_NEGATIVE FALSE CACHE BOOL ${CLIP_MODE_NEGATIVE_MESSAGE})
+		else (NOT CMAKE_CROSSCOMPILING)

-	else (NOT CMAKE_CROSSCOMPILING)
+			cmake_push_check_state ()
+
+			set (CMAKE_REQUIRED_QUIET TRUE)
+			if (LIBM_REQUIRED)
+				set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${M_LIBRARY})
+			endif ()
+
+			check_c_source_runs (
+			"
+			#define	_ISOC9X_SOURCE	1
+			#define _ISOC99_SOURCE	1
+			#define	__USE_ISOC99	1
+			#define __USE_ISOC9X	1
+			#include <math.h>
+			int main (void)
+			{	double	fval ;
+				int k, ival ;

-		cmake_push_check_state ()
-
-		set (CMAKE_REQUIRED_QUIET TRUE)
-		if (LIBM_REQUIRED)
-			set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${M_LIBRARY})
-		endif ()
-
-		check_c_source_runs (
-		"
-		#define	_ISOC9X_SOURCE	1
-		#define _ISOC99_SOURCE	1
-		#define	__USE_ISOC99	1
-		#define __USE_ISOC9X	1
-		#include <math.h>
-		int main (void)
-		{	double	fval ;
-			int k, ival ;
+				fval = 1.0 * 0x7FFFFFFF ;
+				for (k = 0 ; k < 100 ; k++)
+				{	ival = (lrint (fval)) >> 24 ;
+					if (ival != 127)
+						return 1 ;
+
+					fval *= 1.2499999 ;
+					} ;
+
+					return 0 ;
+				}
+			"
+			CPU_CLIPS_POSITIVE)
+
+			check_c_source_runs (
+			"
+			#define	_ISOC9X_SOURCE	1
+			#define _ISOC99_SOURCE	1
+			#define	__USE_ISOC99	1
+			#define __USE_ISOC9X	1
+			#include <math.h>
+			int main (void)
+			{	double	fval ;
+				int k, ival ;

-			fval = 1.0 * 0x7FFFFFFF ;
-			for (k = 0 ; k < 100 ; k++)
-			{	ival = (lrint (fval)) >> 24 ;
-				if (ival != 127)
-					return 1 ;
-
-				fval *= 1.2499999 ;
-				} ;
-
-				return 0 ;
-			}
-		"
-		CPU_CLIPS_POSITIVE)
-
-		check_c_source_runs (
-		"
-		#define	_ISOC9X_SOURCE	1
-		#define _ISOC99_SOURCE	1
-		#define	__USE_ISOC99	1
-		#define __USE_ISOC9X	1
-		#include <math.h>
-		int main (void)
-		{	double	fval ;
-			int k, ival ;
+				fval = -8.0 * 0x10000000 ;
+				for (k = 0 ; k < 100 ; k++)
+				{	ival = (lrint (fval)) >> 24 ;
+					if (ival != -128)
+						return 1 ;
+
+					fval *= 1.2499999 ;
+					} ;
+
+					return 0 ;
+				}
+			"
+			CPU_CLIPS_NEGATIVE)

-			fval = -8.0 * 0x10000000 ;
-			for (k = 0 ; k < 100 ; k++)
-			{	ival = (lrint (fval)) >> 24 ;
-				if (ival != -128)
-					return 1 ;
-
-				fval *= 1.2499999 ;
-				} ;
-
-				return 0 ;
-			}
-		"
-		CPU_CLIPS_NEGATIVE)
+			cmake_pop_check_state ()

-		cmake_pop_check_state ()
+			if (CPU_CLIPS_POSITIVE AND (NOT CPU_CLIPS_NEGATIVE))
+				set (CLIP_MSG "positive")
+			elseif (CPU_CLIPS_NEGATIVE AND (NOT CPU_CLIPS_POSITIVE))
+				set (CLIP_MSG "negative")
+			elseif (CPU_CLIPS_POSITIVE AND CPU_CLIPS_NEGATIVE)
+				set (CLIP_MSG "both")
+			else ()
+				set (CLIP_MSG "none")
+			endif ()

-		if (CPU_CLIPS_POSITIVE AND (NOT CPU_CLIPS_NEGATIVE))
-			set (CLIP_MSG "positive")
-		elseif (CPU_CLIPS_NEGATIVE AND (NOT CPU_CLIPS_POSITIVE))
-			set (CLIP_MSG "negative")
-		elseif (CPU_CLIPS_POSITIVE AND CPU_CLIPS_NEGATIVE)
-			set (CLIP_MSG "both")
-		else ()
-			set (CLIP_MSG "none")
-		endif ()
+		endif (CMAKE_CROSSCOMPILING)

-	endif (CMAKE_CROSSCOMPILING)
-
-	message (STATUS "Checking processor clipping capabilities... ${CLIP_MSG}")
-
+		message (STATUS "Checking processor clipping capabilities... ${CLIP_MSG}")
+	endif ()
 endmacro (CLIP_MODE)


Fixed bug in FindLcov.cmake.

Fixed bug in FindLcov.cmake.

Only recent versions of CMake can use the TARGET SOURCE property to store
information for targets. Fixed this issue with using internal cache variables.

--- cmake/FindLcov.cmake
+++ cmake/FindLcov.cmake
@@ -111,6 +111,7 @@
 # used to gather even empty report data.
 if (NOT TARGET lcov-capture-init)
 	add_custom_target(lcov-capture-init)
+	set(LCOV_CAPTURE_INIT_FILES "" CACHE INTERNAL "")
 endif (NOT TARGET lcov-capture-init)

@@ -148,7 +149,9 @@

 	# add geninfo file generation to global lcov-geninfo target
 	add_dependencies(lcov-capture-init ${TNAME}-capture-init)
-	set_property(TARGET lcov-capture-init APPEND PROPERTY SOURCES ${OUTFILE})
+	set(LCOV_CAPTURE_INIT_FILES "${LCOV_CAPTURE_INIT_FILES}"
+		"${OUTFILE}" CACHE INTERNAL ""
+	)
 endfunction (lcov_capture_initial_tgt)

@@ -156,14 +159,9 @@
 # called after all other CMake functions in the root CMakeLists.txt file, to get
 # a full list of all targets that generate coverage data.
 function (lcov_capture_initial)
-	# Get source files of lcov-capture-init and clear sources to avoid error
-	# messages.
-	get_target_property(TSOURCES lcov-capture-init SOURCES)
-	set_property(TARGET lcov-capture-init PROPERTY SOURCES "")
-
 	# Add a new target to merge the files of all targets.
 	set(OUTFILE "${LCOV_DATA_PATH_INIT}/all_targets.info")
-	lcov_merge_files("${OUTFILE}" ${TSOURCES})
+	lcov_merge_files("${OUTFILE}" ${LCOV_CAPTURE_INIT_FILES})
 	add_custom_target(lcov-geninfo-init ALL	DEPENDS ${OUTFILE}
 		lcov-capture-init
 	)
@@ -176,6 +174,7 @@
 # target will be used to generate the global info file.
 if (NOT TARGET lcov-capture)
 	add_custom_target(lcov-capture)
+	set(LCOV_CAPTURE_FILES "" CACHE INTERNAL "")
 endif (NOT TARGET lcov-capture)

@@ -215,8 +214,9 @@

 	# add geninfo file generation to global lcov-capture target
 	add_dependencies(lcov-capture ${TNAME}-geninfo)
-	set_property(TARGET lcov-capture APPEND PROPERTY SOURCES ${OUTFILE})
-
+	set(LCOV_CAPTURE_FILES "${LCOV_CAPTURE_FILES}" "${OUTFILE}" CACHE INTERNAL
+		""
+	)

 	# Add target for generating html output for this target only.
 	file(MAKE_DIRECTORY ${LCOV_HTML_PATH}/${TNAME})
@@ -235,14 +235,9 @@
 # called after all other CMake functions in the root CMakeLists.txt file, to get
 # a full list of all targets that generate coverage data.
 function (lcov_capture)
-	# Get source files of lcov-capture-init and clear sources to avoid error
-	# messages.
-	get_target_property(TSOURCES lcov-capture SOURCES)
-	set_property(TARGET lcov-capture PROPERTY SOURCES "")
-
 	# Add a new target to merge the files of all targets.
 	set(OUTFILE "${LCOV_DATA_PATH_CAPTURE}/all_targets.info")
-	lcov_merge_files("${OUTFILE}" ${TSOURCES})
+	lcov_merge_files("${OUTFILE}" ${LCOV_CAPTURE_FILES})
 	add_custom_target(lcov-geninfo DEPENDS ${OUTFILE} lcov-capture)

 	# Add a new global target for all lcov targets. This target could be used to


find static folder

find static folder

--- cmake/FindZSTD.cmake
+++ cmake/FindZSTD.cmake
@@ -26,57 +26,48 @@
 #   ZSTD_FOUND       - True if zstd library is found.

-message("Ponto 1")
 set(zstd_incl_dirs "/usr/include" "/usr/local/include")
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(zstd_incl_dirs ${zstd_incl_dirs} "$ENV{PROGRAMFILES}/zstd/include")
     set(zstd_incl_dirs ${zstd_incl_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/include")
 endif()

-message("Ponto 2")
 if(ZSTD_INCLUDEDIR)
     list(APPEND zstd_incl_dirs ${ZSTD_INCLUDEDIR})
 endif()

-message("Ponto 3")
 find_path(
     ZSTD_INCLUDE_DIR
     NAMES zstd.h
     HINTS ${zstd_incl_dirs}
 )

-message("Ponto 4")
 set(zstd_lib_dirs "/usr/lib" "/usr/local/lib")
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMFILES}/zstd/lib")
     set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/dll")
+    set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/static")
 endif()

-message("Ponto 5")
 if(ZSTD_LIBRARYDIR)
     list(APPEND zstd_lib_dirs ${ZSTD_LIBRARYDIR})
 endif()

-message("Ponto 6")
 find_library(
     ZSTD_LIBRARY
-    NAMES zstd zstdlib libzstd
+    NAMES zstd zstdlib libzstd libzstd_static
     HINTS ${zstd_lib_dirs}
 )

-message("Ponto 7")
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(ZSTD DEFAULT_MSG
                                   ZSTD_LIBRARY ZSTD_INCLUDE_DIR)

-message("Ponto 8")
 mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY ZSTD_FOUND)

-message("Ponto 9")
 set(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
 set(ZSTD_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR})

-message("Ponto 10")
 if(ZSTD_FOUND)
     if(NOT TARGET ZSTD::zstd)
         add_library(ZSTD::zstd UNKNOWN IMPORTED)
@@ -85,4 +76,3 @@
             INTERFACE_INCLUDE_DIRECTORIES "${ZSTD_INCLUDE_DIR}")
     endif()
 endif()
-message("Ponto 11")


choco zstd finder

choco zstd finder

--- cmake/FindZSTD.cmake
+++ cmake/FindZSTD.cmake
@@ -29,6 +29,7 @@
 set(zstd_incl_dirs "/usr/include" "/usr/local/include")
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(zstd_incl_dirs ${zstd_incl_dirs} "$ENV{PROGRAMFILES}/zstd/include")
+    set(zstd_incl_dirs ${zstd_incl_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/include")
 endif()

 if(ZSTD_INCLUDEDIR)
@@ -44,6 +45,7 @@
 set(zstd_lib_dirs "/usr/lib" "/usr/local/lib")
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMFILES}/zstd/lib")
+    set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/dll")
 endif()

 if(ZSTD_LIBRARYDIR)


Fix creation of exports file on Unix

Fix creation of exports file on Unix

--- cmake/libutils.cmake
+++ cmake/libutils.cmake
@@ -76,7 +76,7 @@
     CONFIGURE_FILE_CONTENT(${CONTENT} ${EXPORTS})
     SET(${VAR} ${DUMMY} ${EXPORTS})
   ELSE()
-    SET(EXPORTS ${CMAKE_CURRENT_BINARY_DIR}/${target}_exports_file.cc)
+    SET(EXPORTS ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_exports_file.cc)
     SET(CONTENT)
     FOREACH(FUNC ${API_FUNCTIONS})
       SET(CONTENT "${CONTENT} extern void* ${FUNC}\;\n")
@@ -241,7 +241,9 @@
         ENDIF()
       ENDFOREACH()
     ENDIF()
-    CREATE_EXPORT_FILE(SRC ${TARGET} "${EXPORTS}")
+
+
+    CREATE_EXPORT_FILE(SRC ${TARGET} "${ARG_EXPORTS}")
     ADD_LIBRARY(${TARGET} SHARED ${SRC})
     TARGET_LINK_LIBRARIES(${TARGET} ${LIBS})
     IF(ARG_OUTPUT_NAME)


got moved to 3rd party modules..

got moved to 3rd party modules..

git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@2890 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e

--- cmake/Compiler.cmake
+++ cmake/Compiler.cmake
@@ -1,13 +0,0 @@
-# Copyright (c) 2007 Daniel Gollub <dgollub@suse.de>
-
-IF ( WIN32 )
-	SET( SYMBOLS_VISIBILITY "" )
-ENDIF ( WIN32 )
-
-IF ( CMAKE_COMPILER_IS_GNUCC )
-	SET( SYMBOLS_VISIBILITY "-fvisibility=hidden" )
-ENDIF ( CMAKE_COMPILER_IS_GNUCC )
-
-IF (CMAKE_SYSTEM MATCHES "SunOS-5*.")
-	SET( SYMBOLS_VISIBILITY "-xldscope=hidden" )
-ENDIF (CMAKE_SYSTEM MATCHES "SunOS-5*.")


solve gomp

solve gomp

--- cmake/FindGomp.cmake
+++ cmake/FindGomp.cmake
@@ -1,2 +1,6 @@
+find_package(OpenMP REQUIRED)
+
+# griff: CMake own OpenMP package solves the problem for gcc and other compilers
 #TODO
-set(Gomp_LIBRARIES "/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.so")
+# set(Gomp_LIBRARIES "/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.so")
+


Removed FindVaca.cmake file

Removed FindVaca.cmake file

--- cmake/FindVaca.cmake
+++ cmake/FindVaca.cmake
@@ -1,18 +0,0 @@
-# - Find the Vaca library
-#
-# This module defines
-#  VACA_INCLUDE_DIR, where to find Vaca/, etc.
-#  VACA_LIBRARY, the library to link against to use Vaca.
-#  VACA_FOUND, If false, do not try to use Vaca.
-
-FIND_PATH(VACA_INCLUDE_DIR Vaca/Vaca.h)
-
-FIND_LIBRARY(VACA_LIBRARY NAMES Vaca)
-
-IF(VACA_INCLUDE_DIR AND VACA_LIBRARY)
-   SET(VACA_FOUND TRUE)
-ENDIF(VACA_INCLUDE_DIR AND VACA_LIBRARY)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(VACA DEFAULT_MSG VACA_LIBRARY VACA_INCLUDE_DIR)
-
-MARK_AS_ADVANCED(VACA_INCLUDE_DIR VACA_LIBRARY)


Correctly applying /ZI for debug

Correctly applying /ZI for debug

- /ZI is not a link flag
- /ZI is not settable via CMAKE_CXX_FLAGS
- /Zi is default unless add_defitions(/ZI)

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -9,10 +9,15 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")

-  # edit and continue
   if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+    # edit and continue
     message(STATUS "Enabling Edit and Continue..")
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL /ZI")
+    #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZI")
+    add_definitions(/ZI)
+
+    # incremental linking
+    message(STATUS "Enabling Incremental Linking..")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL")
   endif()
 endif()


[FindWebP] FOUND_VAR is deprecated

[FindWebP] FOUND_VAR is deprecated

--- cmake/FindWebP.cmake
+++ cmake/FindWebP.cmake
@@ -64,7 +64,6 @@

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(WebP
-  FOUND_VAR WebP_FOUND
   REQUIRED_VARS
     WebP_LIBRARY
     WebP_INCLUDE_DIR


let all warning flags go through AddCompilerFlag so that the MIC compiler may also pick them up

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -225,11 +225,9 @@
       #                                              GCC                                               #
       ##################################################################################################
       if(_add_warning_flags)
-         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -Wno-unused-function -pedantic -Wno-long-long -Wshadow")
-         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -Wno-unused-function -pedantic -Wno-long-long -Wshadow")
-         AddCompilerFlag("-Wundef")
-         AddCompilerFlag("-Wold-style-cast")
-         AddCompilerFlag("-Wno-variadic-macros")
+         foreach(_f -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -Wno-unused-function -pedantic -Wshadow -Wundef -Wold-style-cast -Wno-variadic-macros)
+            AddCompilerFlag("${_f}")
+         endforeach()
          if(Vc_GCC_VERSION VERSION_GREATER "4.5.2" AND Vc_GCC_VERSION VERSION_LESS "4.6.4")
             # GCC gives bogus "array subscript is above array bounds" warnings in math.cpp
             AddCompilerFlag("-Wno-array-bounds")


add ICC -ansi-alias flag to Vc_DEFINITIONS

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -306,21 +306,18 @@
          set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG -O3")
          set(CMAKE_C_FLAGS_RELEASE          "${CMAKE_C_FLAGS_RELEASE} -O3")
          set(CMAKE_C_FLAGS_RELWITHDEBINFO   "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DNDEBUG -O3")
-
-         set(ALIAS_FLAGS "-no-ansi-alias")
-         if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
-            # default ICC to -no-ansi-alias because otherwise tests/utils_sse fails. So far I suspect a miscompilation...
-            set(ENABLE_STRICT_ALIASING true CACHE BOOL "Enables strict aliasing rules for more aggressive optimizations")
-            if(ENABLE_STRICT_ALIASING)
-               set(ALIAS_FLAGS "-ansi-alias")
-            endif(ENABLE_STRICT_ALIASING)
-         endif()
-         set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   ${ALIAS_FLAGS}")
-         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ALIAS_FLAGS}")
       endif()
       vc_add_compiler_flag(Vc_DEFINITIONS "-diag-disable 913")
       # Disable warning #13211 "Immediate parameter to intrinsic call too large". (sse/vector.tcc rotated(int))
       vc_add_compiler_flag(Vc_DEFINITIONS "-diag-disable 13211")
+      if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+         set(ENABLE_STRICT_ALIASING true CACHE BOOL "Enables strict aliasing rules for more aggressive optimizations")
+         if(ENABLE_STRICT_ALIASING)
+            AddCompilerFlag(-ansi-alias CXX_FLAGS Vc_DEFINITIONS)
+         else()
+            AddCompilerFlag(-no-ansi-alias CXX_FLAGS Vc_DEFINITIONS)
+         endif()
+      endif()

       if(NOT "$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")
          # disable warning #2928: the __GXX_EXPERIMENTAL_CXX0X__ macro is disabled when using GNU version 4.6 with the c++0x option


Drop -Wc++-compat from jenkins testing

Drop -Wc++-compat from jenkins testing

--- Testing/jenkins_mercury.cmake
+++ Testing/jenkins_mercury.cmake
@@ -61,7 +61,7 @@

 # Initial cache used to build mercury, options can be modified here
 set(dashboard_cache "
-CMAKE_C_FLAGS:STRING=-Wall -Wextra -Wshadow -Winline -Wundef -Wcast-qual -Wc++-compat -std=gnu99
+CMAKE_C_FLAGS:STRING=-Wall -Wextra -Wshadow -Winline -Wundef -Wcast-qual -std=gnu99

 BUILD_SHARED_LIBS:BOOL=${mercury_build_shared}
 BUILD_TESTING:BOOL=ON


CMake recently add LUA_MATH_LIBRARY as an additional variable

Change-Id: I7c71ad65dec900ad314525dca1b8a259bce97590

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -55,6 +55,7 @@
     LUA_LIBRARIES
     LUA_INCLUDE_DIR
     LUA_VERSION_STRING
+    LUA_MATH_LIBRARY
     LUA_ADDITIONAL_LIBRARIES
     )
 endif()


Propagating missing python cmake variable detected on Debian Jessie

Change-Id: I5d56cbb5b0f93e5169ad18ef1b3c278e39a2bc96

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -49,8 +49,15 @@
   PYTHON_EXECUTABLE
   PYTHON_LIBRARY
   PYTHON_INCLUDE_DIR
-#  PYTHON_INCLUDE_PATH ( depricated )
+#  PYTHON_INCLUDE_PATH ( deprecated )
    )
+# Debian "jessie" has this additional variable required to match
+# python versions.
+if(PYTHON_INCLUDE_DIR2)
+  list( APPEND SITK_LANGUAGES_VARS
+    PYTHON_INCLUDE_DIR2
+    )
+endif()
 option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )
 check_PIC_flag ( Python )


COMP: make sure that Instantiator doesn't wrap vtkVariant

--- CMake/vtkMakeInstantiator.cmake
+++ CMake/vtkMakeInstantiator.cmake
@@ -107,7 +107,10 @@
     IF (${FILE} MATCHES "vtkTimeStamp")
       SET (WRAP_THIS_CLASS 0)
     ENDIF (${FILE} MATCHES "vtkTimeStamp")
-
+    IF (${FILE} MATCHES "vtkVariant")
+      SET (WRAP_THIS_CLASS 0)
+    ENDIF (${FILE} MATCHES "vtkVariant")
+
     # finally if we should wrap it, then ...
     IF (WRAP_THIS_CLASS)


Support searching for `capstone.h` for both capstone 4 and 5 setup

--- CMakeModules/FindCAPSTONE.cmake
+++ CMakeModules/FindCAPSTONE.cmake
@@ -24,7 +24,9 @@

 if(NOT CAPSTONE_INCLUDE_DIRS AND NOT CAPSTONE_LIBRARIES)
     find_path(CAPSTONE_INCLUDE_DIR
-      NAMES capstone/capstone.h
+      NAMES
+        capstone.h
+        capstone/capstone.h
       PATHS ${CAPSTONE_PKGCONF_INCLUDE_DIRS}
     )

@@ -53,7 +55,9 @@
 endif()

 find_file(CAPSTONE_VERSION_HEADER
-  capstone/capstone.h
+  NAMES
+    capstone.h
+    capstone/capstone.h
   PATHS ${CAPSTONE_PKGCONF_INCLUDE_DIRS}
   REQUIRED
 )


COMP: fix FindGLFW for version 3

COMP: fix FindGLFW for version 3

--- CMake/FindGLFW.cmake
+++ CMake/FindGLFW.cmake
@@ -20,32 +20,24 @@
 # Allow the user to select to link to a shared library or to a static library.

 #Search for the include file...
-FIND_PATH(GLFW_INCLUDE_DIR GL/glfw.h DOC "Path to GLFW include directory."
+FIND_PATH(GLFW_INCLUDE_DIR GLFW/glfw3.h DOC "Path to GLFW include directory."
     HINTS
-    $ENV{GLFW_ROOT}
-    PATH_SUFFIX include # For finding the include file under the root of the glfw expanded archive, typically on Windows.
-    PATHS
-    /usr/include/
-    /usr/local/include/
-    # By default headers are under GL subfolder
-    /usr/include/GL
-    /usr/local/include/GL
-    ${GLFW_ROOT_DIR}/include/ # added by ptr
+      $ENV{GLFW_ROOT}
+    PATH_SUFFIX
+      include # For finding the include file under the root of the glfw expanded archive, typically on Windows.
 )

 FIND_LIBRARY(GLFW_LIBRARY DOC "Absolute path to GLFW library."
-    NAMES glfw GLFW.lib
+    NAMES glfw glfw3dll glfw3
     HINTS
-    $ENV{GLFW_ROOT}
-    PATH_SUFFIXES lib/win32 # For finding the library file under the root of the glfw expanded archive, typically on Windows.
-    PATHS
-    /usr/local/lib
-    /usr/lib
-    ${GLFW_ROOT_DIR}/lib-msvc100/release # added by ptr
+      $ENV{GLFW_ROOT}
+    PATH_SUFFIXES
+       lib # For finding the library file under the root of the glfw expanded archive, typically on Windows.
 )

-IF(GLFW_INCLUDE_DIR AND EXISTS "${GLFW_INCLUDE_DIR}/GL/glfw.h")
-    FILE(STRINGS "${GLFW_INCLUDE_DIR}/GL/glfw.h" glfw_version_str
+
+IF(GLFW_INCLUDE_DIR AND EXISTS "${GLFW_INCLUDE_DIR}/GLFW/glfw3.h")
+    FILE(STRINGS "${GLFW_INCLUDE_DIR}/GLFW/glfw3.h" glfw_version_str
          REGEX "^#[\t ]*define[\t ]+GLFW_VERSION_(MAJOR|MINOR|REVISION)[\t ]+[0-9]+$")

     UNSET(GLFW_VERSION_STRING)
@@ -56,14 +48,14 @@
                        GLFW_VERSION_PART "${VLINE}")
                 IF(GLFW_VERSION_STRING)
                     SET(GLFW_VERSION_STRING "${GLFW_VERSION_STRING}.${GLFW_VERSION_PART}")
-                ELSE(GLFW_VERSION_STRING)
+                ELSE()
                     SET(GLFW_VERSION_STRING "${GLFW_VERSION_PART}")
-                ENDIF(GLFW_VERSION_STRING)
+                ENDIF()
                 UNSET(GLFW_VERSION_PART)
             ENDIF()
-        ENDFOREACH(VLINE)
-    ENDFOREACH(VPART)
-ENDIF(GLFW_INCLUDE_DIR AND EXISTS "${GLFW_INCLUDE_DIR}/GL/glfw.h")
+        ENDFOREACH()
+    ENDFOREACH()
+ENDIF()

 INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW


Chore(Build): Fix FindSDL2.cmake on Windows

--- CMake/FindSDL2.cmake
+++ CMake/FindSDL2.cmake
@@ -23,74 +23,77 @@
     PKG_CHECK_MODULES(_sdl2_PC QUIET sdl2)
 ENDIF()

-FIND_PACKAGE(sdl2 QUIET CONFIG)
+FIND_PACKAGE(SDL2 QUIET CONFIG)

-SET(SDL2_INCLUDE_DIR ${_sdl2_PC_INCLUDE_DIRS})
-FIND_PATH(
-    SDL2_INCLUDE_DIR
-    NAMES SDL.h
-    PATHS
-        ${SDL2_ROOT_DIR}
-        ${_sdl2_PC_INCLUDE_DIRS}
-        ${SDL2_PREFIX}
-    PATH_SUFFIXES
-        "SDL2"
-        "include/SDL2"
-)
+IF(NOT SDL2_FOUND)
+    SET(SDL2_INCLUDE_DIR ${_sdl2_PC_INCLUDE_DIRS})
+    FIND_PATH(
+        SDL2_INCLUDE_DIR
+        NAMES SDL.h
+        PATHS
+            ${SDL2_ROOT_DIR}
+            ${_sdl2_PC_INCLUDE_DIRS}
+            ${SDL2_PREFIX}
+        PATH_SUFFIXES
+            "SDL2"
+            "include/SDL2"
+    )

-FIND_PATH(
-    SDL2_RUNTIME_DIR
-    NAMES SDL2.dll
-    PATHS
-        ${SDL2_ROOT_DIR}
-        ${_sdl2_PC_LIBRARY_DIRS}
-        ${SDL2_PREFIX}
-    PATH_SUFFIXES
-        "lib"
-        "bin"
-)
+    FIND_PATH(
+        SDL2_RUNTIME_DIR
+        NAMES SDL2.dll
+        PATHS
+            ${SDL2_ROOT_DIR}
+            ${_sdl2_PC_LIBRARY_DIRS}
+            ${SDL2_PREFIX}
+        PATH_SUFFIXES
+            "lib"
+            "bin"
+    )

-IF(NOT SDL2_RUNTIME_DIR)
-    SET(SDL2_RUNTIME_DIR "")
+    IF(NOT SDL2_RUNTIME_DIR)
+        SET(SDL2_RUNTIME_DIR "")
+    ENDIF()
+
+    FIND_LIBRARY(
+        SDL2_LIBRARY
+        NAMES SDL2
+        PATHS
+            ${SDL2_ROOT_DIR}
+            ${_sdl2_PC_LIBRARY_DIRS}
+            ${SDL2_PREFIX}
+        PATH_SUFFIXES "lib"
+    )
+
+    FIND_LIBRARY(
+        SDL2_MAIN_LIBRARY
+        NAMES SDL2main
+        PATHS
+            ${SDL2_ROOT_DIR}
+            ${_sdl2_PC_LIBRARY_DIRS}
+            ${SDL2_PREFIX}
+        PATH_SUFFIXES "lib"
+    )
+
+    IF(SDL2_MAIN_LIBRARY AND SDL2_LIBRARY)
+        LIST(APPEND SDL2_LIBRARY "${SDL2_MAIN_LIBRARY}")
+    ENDIF()
+
+    INCLUDE(FindPackageHandleStandardArgs)
+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+        SDL2
+        REQUIRED_VARS
+            SDL2_INCLUDE_DIR
+            SDL2_LIBRARY
+    )
+
+    IF(SDL2_FOUND)
+        ADD_LIBRARY(SDL2::SDL2 INTERFACE IMPORTED)
+        SET_TARGET_PROPERTIES(
+            SDL2::SDL2 PROPERTIES
+            INTERFACE_LINK_LIBRARIES      "${SDL2_LIBRARY}"
+            INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}"
+        )
+    ENDIF()
 ENDIF()

-FIND_LIBRARY(
-    SDL2_LIBRARY
-    NAMES SDL2
-    PATHS
-        ${SDL2_ROOT_DIR}
-        ${_sdl2_PC_LIBRARY_DIRS}
-        ${SDL2_PREFIX}
-    PATH_SUFFIXES "lib"
-)
-
-FIND_LIBRARY(
-    SDL2_MAIN_LIBRARY
-    NAMES SDL2main
-    PATHS
-        ${SDL2_ROOT_DIR}
-        ${_sdl2_PC_LIBRARY_DIRS}
-        ${SDL2_PREFIX}
-    PATH_SUFFIXES "lib"
-)
-
-IF(SDL2_MAIN_LIBRARY AND SDL2_LIBRARY)
-    LIST(APPEND SDL2_LIBRARY "${SDL2_MAIN_LIBRARY}")
-ENDIF()
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(
-    SDL2
-    REQUIRED_VARS
-        SDL2_INCLUDE_DIR
-        SDL2_LIBRARY
-)
-
-IF(SDL2_FOUND)
-    ADD_LIBRARY(SDL2::SDL2 INTERFACE IMPORTED)
-    SET_TARGET_PROPERTIES(
-        SDL2::SDL2 PROPERTIES
-        INTERFACE_LINK_LIBRARIES      "${SDL2_LIBRARY}"
-        INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}"
-    )
-ENDIF()


add epoch number to device-mapper version

--- CMake/Packages.cmake
+++ CMake/Packages.cmake
@@ -39,7 +39,7 @@
     set(PACKAGE_DEPENDENCIES
       "glibc >= 2.12"
       "openssl >= 1.0"
-      "device-mapper >= 1.02.90"
+      "device-mapper >= 7:1.02.90"
       "bzip2-libs"
       "readline"
       "zlib"


updated breakpad+dwarf in cmake

updated breakpad+dwarf in cmake

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -138,6 +138,10 @@
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/dump_symbols.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/module.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/stabs_reader.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/dwarf/bytereader.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/dwarf/dwarf2diehandler.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/dwarf/dwarf2reader.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/dump_dwarf.cc ${ALL_SRCS})

 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/processor/basic_code_modules.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/processor/basic_source_line_resolver.cc ${ALL_SRCS})


[Engine] Added "Resource" source group to cmake.

--- Engine/Sources.cmake
+++ Engine/Sources.cmake
@@ -63,4 +63,5 @@
 SOURCE_GROUP(Util "Util/*")
 SOURCE_GROUP(ECS "ECS/*")
 SOURCE_GROUP(Math "Math/*")
-SOURCE_GROUP(Event "Event/*")+SOURCE_GROUP(Event "Event/*")
+SOURCE_GROUP(Resource "Resource/*")


Improved CMake warnings about known problems of Android NDKs

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -722,7 +722,7 @@
   if( ANDROID_USE_STLPORT )
    set( ANDROID_STL stlport_static )
   endif()
-  message( WARNING "You are using an obsolete variable ANDROID_USE_STLPORT to select the STL. Use -DANDROID_STL=stlport_static instead." )
+  message( WARNING "You are using an obsolete variable ANDROID_USE_STLPORT to select the STL variant. Use -DANDROID_STL=stlport_static instead." )
  endif()
  if( NOT ANDROID_STL )
   set( ANDROID_STL gnustl_static )
@@ -763,6 +763,12 @@
 unset( ANDROID_STL_INCLUDE_DIRS )
 unset( __libstl )
 unset( __libsupcxx )
+
+if( NOT _CMAKE_IN_TRY_COMPILE AND ANDROID_NDK_RELEASE STREQUAL "r7b" AND ARMEABI_V7A AND NOT VFPV3 AND ANDROID_STL MATCHES "gnustl" )
+ message( WARNING  "The GNU STL armeabi-v7a binaries from NDK r7b can crash non-NEON devices. The files provided with NDK r7b were not configured properly, resulting in crashes on Tegra2-based devices and others when trying to use certain floating-point functions (e.g., cosf, sinf, expf).
+You are strongly recommended to switch to another NDK release.
+" )
+endif()

 # setup paths and STL for NDK
 if( BUILD_WITH_ANDROID_NDK )
@@ -867,7 +873,13 @@
    set( __libstl    "${__libstl}/libstdc++.a" )
   endif()
   if( NOT EXISTS "${__libsupcxx}" )
-   message( FATAL_ERROR "TODO: missing stdsupc++ in NDK r7 error" )
+   message( FATAL_ERROR "The required libstdsupc++.a is missing in your standalone toolchain.
+ Usually it happens because of bug in make-standalone-toolchain.sh script from NDK r7, r7b and r7c.
+ You need to either upgrade to newer NDK or manually copy
+     $ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a
+ to
+     ${__libsupcxx}
+   " )
   endif()
   if( ANDROID_STL STREQUAL "gnustl_shared" )
    if( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )


Pack settings for windows

Pack settings for windows

--- CMakeModules/CPackSettings.cmake
+++ CMakeModules/CPackSettings.cmake
@@ -1,16 +1,25 @@
 # Package building stuff - Set CPACK_GENERATOR to whatever package type
 # you wish to build...
-SET(CPACK_PACKAGE_VERSION "${KRISLIBRARY_VERSION}")
-SET(CPACK_PACKAGE_VERSION_MAJOR "${KRISLIBRARY_MAJOR_VERSION}")
-SET(CPACK_PACKAGE_VERSION_MINOR "${KRISLIBRARY_MINOR_VERSION}")
-SET(CPACK_PACKAGE_VERSION_PATCH "${KRISLIBRARY_PATCH_VERSION}")
-SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${V_MAJOR}.${V_MINOR}")
+SET(CPACK_PACKAGE_VERSION "${KLAMPT_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${KLAMPT_MAJOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${KLAMPT_MINOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${KLAMPT_PATCH_VERSION}")
+#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Klampt ${V_MAJOR}.${V_MINOR}")
+SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Klampt")
 SET(CPACK_PACKAGE_CONTACT "K. Hauser")
 SET(CPACK_PACKAGE_VENDOR "Indiana University")
-SET(CPACK_GENERATOR "DEB")
-SET(CPACK_SOURCE_GENERATOR "TGZ")
-SET(CPACK_SOURCE_PACKAGE_FILE_NAME
+IF(WIN32)
+  SET(CPACK_GENERATOR "WIX")
+  #SET(CPACK_WIX_UPGRADE_GUID 80F4492E-C8E2-4785-BF7F-E0AD711AE4E6)
+  SET(CPACK_SOURCE_GENERATOR "ZIP")
+  SET(CPACK_SOURCE_PACKAGE_FILE_NAME
   "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+ELSE(WIN32)
+  SET(CPACK_GENERATOR "DEB")
+  SET(CPACK_SOURCE_GENERATOR "TGZ")
+  SET(CPACK_SOURCE_PACKAGE_FILE_NAME
+  "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+ENDIF(WIN32)

  # This must always be last statement!
 INCLUDE(CPack)


Remove unused flag '-lz' from OS X build; Remove '.out' extension on executable

--- build/toolchains/darwin.cmake
+++ build/toolchains/darwin.cmake
@@ -1,7 +1,7 @@
 # options
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -stdlib=libc++ -std=c++11 -lz")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -stdlib=libc++ -std=c++11")
 set(CXX_FLAGS_DEBUG "-g -O0")
-set(EXECUTABLE_NAME "tangram.out")
+set(EXECUTABLE_NAME "tangram")

 add_definitions(-DPLATFORM_OSX)


Updated metis library path in cmake module (#53)

* Updated metis path within petsc

* Updated metis path for library

--- cmake-modules/FindMETIS.cmake
+++ cmake-modules/FindMETIS.cmake
@@ -118,7 +118,7 @@
     set(metis_lib_names "metis")

     # we look into petsc externalpackage (for 3.5.2 version, to be improved)
-    set(METIS_LIBRARY_DIR "${PETSC_DIR}/${PETSC_ARCH}/externalpackages/metis-5.1.0-p1/build/libmetis/")
+    set(METIS_LIBRARY_DIR "${PETSC_DIR}/${PETSC_ARCH}/externalpackages/git.metis/build/libmetis/")

     if (METIS_LIBRARY_DIR)


build: bump MSVC warning level to 3

build: bump MSVC warning level to 3

--- cmake/ExtraWarningFlags.cmake
+++ cmake/ExtraWarningFlags.cmake
@@ -5,7 +5,7 @@

 if (MSVC)
   set (EXTRA_WARNING_FLAGS
-    /W2)
+    /W3)
 else ()
   set (EXTRA_WARNING_FLAGS
     -Wall


Remove default path

Remove default path

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

--- cmake/FindHyperEstraier.cmake
+++ cmake/FindHyperEstraier.cmake
@@ -8,7 +8,7 @@
 #

 # find estconfig executable
-FIND_PROGRAM(ESTCONFIG NAMES estconfig PATHS /bin /usr/bin /usr/local/bin )
+FIND_PROGRAM(ESTCONFIG NAMES estconfig PATHS /bin )

 # get configuration options
 IF (ESTCONFIG)


BUG: Qt5 components not correctly detected if only Qt5_DIR is provided, when this is supported by Qt CMake system.

Fixed by updating Qt5 find_package call to use modern CMake syntax

--- cmake/OpenCVFindLibsGUI.cmake
+++ cmake/OpenCVFindLibsGUI.cmake
@@ -15,15 +15,11 @@
 ocv_clear_vars(HAVE_QT HAVE_QT5)
 if(WITH_QT)
   if(NOT WITH_QT EQUAL 4)
-    find_package(Qt5Core)
-    find_package(Qt5Gui)
-    find_package(Qt5Widgets)
-    find_package(Qt5Test)
-    find_package(Qt5Concurrent)
-    if(Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND AND Qt5Concurrent_FOUND)
+    find_package(Qt5 COMPONENTS Core Gui Widgets Test Concurrent REQUIRED NO_MODULE)
+    if(Qt5_FOUND)
       set(HAVE_QT5 ON)
       set(HAVE_QT  ON)
-      find_package(Qt5OpenGL)
+      find_package(Qt5 COMPONENTS OpenGL QUIET)
       if(Qt5OpenGL_FOUND)
         set(QT_QTOPENGL_FOUND ON)
       endif()


Test python examples against build

Test python examples against build

--- cmake/PythonEnvironment.cmake
+++ cmake/PythonEnvironment.cmake
@@ -1,12 +1,12 @@
 MACRO(GET_PYTHON_ENV)
 	LIST(APPEND PYTHON_ENV_VARS GDB="gdb -x ${CMAKE_SOURCE_DIR}/src/.gdb --args")
 	LIST(APPEND PYTHON_ENV_VARS PYTHON=${PYTHON_EXECUTABLE})
-	LIST(APPEND PYTHON_ENV_VARS PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${PYTHON_PACKAGES_PATH}:$ENV{PYTHONPATH})
+	LIST(APPEND PYTHON_ENV_VARS PYTHONPATH=${CMAKE_BINARY_DIR}/src/interfaces/python:${CMAKE_INSTALL_PREFIX}/${PYTHON_PACKAGES_PATH}:$ENV{PYTHONPATH})
 	if(WIN32)
-	  LIST(APPEND PYTHON_ENV_VARS PATH=${CMAKE_INSTALL_PREFIX}/lib;$ENV{PATH})
+		LIST(APPEND PYTHON_ENV_VARS PATH=${CMAKE_BINARY_DIR}/src/shogun;${CMAKE_INSTALL_PREFIX}/lib;$ENV{PATH})
 	elseif(APPLE)
-	  LIST(APPEND PYTHON_ENV_VARS DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:$ENV{DYLD_LIBRARY_PATH})
+		LIST(APPEND PYTHON_ENV_VARS DYLD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/shogun:${CMAKE_INSTALL_PREFIX}/lib:$ENV{DYLD_LIBRARY_PATH})
 	else()
-	  LIST(APPEND PYTHON_ENV_VARS LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:$ENV{LD_LIBRARY_PATH})
+		LIST(APPEND PYTHON_ENV_VARS LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/shogun:${CMAKE_INSTALL_PREFIX}/lib:$ENV{LD_LIBRARY_PATH})
 	endif()
 ENDMACRO()


cmake/autotools/expat.cmake: Get back in sync with CI


Reactivated mitkToFCameraPMDRawDataCamBoardDeviceTest

--- Modules/ToFHardware/Testing/files.cmake
+++ Modules/ToFHardware/Testing/files.cmake
@@ -4,7 +4,7 @@
   mitkToFCameraMITKPlayerDeviceTest.cpp
   mitkToFCameraPMDCamBoardControllerTest.cpp
   mitkToFCameraPMDCamBoardDeviceTest.cpp
-  #mitkToFCameraPMDRawDataCamBoardDeviceTest.cpp
+  mitkToFCameraPMDRawDataCamBoardDeviceTest.cpp
   mitkToFCameraPMDCamCubeControllerTest.cpp
   mitkToFCameraPMDCamCubeDeviceTest.cpp
   #mitkToFCameraPMDRawDataCamCubeDeviceTest.cpp


added detail headers

added detail headers

--- cmake/libbitcrypto-core.cmake
+++ cmake/libbitcrypto-core.cmake
@@ -2,7 +2,7 @@

 #add_definitions(-D__DEBUG__)

-include_directories(${CMAKE_BINARY_DIR}/include/bitcrypto ${CMAKE_SOURCE_DIR}/src)
+include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/include/bitcrypto)

 file(GLOB SOURCES
@@ -17,6 +17,7 @@
     "src/*.hpp"
     "src/*.ipp"
     "src/external/*.h"
+    "src/detail/*.hpp"
 )

@@ -26,11 +27,11 @@
 add_library(bitcrypto-core STATIC ${SOURCES})
 add_dependencies(bitcrypto-core libsecp256k1)

-add_custom_command(
-    TARGET bitcrypto-core
-    PRE_BUILD
-    COMMAND ${CMAKE_COMMAND} ARGS -E make_directory ${CMAKE_BINARY_DIR}/include/bitcrypto/external
-)
+#add_custom_command(
+#    TARGET bitcrypto-core
+#    PRE_BUILD
+#    COMMAND ${CMAKE_COMMAND} ARGS -E make_directory ${CMAKE_BINARY_DIR}/include/bitcrypto/external
+#)

 foreach(HEADER ${HEADERS})
     add_custom_command(


fixed CTemplate for osx

fixed CTemplate for osx

--- cmake/Modules/FindCTemplate.cmake
+++ cmake/Modules/FindCTemplate.cmake
@@ -7,25 +7,24 @@
 #
 # Source <https://github.com/UCL/hemelb/blob/master/dependencies/Modules/Find.cmake>

-option(CTEMPLATE_USE_STATIC "Prefer Static CTemplate library" OFF)
-IF( CTEMPLATE_INCLUDE_DIR )
-    # Already in cache, be silent
-    SET( CTEMPLATE_FIND_QUIETLY TRUE )
-ENDIF( CTEMPLATE_INCLUDE_DIR )
+#We use our included library on MacOS
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

-FIND_PATH( CTEMPLATE_INCLUDE_DIR "ctemplate/template.h")
-if(CTEMPLATE_USE_STATIC)
-set(__old_cmake_find_lib_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
-	set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
-endif()
+    set(CTEMPLATE_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/ctemplate/include/)
+    set(CTEMPLATE_LIBRARIES ${PROJECT_SOURCE_DIR}/thirdparty/ctemplate/osx-lib/libctemplate.2.dylib)

-FIND_LIBRARY( CTEMPLATE_LIBRARIES
-              NAMES "ctemplate"
-              PATH_SUFFIXES "ctemplate" )
+ELSE()
+    IF( CTEMPLATE_INCLUDE_DIR )
+        # Already in cache, be silent
+        SET( CTEMPLATE_FIND_QUIETLY TRUE )
+    ENDIF( CTEMPLATE_INCLUDE_DIR )

-if(CTEMPLATE_USE_STATIC)
-	set(CMAKE_FIND_LIBRARY_SUFFIXES ${__old_cmake_find_lib_suffixes})
-endif()
+    FIND_PATH( CTEMPLATE_INCLUDE_DIR "ctemplate/template.h")
+
+    FIND_LIBRARY( CTEMPLATE_LIBRARIES
+                  NAMES "ctemplate"
+                  PATH_SUFFIXES "ctemplate" )
+ENDIF()

 # handle the QUIETLY and REQUIRED arguments and set CTEMPLATE_FOUND to TRUE if
 # all listed variables are TRUE


Revert "[CMake][Fuchsia] Enable experimental new pass manager by default"

This reverts commit r350461 as it causes many of the Clang tests to fail.

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

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -16,7 +16,6 @@

 set(ENABLE_LINKER_BUILD_ID ON CACHE BOOL "")
 set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "")
-set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER ON CACHE BOOL "")

 set(LLVM_ENABLE_LTO ON CACHE BOOL "")
 if(NOT APPLE)


Fortran is not a prerequisite for building ROOT

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@41478 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -4,7 +4,7 @@

 #---Enable FORTRAN (unfortunatelly is not nowt possible in all cases)-------------------------------
 if(NOT WIN32 AND NOT CMAKE_GENERATOR STREQUAL Xcode)
-  enable_language(Fortran)
+  enable_language(Fortran OPTIONAL)
 endif()


fix for compiling on linux

fix for compiling on linux

--- tutorial/cmake/FindGLEW.cmake
+++ tutorial/cmake/FindGLEW.cmake
@@ -7,6 +7,7 @@

 FIND_PATH(GLEW_INCLUDE_DIR GL/glew.h
    ${PROJECT_SOURCE_DIR}/../../external/glew/include
+   ${PROJECT_SOURCE_DIR}/../external/glew/include
    /usr/include
    /usr/local/include
    $ENV{GLEWROOT}/include


update

update

--- modules/asio.cmake
+++ modules/asio.cmake
@@ -2,12 +2,6 @@

   # Module library
   file(GLOB SOURCE_FILES "asio/asio/src/*.cpp")
-  if(MSVC)
-    # C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4267")
-  else()
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")
-  endif()
   add_library(asio ${SOURCE_FILES})
   target_compile_definitions(asio PRIVATE ASIO_STANDALONE ASIO_SEPARATE_COMPILATION)
   target_include_directories(asio PUBLIC "asio/asio/include" PUBLIC ${OPENSSL_INCLUDE_DIR})


update

update

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -39,7 +39,7 @@
   endif()

   # Module assembler files
-  if(CMAKE_COMPILER_IS_GNUCC)
+  if(CMAKE_COMPILER_IS_GNUCC AND NOT CYGWIN)
     add_definitions(-DASMV)
     set(ASSEMBLER_FILES "zlib/contrib/amd64/amd64-match.S")
     set_source_files_properties(${ASSEMBLER_FILES} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)


adding test call to catkin.cmake file

adding test call to catkin.cmake file

--- catkin.cmake
+++ catkin.cmake
@@ -12,3 +12,6 @@
                  scripts/plot_primitives.py
     DESTINATION "${CATKIN_PACKAGE_BIN_DESTINATION}"
 )
+if (CATKIN_ENABLE_TESTING)
+    catkin_add_nosetests(tests)
+endif()


Applied cygwin patch, #2283

Applied cygwin patch, #2283

--- core/rosbuild/rosconfig.cmake
+++ core/rosbuild/rosconfig.cmake
@@ -79,9 +79,10 @@
   # Old versions of gcc need -pthread to enable threading, #2095.
   # Also, some linkers, e.g., goLD, require -pthread (or another way to
   # generate -lpthread).
-  if(UNIX)
+  # CYGWIN gcc has their -pthread disabled
+  if(UNIX AND NOT CYGWIN)
     set(ROS_COMPILE_FLAGS "${ROS_COMPILE_FLAGS} -pthread")
-  endif(UNIX)
+  endif(UNIX AND NOT CYGWIN)
 endif(NOT DEFINED ROS_COMPILE_FLAGS)

 # Default link flags for all executables and libraries


hiding dependencies of dependencies variables, and propagating into direct dependency or current project.

--- dist/WkDepends.cmake
+++ dist/WkDepends.cmake
@@ -168,8 +168,10 @@

 find_package( ${package_name} )
 #hiding depends variables from interface
-mark_as_advanced( ${package_var_name}_INCLUDE_DIR )
-mark_as_advanced( ${package_var_name}_LIBRARY )
+mark_as_advanced( ${package_var_name}_DIR )
+mark_as_advanced( ${package_var_name}_INCLUDE_DIRS )
+mark_as_advanced( ${package_var_name}_LIBRARIES )
+mark_as_advanced( ${package_var_name}_RUN_LIBRARIES )

 # Include directory might be needed by upper project if ${PROJECT_NAME} doesn totally encapsulate it.
 # NB : It shouldnt hurt if the upper project also define it as its own dependency


Adding version info to IlmBase

Adding version info to IlmBase

--- cmake/Modules/FindIlmBase.cmake
+++ cmake/Modules/FindIlmBase.cmake
@@ -20,7 +20,41 @@
 )

 if(IlmBase_INCLUDE_DIR)
-  include_directories(${Jemalloc_INCLUDE_DIR})
+  include_directories(${IlmBase_INCLUDE_DIR})
+  find_file(
+    _IlmBase_CONFIG
+    NAME IlmBaseConfig.h
+    PATHS "${IlmBase_INCLUDE_DIR}/OpenEXR"
+    NO_DEFAULT_PATH
+    )
+  if(_IlmBase_CONFIG)
+    file(
+      STRINGS ${_IlmBase_CONFIG} _IlmBase_VERSION_MAJOR_STRING
+      REGEX "#define[ ]+ILMBASE_VERSION_MAJOR[ ]+([0-9]+)"
+      )
+      if(_IlmBase_VERSION_MAJOR_STRING)
+        string(REGEX MATCH "[0-9]+" IlmBase_VERSION_MAJOR ${_IlmBase_VERSION_MAJOR_STRING})
+      endif()
+
+    file(
+      STRINGS ${_IlmBase_CONFIG} _IlmBase_VERSION_MINOR_STRING
+      REGEX "#define[ ]+ILMBASE_VERSION_MINOR[ ]+([0-9]+)"
+      )
+      if(_IlmBase_VERSION_MINOR_STRING)
+        string(REGEX MATCH "[0-9]+" IlmBase_VERSION_MINOR ${_IlmBase_VERSION_MINOR_STRING})
+      endif()
+
+    file(
+      STRINGS ${_IlmBase_CONFIG} _IlmBase_VERSION_PATCH_STRING
+      REGEX "#define[ ]+ILMBASE_VERSION_PATCH[ ]+([0-9]+)"
+      )
+      if(_IlmBase_VERSION_PATCH_STRING)
+        string(REGEX MATCH "[0-9]+" IlmBase_VERSION_PATCH ${_IlmBase_VERSION_PATCH_STRING})
+      endif()
+
+      message("-- IlmBase version: ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR}.${IlmBase_VERSION_PATCH}")
+  endif()
+
 endif()

 foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
@@ -29,7 +63,7 @@
     IlmBase_${UPPERCOMPONENT}_LIBRARY
     NAMES ${COMPONENT}
     PATHS ${ILMBASE_ROOT}
-    PATH_SUFFIXES lib
+    PATH_SUFFIXES lib lib64
     NO_DEFAULT_PATH
   )


Improve SQLite3 module.

Improve SQLite3 module.

--- cmake/Modules/FindSQLite3.cmake
+++ cmake/Modules/FindSQLite3.cmake
@@ -1,12 +1,12 @@
-# - Try to find Sqlite3
+# - Try to find SQLite3
 # Once done this will define
 #
-#  SQLITE3_FOUND - system has Sqlite3
-#  SQLITE3_INCLUDE_DIRS - the Sqlite3 include directory
-#  SQLITE3_LIBRARIES - Link these to use Sqlite3
-#  SQLITE3_DEFINITIONS - Compiler switches required for using Sqlite3
+#  SQLITE3_FOUND - system has SQLite3
+#  SQLITE3_INCLUDE_DIRS - the SQLite3 include directory
+#  SQLITE3_LIBRARIES - Link these to use SQLite3
+#  SQLITE3_DEFINITIONS - Compiler switches required for using SQLite3
 #
-#  Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
+#  Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
 #
 #  Redistribution and use is allowed according to the terms of the New
 #  BSD license.
@@ -29,6 +29,7 @@
       pkg_check_modules(_SQLITE3 sqlite3)
     endif (PKG_CONFIG_FOUND)
   endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+
   find_path(SQLITE3_INCLUDE_DIR
     NAMES
       sqlite3.h
@@ -39,6 +40,7 @@
       /opt/local/include
       /sw/include
   )
+  mark_as_advanced(SQLITE3_INCLUDE_DIR)

   find_library(SQLITE3_LIBRARY
     NAMES
@@ -50,9 +52,10 @@
       /opt/local/lib
       /sw/lib
   )
+  mark_as_advanced(SQLITE3_LIBRARY)

   if (SQLITE3_LIBRARY)
-    set(SQLITE3_FOUND TRUE)
+    set(SQLITE3_FOUND TRUE CACHE INTERNAL "Wether the sqlite3 library has been found" FORCE)
   endif (SQLITE3_LIBRARY)

   set(SQLITE3_INCLUDE_DIRS
@@ -71,13 +74,13 @@
   endif (SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES)

   if (SQLITE3_FOUND)
-    if (NOT Sqlite3_FIND_QUIETLY)
-      message(STATUS "Found Sqlite3: ${SQLITE3_LIBRARIES}")
-    endif (NOT Sqlite3_FIND_QUIETLY)
+    if (NOT SQLite3_FIND_QUIETLY)
+      message(STATUS "Found SQLite3: ${SQLITE3_LIBRARIES}")
+    endif (NOT SQLite3_FIND_QUIETLY)
   else (SQLITE3_FOUND)
-    if (Sqlite3_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find Sqlite3")
-    endif (Sqlite3_FIND_REQUIRED)
+    if (SQLite3_FIND_REQUIRED)
+      message(FATAL_ERROR "Could not find SQLite3")
+    endif (SQLite3_FIND_REQUIRED)
   endif (SQLITE3_FOUND)

   # show the SQLITE3_INCLUDE_DIRS and SQLITE3_LIBRARIES variables only in the advanced view


[Abseil] Adding URL_HASH so that an existing archive can be used from disk (#11690)

--- cmake/external/abseil-cpp.cmake
+++ cmake/external/abseil-cpp.cmake
@@ -18,6 +18,7 @@
     PREFIX "${CMAKE_CURRENT_BINARY_DIR}/abseil-cpp"
     BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/abseil-cpp"
     URL https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.zip
+    URL_HASH SHA1=ce61532df974d00025b1220408ce1c900d81baf2
     PATCH_COMMAND ${ABSL_PATCH_COMMAND}
 )

@@ -25,11 +26,9 @@
 FetchContent_GetProperties(abseil_cpp SOURCE_DIR)

 if (GDK_PLATFORM)
-  # Abseil considers any partition that is NOT in the WINAPI_PARTITION_APP a viable platform
+  # Abseil considers any partition that is NOT in the WINAPI_PARTITION_APP a viable platform
   # for Win32 symbolize code (which depends on dbghelp.lib); this logic should really be flipped
   # to only include partitions that are known to support it (e.g. DESKTOP). As a workaround we
   # tell Abseil to pretend we're building an APP.
   target_compile_definitions(absl_symbolize PRIVATE WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP)
 endif()
-
-


[TVM EP] Hot fix of build on Windows of TVM EP with ipp-crypto (#12381)

fix of build on Windows with ipp-crypto. cmake warnings fix

Co-authored-by: Valery Chernov <50ddfba37a1838e5b37af7e209dddcf180bf9c94@deelvin.com>

--- cmake/external/ipp-crypto.cmake
+++ cmake/external/ipp-crypto.cmake
@@ -12,7 +12,7 @@
 set(IPP_CRYPTO_CONFIGURE_ARGS -DCMAKE_BUILD_TYPE=${IPP_CRYPTO_CONFIG_TYPE} -DCMAKE_INSTALL_PREFIX=${IPP_CRYPTO_BIN_DIR}/bin)
 if (WIN32)
   set(IPP_CRYPTO_ARCH ${CMAKE_GENERATOR_PLATFORM})
-  list(APPEND IPP_CRYPTO_CONFIGURE_ARGS -A${CMAKE_GENERATOR_PLATFORM} -G${CMAKE_GENERATOR_INSTANCE})
+  list(APPEND IPP_CRYPTO_CONFIGURE_ARGS -A${CMAKE_GENERATOR_PLATFORM})
 else()
   list(APPEND IPP_CRYPTO_CONFIGURE_ARGS -DARCH=${IPP_CRYPTO_ARCH})
 endif()
@@ -46,6 +46,8 @@
 )
 if (WIN32)
   set_target_properties(ippcp_s PROPERTIES
+    IMPORTED_IMPLIB "${IPP_CRYPTO_LIB_DIR}/ippcp.lib"
+    IMPORTED_LOCATION "${IPP_CRYPTO_LIB_DIR}/ippcp.dll"
     IMPORTED_IMPLIB_${IPP_CRYPTO_CONFIG_TYPE} "${IPP_CRYPTO_LIB_DIR}/ippcp.lib"
     IMPORTED_LOCATION_${IPP_CRYPTO_CONFIG_TYPE} "${IPP_CRYPTO_LIB_DIR}/ippcp.dll"
   )


LIB_GCAL_INCLUDE_DIR doesn't exist.

LIB_GCAL_INCLUDE_DIR doesn't exist.

svn path=/trunk/extragear/pim/googledata/; revision=959120

--- cmake/modules/FindLibGCal.cmake
+++ cmake/modules/FindLibGCal.cmake
@@ -3,10 +3,9 @@
 # Find the LibGCal includes and library
 #
 # This module defines:
-#	LIBGCAL_INCLUDE_DIR
-#	LIBGCAL_LIBRARIES
-#	LIBGCAL_FOUND
-#	LIBGCAL_LIBRARY
+#       LIBGCAL_INCLUDE_DIRS
+#       LIBGCAL_LIBRARIES
+#       LIBGCAL_FOUND
 #
 # Copyright (c) 2009 Mike Arthur <mike@mikearthur.co.uk>
 find_path(LIBGCAL_INCLUDE_DIR gcal.h)
@@ -14,15 +13,15 @@
 set(LIBGCAL_NAMES ${LIBGCAL_NAMES} gcal)
 find_library(LIBGCAL_LIBRARY NAMES ${LIBGCAL_NAMES})

-# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
+# handle the QUIETLY and REQUIRED arguments and set LIBGCAL_FOUND to TRUE if
 # all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(LibGCal DEFAULT_MSG LIBGCAL_LIBRARY LIBGCAL_INCLUDE_DIR)

 if(LIBGCAL_FOUND)
-	set(LIBGCAL_LIBRARIES ${LIBGCAL_LIBRARY})
-	set(LIBGCAL_INCLUDE_DIRS ${LIB_GCAL_INCLUDE_DIR})
-else()
-	set(LIBGCAL_LIBRARIES)
-	set(LIBGCAL_INCLUDE_DIRS)
-endif()
+        set(LIBGCAL_LIBRARIES ${LIBGCAL_LIBRARY})
+        set(LIBGCAL_INCLUDE_DIRS ${LIBGCAL_INCLUDE_DIR})
+else(LIBGCAL_FOUND)
+        set(LIBGCAL_LIBRARIES)
+        set(LIBGCAL_INCLUDE_DIRS)
+endif(LIBGCAL_FOUND)


* cmake/modules/LLVMLibDeps.cmake: Updated library dependencies.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -2,7 +2,7 @@
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
@@ -11,12 +11,12 @@
 set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
@@ -31,7 +31,7 @@
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430CodeGen LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget)
@@ -40,17 +40,17 @@
 set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16 LLVMPIC16Info LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMSystem )
-set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMSystemZCodeGen LLVMSystemZInfo LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport LLVMSystem)
@@ -58,9 +58,10 @@
 set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
-set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCore LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)


cmake/modules/LLVMLibDeps.cmake: Update to appease cmake builds.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,4 +1,4 @@
-set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMDesc LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMDesc LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMDesc LLVMARMInfo LLVMMC)
@@ -40,7 +40,8 @@
 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsAsmPrinter LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMObject LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
@@ -58,10 +59,10 @@
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMTarget LLVMipa)
-set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Desc LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport LLVMX86Utils)
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMX86AsmPrinter LLVMX86Desc LLVMX86Info LLVMX86Utils)
-set(MSVC_LIB_DEPS_LLVMX86Desc LLVMMC LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86Desc LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMX86Utils LLVMCore LLVMSupport)


swig/python: small bug fix

swig/python: small bug fix

Change-Id: I3d6ac7dbbe36198d1911f1d370bc5596f56130f4

--- cmake/qibuild/swig/python.cmake
+++ cmake/qibuild/swig/python.cmake
@@ -71,7 +71,7 @@
   endforeach()

   find_package(PYTHON)
-  include_directories(${PYTHON_INCLUDE_DIR})
+  include_directories(${PYTHON_INCLUDE_DIRS})
   # Since there is often a "lazy" include in the interface file:
   include_directories(${CMAKE_CURRENT_SOURCE_DIR})


fixed the build with c-client on unix

fixed the build with c-client on unix

--- cmake_modules/FindCClient.cmake
+++ cmake_modules/FindCClient.cmake
@@ -39,11 +39,11 @@

   # Do not treat the operator name keywords and, bitand, bitor, compl, not, or and xor
   # as synonyms as keywords. Needed in order to include C-CLIENT library
-  IF (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
+  IF (CMAKE_COMPILER_IS_GNUCXX)
     IF(NOT CMAKE_CXX_FLAGS MATCHES "-fno-operator-names")
-      LIST(APPEND CMAKE_CXX_FLAGS "-fno-operator-names")
+      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names")
     ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-fno-operator-names")
-  ENDIF (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
+  ENDIF (CMAKE_COMPILER_IS_GNUCXX)

 else(CCLIENT_INCLUDE AND CCLIENT_LIBRARY)
   set(CCLIENT_FOUND 0)


ENH: use specific compile flag for muparserx on macosx

--- CMake/External_muParserX.cmake
+++ CMake/External_muParserX.cmake
@@ -11,6 +11,11 @@
   message(STATUS "  Using muParserX system version")
 else()
   SETUP_SUPERBUILD(PROJECT ${proj})
+
+  set(MUPARSERX_FLAGS)
+  if(APPLE)
+    set(MUPARSERX_FLAGS -std=c++0x)
+  endif()

   # svn checkout http://muparserx.googlecode.com/svn/trunk/ muparserx-read-only

@@ -26,6 +31,7 @@
       -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
       -DCMAKE_BUILD_TYPE:STRING=Release
       -DBUILD_SHARED_LIBS:BOOL=ON
+      ${MUPARSERX_FLAGS}
     CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     DEPENDS ${${proj}_DEPENDENCIES}
     PATCH_COMMAND ${CMAKE_COMMAND} -E copy


Update BoostExternal.cmake

Update BoostExternal.cmake

--- Superbuild/BoostExternal.cmake
+++ Superbuild/BoostExternal.cmake
@@ -71,10 +71,9 @@
 # Boost Jam needs to have 64-bit build explicitly configured
 IF(WIN32)
   SET(FORCE_64BIT_BUILD ON)
-  SET(boost_GIT_TAG "origin/v1.67.0")
+  SET(boost_GIT_TAG "origin/v1.75.0")
 ELSE()
-  SET(boost_GIT_TAG "origin/v1.72.0")
-
+  SET(boost_GIT_TAG "origin/v1.75.0")
 ENDIF()


hdf5: remove debugging message left from upstream

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -9,9 +9,6 @@
 INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
 INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
 INCLUDE (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
-
-MESSAGE (STATUS "Configure Checks that still need to be implemented")
-MESSAGE (STATUS "  GetConsoleScreenBufferInfo function for Windows")

 #-----------------------------------------------------------------------------
 # Always SET this for now IF we are on an OS X box


Add FindOpenBLAS.cmake

Add FindOpenBLAS.cmake


UMUNDONATIVEJAVA_LOCATION not enough to check whether java was built

--- contrib/cmake/CPackUMundo.cmake
+++ contrib/cmake/CPackUMundo.cmake
@@ -90,9 +90,13 @@
 GET_TARGET_PROPERTY(UMUNDONATIVEJAVA_LOCATION umundoNativeJava LOCATION)
 if (UMUNDONATIVEJAVA_LOCATION)
 	if (DIST_PREPARE)
-		install(FILES ${PROJECT_SOURCE_DIR}/package/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		if (EXISTS "${PROJECT_SOURCE_DIR}/package/umundo.jar")
+			install(FILES ${PROJECT_SOURCE_DIR}/package/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		endif()
 	else()
-		install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		if (EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/umundo.jar")
+			install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		endif()
 	endif()
 	list (APPEND UMUNDO_CPACK_COMPONENTS "librarySwig")
 endif()


COMP: Deactivated mitkNavigationDataPlayerTest due to random fails; see bug 16485. We decided to won't fix because of complete restructuring via bug 15959

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -38,7 +38,8 @@
    mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp
    mitkVirtualTrackingDeviceTest.cpp
-   mitkNavigationDataPlayerTest.cpp # see bug 11636 (extend this test by microservices)
+  #  mitkNavigationDataPlayerTest.cpp # random fails see bug 16485.
+  #  We decided to won't fix because of complete restructuring via bug 15959.
    mitkTrackingDeviceSourceTest.cpp
    mitkTrackingDeviceSourceConfiguratorTest.cpp
    mitkNavigationDataEvaluationFilterTest.cpp


COMP: Deactivated test again, still doesn't work on dart client

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -54,7 +54,7 @@
    # ------------------ Navigation Tool Management Tests -------------------
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolTest.cpp
-   mitkNavigationToolReaderAndWriterTest.cpp
+   #mitkNavigationToolReaderAndWriterTest.cpp #deactivated because of bug 18835
    # -----------------------------------------------------------------------
 )


Rename Superbuild CMake variable to SimpleITK_USE_SYSTEM_*

This following the SimpleITK project naming convention, and best
practices done in ITK.

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -281,9 +281,10 @@
 #------------------------------------------------------------------------------
 # Lua
 #------------------------------------------------------------------------------
-option ( USE_SYSTEM_LUA "Use a pre-compiled version of LUA 5.1 previously configured for your system" OFF )
-mark_as_advanced(USE_SYSTEM_LUA)
-if ( USE_SYSTEM_LUA )
+option ( SimpleITK_USE_SYSTEM_LUA "Use a pre-compiled version of LUA 5.1 previously configured for your system" OFF )
+sitk_legacy_naming( SimpleITK_USE_SYSTEM_LUA USE_SYSTEM_LUA)
+mark_as_advanced(SimpleITK_USE_SYSTEM_LUA)
+if ( SimpleITK_USE_SYSTEM_LUA )
   find_package( LuaInterp REQUIRED 5.1 )
   set( SimpleITK_LUA_EXECUTABLE ${LUA_EXECUTABLE} CACHE PATH "Lua executable used for code generation." )
   mark_as_advanced( SimpleITK_LUA_EXECUTABLE )
@@ -291,16 +292,15 @@
 else()
   include(External_Lua)
   list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES Lua)
-  set( SimpleITK_LUA_EXECUTABLE ${SimpleITK_LUA_EXECUTABLE} CACHE PATH "Lua executable used for code generation." )
-  mark_as_advanced( SimpleITK_LUA_EXECUTABLE )
 endif()

 #------------------------------------------------------------------------------
 # Swig
 #------------------------------------------------------------------------------
-option ( USE_SYSTEM_SWIG "Use a pre-compiled version of SWIG 3.0 previously configured for your system" OFF )
-mark_as_advanced(USE_SYSTEM_SWIG)
-if(USE_SYSTEM_SWIG)
+option ( SimpleITK_USE_SYSTEM_SWIG "Use a pre-compiled version of SWIG 3.0 previously configured for your system" OFF )
+sitk_legacy_naming( SimpleITK_USE_SYSTEM_SWIG USE_SYSTEM_SWIG )
+mark_as_advanced(SimpleITK_USE_SYSTEM_SWIG)
+if(SimpleITK_USE_SYSTEM_SWIG)
   find_package ( SWIG 3 REQUIRED )
 else()
   include(External_Swig)
@@ -310,10 +310,11 @@
 #------------------------------------------------------------------------------
 # Google Test
 #------------------------------------------------------------------------------
-option( USE_SYSTEM_GTEST "Use an external version of GoogleTest. " OFF )
-mark_as_advanced(USE_SYSTEM_GTEST)
+option( SimpleITK_USE_SYSTEM_GTEST "Use an external version of GoogleTest. " OFF )
+sitk_legacy_naming( SimpleITK_USE_SYSTEM_GTEST USE_SYSTEM_GTEST )
+mark_as_advanced(SimpleITK_USE_SYSTEM_GTEST)
 if ( BUILD_TESTING )
-  if (USE_SYSTEM_GTEST)
+  if (SimpleITK_USE_SYSTEM_GTEST)
     if (DEFINED GTEST_ROOT AND EXISTS "${GTEST_ROOT}/CMakeLists.txt")
       list(APPEND SimpleITK_VARS GTEST_ROOT)
     else()
@@ -330,10 +331,11 @@
 #------------------------------------------------------------------------------
 # Python virtualenv
 #------------------------------------------------------------------------------
-option( USE_SYSTEM_VIRTUALENV "Use a system version of Python's virtualenv. " OFF )
-mark_as_advanced(USE_SYSTEM_VIRTUALENV)
+option( SimpleITK_USE_SYSTEM_VIRTUALENV "Use a system version of Python's virtualenv. " OFF )
+sitk_legacy_naming( SimpleITK_USE_SYSTEM_VIRTUALENV USE_SYSTEM_VIRTUALENV)
+mark_as_advanced(SimpleITK_USE_SYSTEM_VIRTUALENV)
 if( NOT DEFINED SimpleITK_PYTHON_USE_VIRTUALENV OR SimpleITK_PYTHON_USE_VIRTUALENV )
-  if ( USE_SYSTEM_VIRTUALENV )
+  if ( SimpleITK_USE_SYSTEM_VIRTUALENV )
     find_package( PythonVirtualEnv REQUIRED)
   else()
     include(External_virtualenv)
@@ -353,9 +355,10 @@
 if(ITK_WRAPPING)
   list(APPEND ITK_DEPENDENCIES Swig)
 endif()
-option(USE_SYSTEM_ITK "Use a pre-built version of ITK" OFF)
-mark_as_advanced(USE_SYSTEM_ITK)
-if(USE_SYSTEM_ITK)
+option(SimpleITK_USE_SYSTEM_ITK "Use a pre-built version of ITK" OFF)
+sitk_legacy_naming( SimpleITK_USE_SYSTEM_ITK USE_SYSTEM_ITK )
+mark_as_advanced(SimpleITK_USE_SYSTEM_ITK)
+if(SimpleITK_USE_SYSTEM_ITK)
   find_package(ITK REQUIRED)
   #we require certain packages be turned on in ITK
   include(sitkCheckForITKModuleDependencies)
@@ -373,6 +376,8 @@
     if (NOT _varName MATCHES "^SITK_LANGUAGES_VARS"
           AND
         NOT _varName MATCHES "^SimpleITK_VARS"
+          AND
+        NOT _varName MATCHES "^SimpleITK_USE_SYSTEM"
           AND
         NOT _varName MATCHES "^SimpleITK_.*_COMPILE_OPTIONS"
           AND


:lipstick: so things fit in 80 columns

:lipstick: so things fit in 80 columns

--- scripts/AddPyTest.cmake
+++ scripts/AddPyTest.cmake
@@ -31,7 +31,8 @@
     _apt_single_declare("_apt_single")

     get_filename_component(abs_source "${source}" ABSOLUTE)
-    string(REGEX REPLACE ".*/tests?_?(.*)\\.(py|so)" "\\1" testname "${abs_source}")
+    string(REGEX REPLACE ".*/tests?_?(.*)\\.(py|so)" "\\1" testname
+        "${abs_source}")
     if(NOT "${prefix}" STREQUAL "")
         set(testname "${prefix}${testname}")
     endif()


Improve config phase status message

Improve config phase status message

Co-Authored-By: Matthias Vallentin <e388d34fd3c0456122779e95f262c0d70198a168@tenzir.com>

--- cmake/FindPCAP.cmake
+++ cmake/FindPCAP.cmake
@@ -37,6 +37,10 @@
   PCAP_LIBRARIES
   PCAP_INCLUDE_DIR)

+if (PCAP_FOUND)
+  message(STATUS "Found libpcap: ${PCAP_LIBRARIES}")
+endif ()
+
 # create IMPORTED target for libpcap dependency
 if (PCAP_FOUND AND NOT TARGET pcap::pcap)
   add_library(pcap::pcap UNKNOWN IMPORTED GLOBAL)
@@ -56,7 +60,6 @@
   endif ()
 endif ()

-message(STATUS "PCAP_HAVE_SNF = ${PCAP_HAVE_SNF}")
 if (PCAP_HAVE_SNF)
   if (NOT SNF_ROOT_DIR)
     set(SNF_ROOT_DIR ${PCAP_ROOT_DIR})
@@ -65,7 +68,7 @@
     NAMES libsnf.a
     HINTS ${SNF_ROOT_DIR}/lib)

-  message(STATUS "SNF_LIBRARIES = ${SNF_LIBRARIES}")
+  message(STATUS "Found Myricom SNF library: ${SNF_LIBRARIES}")
   if (SNF_LIBRARIES)
     if (NOT TARGET aria::snf)
       add_library(aria::snf STATIC IMPORTED GLOBAL)


getarch_2nd now appends its output to config.h/config_kernel.h

--- cmake/prebuild.cmake
+++ cmake/prebuild.cmake
@@ -54,7 +54,7 @@

 if (DEFINED TARGET_CORE)
   # set the C flags for just this file
-  set_source_files_properties(getarch_2nd.c PROPERTIES COMPILE_FLAGS "-DBUILD_KERNEL")
+  set(GETARCH2_FLAGS "-DBUILD_KERNEL")
   set(TARGET_MAKE "Makefile_kernel.conf")
   set(TARGET_CONF "config_kernel.h")
 else()
@@ -85,19 +85,31 @@

 message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}")

-# append config data from getarch even more to the TARGET file
+# append config data from getarch to the TARGET file
 file(APPEND ${TARGET_CONF} ${GETARCH_CONF_OUT})

 ## TODO: config.h is ready for getarch_2nd now, so compile that
-#set(GETARCH2_SOURCES getarch_2nd.c config.h)
-#add_executable(getarch_2nd getarch_2nd.c config.h)
-#
-## finally run getarch_2nd, appending yet more to the TARGET files
-#message(STATUS "Running getarch_2nd")
-#execute_process(COMMAND getarch_2nd 0 >> ${TARGET_MAKE}
-#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
-#execute_process(COMMAND getarch_2nd 1 >> ${TARGET_CONF}
-#  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+set(GETARCH2_DIR "${PROJECT_BINARY_DIR}/getarch2_build")
+set(GETARCH2_BIN "getarch_2nd${CMAKE_EXECUTABLE_SUFFIX}")
+file(MAKE_DIRECTORY ${GETARCH2_DIR})
+try_compile(GETARCH2_RESULT ${GETARCH2_DIR}
+  SOURCES ${CMAKE_SOURCE_DIR}/getarch_2nd.c
+  COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I${CMAKE_SOURCE_DIR}
+  OUTPUT_VARIABLE GETARCH2_LOG
+  COPY_FILE ${GETARCH2_BIN}
+)
+
+message(STATUS "getarch2 result ${GETARCH2_RESULT}")
+message(STATUS "getarch2 log ${GETARCH2_LOG}")
+# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
+execute_process(COMMAND ${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
+execute_process(COMMAND ${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
+
+message(STATUS "GETARCH_2 results:\n${GETARCH2_MAKE_OUT}")
+message(STATUS "GETARCH_2 cresults:\n${GETARCH2_CONF_OUT}")
+
+# append config data from getarch_2nd to the TARGET file
+file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT})

 # TODO: parse the MAKE variables from getarch/getarch2 (GETARCH_MAKE_OUT) into CMAKE vars
 #       for now I temporarily hardcoded to get system.cmake working


some refactoring around readline/libedit  (handle dependent options, allow user with change WITH_READLINE to WITH_LIBEDIT and other way around after the first compile)

--- cmake/readline.cmake
+++ cmake/readline.cmake
@@ -12,16 +12,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-MACRO(SET_WITH_BUNDLED_READLINE option)
-  IF(option)
-   SET(not_option OFF)
-  ELSE()
-   SET(not_option ON)
-  ENDIF()
-  SET(WITH_READLINE ${option} CACHE BOOL "Use bundled readline")
-  SET(WITH_LIBEDIT ${not_option} CACHE BOOL "Use bundled libedit")
-ENDMACRO()

 MACRO (MYSQL_CHECK_MULTIBYTE)
   CHECK_INCLUDE_FILE(wctype.h HAVE_WCTYPE_H)
@@ -119,8 +109,9 @@
 ENDMACRO()

 MACRO (MYSQL_USE_BUNDLED_READLINE)
-  SET_WITH_BUNDLED_READLINE(ON)
   SET(USE_NEW_READLINE_INTERFACE 1)
+  SET(HAVE_HIST_ENTRY)
+  SET(USE_LIBEDIT_INTERFACE)
   SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils)
   SET(READLINE_LIBRARY readline)
   FIND_CURSES()
@@ -128,26 +119,27 @@
 ENDMACRO()

 MACRO (MYSQL_USE_BUNDLED_LIBEDIT)
-  SET_WITH_BUNDLED_READLINE(OFF)
-  SET(USE_LIBEDIT_INTERFACE 1 CACHE INTERNAL "")
-  SET(HAVE_HIST_ENTRY 1 CACHE INTERNAL "")
-  SET(READLINE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/cmd-line-utils/libedit")
+  SET(USE_LIBEDIT_INTERFACE 1)
+  SET(HAVE_HIST_ENTRY 1)
+  SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils/libedit)
   SET(READLINE_LIBRARY edit)
   FIND_CURSES()
   ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/libedit)
 ENDMACRO()

+
 MACRO (MYSQL_FIND_SYSTEM_READLINE name)
-  FIND_PATH(SYSTEM_READLINE_INCLUDE_DIR readline/readline.h )
-  FIND_LIBRARY(SYSTEM_READLINE_LIBRARY NAMES ${name})
-  MARK_AS_ADVANCED(SYSTEM_READLINE_INCLUDE_DIR  SYSTEM_READLINE_LIBRARY)
+
+  FIND_PATH(${name}_INCLUDE_DIR readline/readline.h )
+  FIND_LIBRARY(${name}_LIBRARY NAMES ${name})
+  MARK_AS_ADVANCED(${name}_INCLUDE_DIR  ${name}_LIBRARY)

   INCLUDE(CheckCXXSourceCompiles)
-  SET(CMAKE_REQUIRES_LIBRARIES ${SYSTEM_READLINE_LIBRARY})
-
-  IF(SYSTEM_READLINE_LIBRARY AND SYSTEM_READLINE_INCLUDE_DIR)
+  SET(CMAKE_REQUIRES_LIBRARIES ${${name}_LIBRARY})
+
+  IF(${name}_LIBRARY AND ${name}_INCLUDE_DIR)
     SET(SYSTEM_READLINE_FOUND 1)
-    SET(CMAKE_REQUIRED_LIBRARIES ${SYSTEM_READLINE_LIBRARY})
+    SET(CMAKE_REQUIRED_LIBRARIES ${${name}_LIBRARY})
     CHECK_CXX_SOURCE_COMPILES("
     #include <stdio.h>
     #include <readline/readline.h>
@@ -156,8 +148,8 @@
        HIST_ENTRY entry;
        return 0;
     }"
-    HAVE_HIST_ENTRY)
-
+    ${name}_HAVE_HIST_ENTRY)
+
     CHECK_CXX_SOURCE_COMPILES("
     #include <stdio.h>
     #include <readline/readline.h>
@@ -166,7 +158,7 @@
       char res= *(*rl_completion_entry_function)(0,0);
       completion_matches(0,0);
     }"
-    USE_LIBEDIT_INTERFACE)
+    ${name}_USE_LIBEDIT_INTERFACE)

     CHECK_CXX_SOURCE_COMPILES("
@@ -177,31 +169,48 @@
       rl_completion_func_t *func1= (rl_completion_func_t*)0;
       rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
     }"
-    USE_NEW_READLINE_INTERFACE)
+    ${name}_USE_NEW_READLINE_INTERFACE)

-    IF(USE_LIBEDIT_INTERFACE  OR USE_NEW_READLINE_INTERFACE)
-      SET(READLINE_LIBRARY ${SYSTEM_READLINE_LIBRARY})
-      SET(READLINE_INCLUDE_DIR ${SYSTEM_READLINE_INCLUDE_DIR})
+    IF(${name}_USE_LIBEDIT_INTERFACE  OR ${name}_USE_NEW_READLINE_INTERFACE)
+      SET(READLINE_LIBRARY ${${name}_LIBRARY})
+      SET(READLINE_INCLUDE_DIR ${${name}_INCLUDE_DIR})
+      SET(HAVE_HIST_ENTRY ${${name}_HAVE_HIST_ENTRY})
+      SET(USE_LIBEDIT_INTERFACE ${${name}_USE_LIBEDIT_INTERFACE})
+      SET(USE_NEW_READLINE_INTERFACE ${${name}_USE_NEW_READLINE_INTERFACE})
       SET(READLINE_FOUND 1)
     ENDIF()
   ENDIF()
 ENDMACRO()
+

 MACRO (MYSQL_CHECK_READLINE)
   IF (NOT WIN32)
     MYSQL_CHECK_MULTIBYTE()
-    OPTION(WITH_READLINE "Use bundled readline" OFF)
     IF(NOT CYGWIN)
-      # Bundled libedit does not compile on cygwin
-      OPTION(WITH_LIBEDIT  "Use bundled libedit" ON)
+      SET(WITH_LIBEDIT  ON CACHE BOOL  "Use bundled libedit")
+      SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
     ELSE()
-      OPTION(WITH_LIBEDIT  "Use bundled libedit" OFF)
+      # Bundled libedit does not compile on cygwin, only readline
+      SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
+    ENDIF()
+
+    # Handle mutual exclusion of WITH_READLINE/WITH_LIBEDIT variables
+    # We save current setting to recognize when user switched between
+    # WITH_READLINE and WITH_LIBEDIT
+    IF(WITH_READLINE AND SAVE_READLINE_SETTING MATCHES "WITH_LIBEDIT"
+      OR NOT SAVE_READLINE_SETTING )
+      SET(WITH_LIBEDIT OFF CACHE BOOL "Use bundled libedit" FORCE)
+    ELSEIF(WITH_LIBEDIT AND SAVE_READLINE_SETTING MATCHES "WITH_READLINE"
+      OR NOT SAVE_READLINE_SETTING )
+      SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline" FORCE)
     ENDIF()

     IF(WITH_READLINE)
      MYSQL_USE_BUNDLED_READLINE()
+     SET(SAVE_READLINE_SETTING WITH_READLINE CACHE INTERNAL "" FORCE)
     ELSEIF(WITH_LIBEDIT)
      MYSQL_USE_BUNDLED_LIBEDIT()
+     SET(SAVE_READLINE_SETTING WITH_LIBEDIT CACHE INTERNAL "" FORCE)
     ELSE()
       MYSQL_FIND_SYSTEM_READLINE(readline)
       IF(NOT READLINE_FOUND)


Ensure HALIDE_SHARED is defined for Generators

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -214,6 +214,7 @@
   set(OBJLIB "${NAME}.objlib")
   add_library("${OBJLIB}" OBJECT ${args_SRCS})
   add_dependencies("${OBJLIB}" Halide)
+  target_compile_definitions("${OBJLIB}" PRIVATE "-DHalide_${HALIDE_LIBRARY_TYPE}")
   target_include_directories("${OBJLIB}" PRIVATE "${CMAKE_BINARY_DIR}/include")
   if (NOT MSVC)
     target_compile_options("${OBJLIB}" PRIVATE "-std=c++11") # Halide clients need C++11


FindGUROBI functionality imported from HATCHet

--- FindGUROBI.cmake
+++ FindGUROBI.cmake
@@ -1,20 +1,61 @@
-# copied from https://searchcode.com/codesearch/raw/30585458/
+# Simply provide the home of gurobi within the double apices here below
+# REQUIREMENT 1: Full path to Gurobi's home which must have a name similar to "gurobiXXX" where XXX is the version.
+# REQUIREMENT 2: Gurobi's must contain either (1) `lib` and `include` directories, (2) a folder named either `linux64` or `mac64` which correspondingly contains `lib` and `include` directories
+
+set(GUROBI_HOME "" CACHE STRING "Path where Gurobi is installed")
+
+
+
+if(EXISTS ${GUROBI_HOME} )
+    message( "-- Gurobi's home is set to: " ${GUROBI_HOME} )
+
+    string( REGEX MATCH "gurobi[0-9][0-9][0-9]" GUROBI_VER_FULL ${GUROBI_HOME} )
+    string( REGEX MATCH "[0-9][0-9][0-9]" GUROBI_VER ${GUROBI_VER_FULL} )
+
+    ## If the previous process fails to find the correct version of Gurobi in variable GUROBI_VER (e.g. 702, 751, 801) please provide the correct version here below by properly setting the version instead of XXX and uncommented the command
+    ## set(GUROBI_VER "XXX")
+
+    string(STRIP ${GUROBI_VER} GUROBI_VER )
+    message( "-- The retrieved version of Gurobi is: " ${GUROBI_VER} )
+
+    string(SUBSTRING ${GUROBI_VER} 0 2 GUROBI_VER_LIB)
+
+    message( "-- The retrieved name of version-specific library is " gurobi ${GUROBI_VER_LIB} )
+
+    file( GLOB GUROBI_LIB_FILE ${GUROBI_HOME}/linux64/lib/libgurobi${GUROBI_VER_LIB}.* )
+    if( GUROBI_LIB_FILE )
+    	message( "-- Gurobi library " ${GUROBI_LIB_FILE} " found in " ${GUROBI_HOME} "/linux64/lib/" )
+    else()
+	file( GLOB GUROBI_LIB_FILE ${GUROBI_HOME}/mac64/lib/libgurobi${GUROBI_VER_LIB}.* )
+	if( GUROBI_LIB_FILE )
+    	    message( "-- Gurobi library " ${GUROBI_LIB_FILE} " found in " ${GUROBI_HOME} "/mac64/lib/" )
+    	else()
+	    file( GLOB GUROBI_LIB_FILE ${GUROBI_HOME}/lib/libgurobi${GUROBI_VER_LIB}.* )
+	    if( GUROBI_LIB_FILE )
+    	    	message( "-- Gurobi library " ${GUROBI_LIB_FILE} " found in " ${GUROBI_HOME} "/lib/" )
+	    else()
+	        message( FATAL_ERROR "libgurobi" ${GUROBI_VER_LIB} ".* not found either in " ${GUROBI_HOME} "/linux64/lib/ or " ${GUROBI_HOME} "/mac64/lib/ or " ${GUROBI_HOME} "/lib, please check the file exists and provide the correct PATH or manually set Gurobi's version. CMake will exit." )
+	    endif()
+	endif()
+    endif()
+
+endif()
+
 FIND_PATH(GUROBI_INCLUDE_DIR
           NAMES "gurobi_c++.h" "gurobi_c.h"
-          PATHS /Library/gurobi651/mac64/include/ /usr/local/gurobi651/linux64/include/
+          PATHS /Library/gurobi651/mac64/include/ /usr/local/gurobi651/linux64/include/ ${GUROBI_HOME}/linux64/include/ ${GUROBI_HOME}/mac64/include/ ${GUROBI_HOME}/include/
           DOC "Gurobi include directory")

 FIND_LIBRARY(GUROBI_CPP_LIB
              NAMES gurobi_c++
-             PATHS /Library/gurobi651/mac64/lib/ /usr/local/gurobi651/linux64/lib/
+             PATHS /Library/gurobi651/mac64/lib/ /usr/local/gurobi651/linux64/lib/ ${GUROBI_HOME}/linux64/lib/ ${GUROBI_HOME}/mac64/lib/ ${GUROBI_HOME}/lib/
              DOC "Gurobi C++ Libraries")

 FIND_LIBRARY(GUROBI_LIB
-             NAMES gurobi65
-             PATHS /Library/gurobi651/mac64/lib/ /usr/local/gurobi651/linux64/lib/
+             NAMES "gurobi${GUROBI_VER_LIB}"
+             PATHS /Library/gurobi651/mac64/lib/ /usr/local/gurobi651/linux64/lib/ ${GUROBI_HOME}/linux64/lib/ ${GUROBI_HOME}/mac64/lib/ ${GUROBI_HOME}/lib/
              DOC "Gurobi C Libraries")

 set(GUROBI_LIBRARIES ${GUROBI_CPP_LIB} ${GUROBI_LIB})

 set(GUROBI_FOUND TRUE)
-


Update PythonExternal.cmake

Update PythonExternal.cmake

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -28,10 +28,11 @@

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})

-SET(DEFAULT_PYTHON_VERSION "3.7.9")
-IF(WIN32)
-  SET(DEFAULT_PYTHON_VERSION "3.8.7")
-ENDIF()
+SET(DEFAULT_PYTHON_VERSION "3.8.7")
+# TODO: check for Apple Silicon/arm64
+#IF(APPLE)
+#  SET(DEFAULT_PYTHON_VERSION "3.8.7")
+#ENDIF()

 set(USER_PYTHON_VERSION ${DEFAULT_PYTHON_VERSION} CACHE STRING "Branch name corresponding to Python version number")
 set_property(CACHE USER_PYTHON_VERSION PROPERTY STRINGS 3.6.7 3.7.9 3.8.7 3.9.1)


Add missing licence text

Add missing licence text

--- cmake/GtkUpdateIconCache.cmake
+++ cmake/GtkUpdateIconCache.cmake
@@ -1,11 +1,27 @@
 # Copyright 2015 Volker Krause <vkrause@kde.org>
 #
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file COPYING-CMAKE-SCRIPTS for details.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
 #
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
+# 1. Redistributions of source code must retain the copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 find_program(GTK_UPDATE_ICON_CACHE_EXECUTABLE NAMES gtk-update-icon-cache)


Add ROOT::<library> as alias to <library> if it doesn't exist

One common problem with roottest/rootbench when built outside of ROOT
is that target names from within the build become just a library name
when building externally. That is, using e.g. MathMore for linking
will get converted to just -lMathMore when building externally rather
than the full -lMathMore -lMathCore -lImt -lCore when building as part
of ROOT, which takes dependencies into account since MathMore is a
CMake target. However, roottest cannot always use ROOT::<library>
because when it's built as part of ROOT the target doesn't exist. It
only exists when using ROOT externally by calling find_package(ROOT).
This commit adds the alias library to allow using ROOT::<library> both
when building as part of ROOT and externally. That way, dependencies
are always taken into account when linking.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -757,6 +757,10 @@
   endif()

   if(PROJECT_NAME STREQUAL "ROOT")
+    if(NOT TARGET ROOT::${library})
+      add_library(ROOT::${library} ALIAS ${library})
+    endif()
+
     if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc)
       target_include_directories(${library}
         PRIVATE


ISSUE #278 - Test FindAWSSDK.cmake

ISSUE #278 - Test FindAWSSDK.cmake

--- cmake_modules/FindAWSSDK.cmake
+++ cmake_modules/FindAWSSDK.cmake
@@ -26,7 +26,6 @@
 	set(AWSSDK_ROOT $ENV{AWSSDK_ROOT})
 	message(STATUS "$AWSSDK_ROOT defined: ${AWSSDK_ROOT}")
 	find_path(AWSSDK_INCLUDE_DIR aws
-		PATHS
 		${AWSSDK_ROOT}/include
 		)
 	foreach(libName ${AWSSDK_LIB_NAMES})


added windows support in FindEigen2.cmake. now an environment variable EIGENDIR must point to where eigen is installed

--- external/cmake_modules/FindEigen2.cmake
+++ external/cmake_modules/FindEigen2.cmake
@@ -53,21 +53,23 @@

 else (EIGEN2_INCLUDE_DIR)

-find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
-     PATHS
-     ${INCLUDE_INSTALL_DIR}
-     ${KDE4_INCLUDE_DIR}
-     PATH_SUFFIXES eigen2
-   )
-
-if(EIGEN2_INCLUDE_DIR)
-  _eigen2_check_version()
-endif(EIGEN2_INCLUDE_DIR)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)
-
-mark_as_advanced(EIGEN2_INCLUDE_DIR)
+	find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
+	     PATHS
+	     ${INCLUDE_INSTALL_DIR}
+	     ${KDE4_INCLUDE_DIR}
+	     $ENV{EIGENDIR}/include
+	     $ENV{EIGEN2DIR}/include
+	     PATH_SUFFIXES eigen2
+	   )
+
+	if(EIGEN2_INCLUDE_DIR)
+	  _eigen2_check_version()
+	endif(EIGEN2_INCLUDE_DIR)
+
+	include(FindPackageHandleStandardArgs)
+	find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)
+
+	mark_as_advanced(EIGEN2_INCLUDE_DIR)

 endif(EIGEN2_INCLUDE_DIR)


COMP: FindDCMTK - Exclude -D from DCMTK_DEFINITIONS for easier re-use

Since target properties like COMPILE_DEFINITIONS
or INTERFACE_COMPILE_DEFINITIONS do not expect definition to include "-D",
this commit exclude it from definition list associated
with DCMTK_DEFINITIONS.

Change-Id: Ia59922d6efd9deda1c0e4afbfbd010f5f77935ea

--- Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
+++ Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
@@ -343,10 +343,10 @@
     DCMTK_HAVE_CONFIG_H_OPTIONAL
     )
   if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
-    set(DCMTK_DEFINITIONS "-DHAVE_CONFIG_H")
+    set(DCMTK_DEFINITIONS "HAVE_CONFIG_H")
   endif()
   if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL AND NOT DCMTK_FIND_PACKAGE_SKIP_ADD_DEFINITIONS)
-    add_definitions(${DCMTK_DEFINITIONS})
+    add_definitions(-D${DCMTK_DEFINITIONS})
   endif()
 endif()


First test for APPLE, since MacOS also qualifies as UNIX.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -225,11 +225,11 @@
 endif()

 set(_install_rpath)
-if(UNIX)
+if(APPLE)
+  set(_install_rpath "@loader_path/../lib")
+elseif(UNIX)
   # this work for libraries as well as executables
   set(_install_rpath "\$ORIGIN/../lib")
-elseif(APPLE)
-  set(_install_rpath "@loader_path/../lib")
 endif()

 set(ep_common_args


SVN_SILENT made messages (.desktop file)


Add detection of defined <LANG>_COMPILER_LAUNCHER vars

Since CMake 3.3 it is possible to use <LANG>_COMPILER_LAUNCHER target
property to define ccache. So we need to check those setting, too.

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -1811,7 +1811,8 @@
 	else()
 		set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE)
 	endif()
-	if (CMAKE_${_language}_COMPILER MATCHES "ccache")
+	get_target_property(launcher ${_target} ${_language}_COMPILER_LAUNCHER)
+	if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR launcher MATCHES "ccache")
 		if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros|pch_defines")
 			set (${_msgVar}
 				"ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"."


Updated jenkins cmake script

Updated jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -8,7 +8,7 @@
 set(CTEST_BUILD_OPTIONS "${JENKINS_BUILD_OPTIONS}")
 set(CTEST_BUILD_CONFIGURATION "${JENKINS_BUILD_CONFIGURATION}")

-set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "--xml=yes --xml-file=${CTEST_BINARY_DIRECTORY}/test_%p_memcheck.xml")
+set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "--xml=yes --xml-file=test_%p_memcheck.xml")

 set(CTEST_COVERAGE_CXX_FLAGS "-DCMAKE_CXX_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
 set(CTEST_COVERAGE_EXE_LD_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")


Bumping version to 1.1.1

Bumping version to 1.1.1

--- source/defines.h.cmake
+++ source/defines.h.cmake
@@ -27,7 +27,7 @@
  */

 #define APP_NAME "Logos Wallpaper Updater"
-#define APP_VERSION "1.1"
+#define APP_VERSION "1.1.1"

 #ifdef Q_WS_MAC
 #define MACOS_X 1


Redirect CDash submissions to CERN's CDash (#280)

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -2,7 +2,7 @@
 set(CTEST_NIGHTLY_START_TIME "00:00:00 CEST")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "lxwww53.gsi.de")
+set(CTEST_DROP_SITE "cdash.cern.ch")
 set(CTEST_DROP_LOCATION "/submit.php?project=Vc")

 set(CTEST_DROP_SITE_CDASH TRUE)


exclude the testcases from the coverage result

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -19,4 +19,4 @@
   )

 # No coverage for these files
-set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_")
+set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_" "/libs/tests" "/server/tests")