Implemented functionality of easy_add_test.

--- cmake/easytest.cmake
+++ cmake/easytest.cmake
@@ -6,6 +6,91 @@
 #
 # Written by Alexander Haase, alexander.haase@rwth-aachen.de
 #
+
+# The following keys will be searched in the tests main source file. Tests may
+# use additional keywords, but won't get extracted by default so hooks have to
+# be used to get their values.
+#
+set(EASYLIST_COMMON_KEYS
+	COMPILE # Flags for compiling the target.
+	PASS    # PASS_EXPRESSION for test target.
+	FAIL    # FAIL_EXPRESSION for test target.
+)
+
+
+# Default compile hook.
+#
+# This hook adds a new executable target for test configuration CONFIG. It may
+# be replaced to call a custom build script.
+#
+# Parameters:
+#   TARGET Binary target name.
+#   CONFIG Test configuration.
+#
+#   Additional arguments represent the source files for the executable to build.
+#
+macro (easytest_hook_compile TARGET CONFIG)
+	add_executable(${TARGET} ${ARGN})
+endmacro ()
+
+
+# Default post-compile hook.
+#
+# This hook sets additional parameters for the binary target depending on the
+# previously defined configuration in the main source file.
+#
+# Parameters:
+#   TARGET Binary target name.
+#   CONFIG Test configuration.
+#
+#   Additional arguments represent the source files for the executable to build.
+#
+macro (easytest_hook_post_compile TARGET CONFIG)
+	target_compile_definitions(${TARGET} PRIVATE ${EASYTEST_COMPILE})
+endmacro ()
+
+
+# Default test hook.
+#
+# This hook adds a new test target for test configuration CONFIG. It may be used
+# to define custom test invocations.
+#
+# Parameters:
+#   TARGET Test target name.
+#   BINARY Binary target name.
+#   CONFIG Test configuration.
+#
+#   Additional arguments represent the source files for the executable to build.
+#
+macro (easytest_hook_test TARGET BINARY CONFIG)
+	add_test(${TARGET} ${BINARY})
+endmacro ()
+
+
+# Default post-test hook.
+#
+# This hook sets the attributes for test TARGET. It may be used to set
+# additional arguments for the test.
+#
+# Parameters:
+#   TARGET Test target name.
+#   CONFIG Test configuration.
+#
+#   Additional arguments represent the source files for the executable to build.
+#
+macro (easytest_hook_post_test TARGET CONFIG)
+	if (EASYTEST_PASS)
+		set_tests_properties(${TARGET} PROPERTIES PASS_REGULAR_EXPRESSION
+		                     "${EASYTEST_PASS}")
+	endif ()
+
+	if (EASYTEST_FAIL)
+		set_tests_properties(${TARGET} PROPERTIES FAIL_REGULAR_EXPRESSION
+		                     "${EASYTEST_FAIL}")
+	endif ()
+endmacro ()
+
+

 # Get a keyword from FILE.
 #
@@ -18,7 +103,7 @@
 #   DEST Where to store matches.
 #   FILE Where to search.
 #
-function(easytest_get_key KEY DEST FILE)
+function (easytest_get_key KEY DEST FILE)
 	# Search for KEY in FILE and get all lines with KEY.
 	file(STRINGS ${FILE} TMP REGEX "${KEY}:")
 	if (TMP)
@@ -35,7 +120,44 @@
 		# Store the found matches in DEST (in parent scope).
 		set(${DEST} "${BUFFER}" PARENT_SCOPE)
 	endif ()
-endfunction()
+endfunction ()
+
+
+# Add a new test configuration.
+#
+# This function will add a new testcase for a source file with a given
+# configuration. Extra sources may be set as additional parameters, but only the
+# first source file will be evaluated for keys.
+#
+# Parameters:
+#   PREFIX      Test prefix.
+#   CONFIG      Test configuration.
+#   MAIN_SOURCE Main source file.
+#
+#   Additional parameters will be used as additional source files for
+#   compilation, but will not be evaluated.
+#
+function (easytest_add_test_config PREFIX CONFIG MAIN_SOURCE)
+	# Get individual config keys from main source file. Individual keys will
+	# override the global test key values.
+	foreach (KEY ${EASYLIST_COMMON_KEYS})
+		easytest_get_key(${KEY}-${CONFIG} EASYTEST_${KEY} ${MAIN_SOURCE})
+	endforeach ()
+
+	# Set the name of the targets to be used for test and binary.
+	set(EASYTEST_TEST_TARGET "${PREFIX}-${CONFIG}")
+	set(EASYTEST_BIN_TARGET "testbin-${EASYTEST_TEST_TARGET}")
+
+	# Call the hooks for compile and test creation.
+	easytest_hook_compile(${EASYTEST_BIN_TARGET} ${CONFIG} ${MAIN_SOURCE}
+	                      ${ARGN})
+	easytest_hook_post_compile(${EASYTEST_BIN_TARGET} ${CONFIG} ${MAIN_SOURCE}
+	                           ${ARGN})
+	easytest_hook_test(${EASYTEST_TEST_TARGET} ${EASYTEST_BIN_TARGET} ${CONFIG}
+	                   ${MAIN_SOURCE} ${ARGN})
+	easytest_hook_post_test(${EASYTEST_TEST_TARGET} ${CONFIG} ${MAIN_SOURCE}
+	                        ${ARGN})
+endfunction ()

 # Add a new test file.
@@ -72,14 +194,26 @@
 				string(REPLACE " " ";" LINE "${LINE}")
 				list(APPEND EASYTEST_CONFIGS ${LINE})
 			endforeach ()
-		endif ()

 		# If still no configs could be found, use the default configuration with
 		# no label.
-	endif ()
-
-
-	message("PREFIX: ${EASYTEST_PREFIX}")
-	message("SOURCES: ${EASYTEST_SOURCES}")
-	message("CONFIGS: ${EASYTEST_CONFIGS}")
+		else ()
+			set(EASYTEST_CONFIGS "CHECK")
+		endif ()
+	endif ()
+
+
+	# Search for main configuration keys in main source file. The found values
+	# may be overridden by individual config keys.
+	list(GET EASYTEST_SOURCES 0 MAIN_SOURCE)
+	foreach (KEY ${EASYLIST_COMMON_KEYS})
+		easytest_get_key(${KEY} EASYTEST_${KEY} ${MAIN_SOURCE})
+	endforeach ()
+
+
+	# Add a new test for each configuration.
+	foreach (CONFIG ${EASYTEST_CONFIGS})
+		easytest_add_test_config(${EASYTEST_PREFIX} ${CONFIG}
+		                         ${EASYTEST_SOURCES})
+	endforeach ()
 endfunction ()


Always touch variable controlling build of the module

This suppresses "unused variable" CMake warning when user explicilty disables
module unavailable in selected configuration

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -164,6 +164,9 @@
   set(HAVE_${__modname} OFF CACHE INTERNAL "Module ${__modname} can not be built in current configuration")
   set(OPENCV_MODULE_${__modname}_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Location of ${__modname} module sources")
   set(OPENCV_MODULES_DISABLED_FORCE "${OPENCV_MODULES_DISABLED_FORCE}" CACHE INTERNAL "List of OpenCV modules which can not be build in current configuration")
+  if(BUILD_${__modname})
+    # touch variable controlling build of the module to suppress "unused variable" CMake warning
+  endif()
   unset(__modname)
   return() # leave the current folder
 endmacro()


Export 3rdparty include directories

Export 3rdparty include directories

--- cmake/V4RGenConfig.cmake
+++ cmake/V4RGenConfig.cmake
@@ -60,7 +60,7 @@
 # --------------------------------------------------------------------------------------------
 #  Part 2/2: ${BIN_DIR}/unix-install/V4RConfig.cmake -> For use *with* "make install"
 # -------------------------------------------------------------------------------------------
-set(V4R_INCLUDE_DIRS_CONFIGCMAKE "\"\${V4R_INSTALL_PATH}/${V4R_INCLUDE_INSTALL_PATH}/v4r" "\${V4R_INSTALL_PATH}/${V4R_INCLUDE_INSTALL_PATH}\"")
+set(V4R_INCLUDE_DIRS_CONFIGCMAKE "\"\${V4R_INSTALL_PATH}/${V4R_3P_INCLUDE_INSTALL_PATH}" "\${V4R_INSTALL_PATH}/${V4R_INCLUDE_INSTALL_PATH}\"")

 #set(V4R2_INCLUDE_DIRS_CONFIGCMAKE "\"\"")
 set(V4R_3RDPARTY_LIB_DIRS_CONFIGCMAKE "\"\${V4R_INSTALL_PATH}/${V4R_3P_LIB_INSTALL_PATH}\"")


allow ALPAKA_CXX_STANDARD to propagate to nvcc with MSVC 1920 and above

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -448,7 +448,7 @@
                     )
                 endforeach()

-                if(NOT MSVC)
+                if(NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1920)
                     list(APPEND CUDA_NVCC_FLAGS -std=c++${ALPAKA_CXX_STANDARD})
                 endif()


Cmake: Convert backslashes for IVW_EXTERNAL_MODULES and IVW_EXTERNAL_PROJECTS.

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -100,10 +100,13 @@
 #--------------------------------------------------------------------
 # Add parameter for paths to external modules
 set(IVW_EXTERNAL_MODULES "" CACHE STRING "Semicolon (;) separated paths to directories containing external modules")
-
+# Convert to valid paths, i.e. exchange backslash to slash
+file(TO_CMAKE_PATH "${IVW_EXTERNAL_MODULES}" IVW_EXTERNAL_MODULES)
 #--------------------------------------------------------------------
 # Add parameter for paths to external projects
 set(IVW_EXTERNAL_PROJECTS "" CACHE STRING "Semicolon (;) separated paths to directories with apps. CMake add_subdirectory will be called for each path.")
+# Convert to valid paths, i.e. exchange backslash to slash
+file(TO_CMAKE_PATH "${IVW_EXTERNAL_PROJECTS}" IVW_EXTERNAL_PROJECTS)
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib CACHE PATH
    "Single Directory for all static libraries.")


cmake: Fix libgcc detection for GNU C

cmake: Fix libgcc detection for GNU C

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -326,8 +326,11 @@

 # libgcc/compiler-rt detection
 if (UNIX)
+  if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+      set(TARGET_LINE --target=${TRIPLE})
+  endif()
   execute_process(
-      COMMAND ${CMAKE_CXX_COMPILER} --target=${TRIPLE} --print-libgcc-file-name
+      COMMAND ${CMAKE_CXX_COMPILER} ${TARGET_LINE} --print-libgcc-file-name
       RESULT_VARIABLE CC_RT_RES
       OUTPUT_VARIABLE COMPILER_RT_FILE OUTPUT_STRIP_TRAILING_WHITESPACE)
   if (NOT ${CC_RT_RES} EQUAL 0)


Handles IDL 8.2 default location. Handling IDL 8.0, 8.1 more cleanly.

--- CMake/Modules/FindIDL.cmake
+++ CMake/Modules/FindIDL.cmake
@@ -63,18 +63,17 @@
 endif ()

-# find idl based on version numbers, if you want a specific one, set
-# it prior to running configure
+# find IDL based on version numbers, if you want a specific one, set it prior
+# to running configure
 if (NOT DEFINED IDL_FIND_VERSION)
-  set(_IDL_KNOWN_VERSIONS "82" "81" "80" "71" "706")
-# IDL 8.0 is in a different location than other versions on Windows (extra IDL directory in path)
+  set(_IDL_KNOWN_VERSIONS "82" "71" "706")
+  set(_IDL_KNOWN_VERSIONS_EXTRA_DIR "81" "80")
+  # IDL 8.0 and 8.1 is in a different location than other versions
   foreach (_IDL_COMPANY ${_IDL_KNOWN_COMPANIES})
-    list(APPEND
-         _IDL_SEARCH_DIRS
-         "${_IDL_PROGRAM_FILES_DIR}/${_IDL_COMPANY}/${_IDL_NAME}/${_IDL_NAME}80")
-    list(APPEND
-         _IDL_SEARCH_DIRS
-         "${_IDL_PROGRAM_FILES_DIR}/${_IDL_COMPANY}/${_IDL_NAME}/${_IDL_NAME}81")
+    foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS_EXTRA_DIR})
+      list(APPEND _IDL_SEARCH_DIRS
+           "${_IDL_PROGRAM_FILES_DIR}/${_IDL_COMPANY}/${_IDL_NAME}/${_IDL_NAME}${_IDL_KNOWN_VERSION}")
+    endforeach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
     foreach (_IDL_KNOWN_VERSION ${_IDL_KNOWN_VERSIONS})
       list(APPEND _IDL_SEARCH_DIRS
            "${_IDL_PROGRAM_FILES_DIR}/${_IDL_COMPANY}/${_IDL_NAME}${_IDL_KNOWN_VERSION}")
@@ -82,10 +81,10 @@
   endforeach (_IDL_COMPANY ${_IDL_KNOWN_COMPANIES})
 endif ()

+# override search path if IDL_DIR environment variable is set
 if (NOT "$ENV{IDL_DIR}" STREQUAL "")
   set(_IDL_SEARCH_DIRS "$ENV{IDL_DIR}")
 endif ()
-

 find_path(IDL_INCLUDE_DIR
   idl_export.h
@@ -93,7 +92,6 @@
   HINTS ${IDL_ROOT}
   PATH_SUFFIXES external/include
 )
-

 set(IDL_BIN64_PATH /bin/bin${_IDL_OS}.x86_64)
   if (APPLE)
@@ -127,6 +125,7 @@
     message(STATUS "IDL library: ${IDL_LIBRARY}")
     message(STATUS "IDL include: ${IDL_INCLUDE_DIR}")
   endif ()
+
   set(HAVE_IDL 1 CACHE BOOL "Whether have IDL")
   get_filename_component(IDL_LIBRARY_DIR ${IDL_LIBRARY} PATH)
   get_filename_component(IDL_BIN_DIR ${IDL_LIBRARY_DIR} NAME)


Correcting typos in test name

Correcting typos in test name

--- CMake/mitkPackageTest.cmake
+++ CMake/mitkPackageTest.cmake
@@ -8,14 +8,14 @@
       add_test(NAME mitkPackageTest CONFIGURATIONS Release
                COMMAND ${CMAKE_COMMANDS} --build ${MITK_BINARY_DIR} --config Release --target package)

-      set_tests_properties( mitkPackageest PROPERTIES
+      set_tests_properties( mitkPackageTest PROPERTIES
                           TIMEOUT 1800
                           LABELS "MITK")
     elseif(CMAKE_BUILD_TYPE)
-      add_test( NAME mitkPackageTargetTest
+      add_test( NAME mitkPackageTest
                 COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target package)

-      set_tests_properties( mitkPackageTargetTest PROPERTIES
+      set_tests_properties( mitkPackageTest PROPERTIES
                           TIMEOUT 1800
                           LABELS "MITK")
     endif()


COMP: activating CUDA flag for OpenCV. if no CUDA device is installed it should not matter. opencv gpu functions will raise an exception at runtime if executed without checking for CUDA device

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -48,7 +48,7 @@
         -DBUILD_TESTS:BOOL=OFF
         -DBUILD_EXAMPLES:BOOL=OFF
         -DBUILD_DOXYGEN_DOCS:BOOL=OFF
-        -DWITH_CUDA:BOOL=OFF
+        -DWITH_CUDA:BOOL=ON
         ${additional_cmake_args}
       DEPENDS ${proj_DEPENDENCIES}
     )


Update Coverage.cmake

Update Coverage.cmake

--- CMakeScripts/Coverage.cmake
+++ CMakeScripts/Coverage.cmake
@@ -9,5 +9,6 @@
         COMMAND lcov --capture --directory ${CMAKE_BINARY_DIR} --output-file coverage.info
         COMMAND lcov -r coverage.info '/usr/include/*' -o coverage.info
         COMMAND lcov -r coverage.info 'build/catch/*' -o coverage.info
+        COMMAND lcov -r coverage.info 'external/*' -o coverage.info
         COMMAND genhtml coverage.info --output-directory coverageOutput
         COMMAND xdg-open coverageOutput/index.html)


Name change

Name change

--- src/cmake_install.cmake
+++ src/cmake_install.cmake
@@ -1,4 +1,4 @@
-# Install script for directory: /home/jess/Projects/CapSol/src
+# Install script for directory: /home/jess/Projects/CapSolv/src

 # Set the install prefix
 IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
@@ -38,7 +38,7 @@
   SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
 ENDIF(CMAKE_INSTALL_COMPONENT)

-FILE(WRITE "/home/jess/Projects/CapSol/src/${CMAKE_INSTALL_MANIFEST}" "")
+FILE(WRITE "/home/jess/Projects/CapSolv/src/${CMAKE_INSTALL_MANIFEST}" "")
 FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
-  FILE(APPEND "/home/jess/Projects/CapSol/src/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
+  FILE(APPEND "/home/jess/Projects/CapSolv/src/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
 ENDFOREACH(file)


fixed cmake to allow make install to work directly;

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -38,15 +38,15 @@
 target_link_libraries(runMTF mtf ${MTF_LIBS})
 install(TARGETS runMTF RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT exe)
 add_custom_target(exe DEPENDS runMTF)
-if(NOT WIN32)
-	add_custom_target(install_exe
-	  ${CMAKE_COMMAND}
-	  -D "CMAKE_INSTALL_COMPONENT=exe"
-	  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-	   DEPENDS runMTF
-	  )
-	add_custom_target(mtfe DEPENDS runMTF install_exe)
-endif()
+# if(NOT WIN32)
+	# add_custom_target(install_exe
+	  # ${CMAKE_COMMAND}
+	  # -D "CMAKE_INSTALL_COMPONENT=exe"
+	  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+	   # DEPENDS runMTF
+	  # )
+	# add_custom_target(mtfe DEPENDS runMTF install_exe)
+# endif()

 add_executable(trackUAVTrajectory Examples/cpp/trackUAVTrajectory.cc)
@@ -56,15 +56,15 @@
 target_link_libraries(trackUAVTrajectory mtf ${MTF_LIBS})
 install(TARGETS trackUAVTrajectory RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT uav)
 add_custom_target(uav DEPENDS trackUAVTrajectory)
-if(NOT WIN32)
-	add_custom_target(install_uav
-	  ${CMAKE_COMMAND}
-	  -D "CMAKE_INSTALL_COMPONENT=uav"
-	  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-	   DEPENDS trackUAVTrajectory
-	  )
-	add_custom_target(mtfu DEPENDS trackUAVTrajectory install_uav)
-endif()
+# if(NOT WIN32)
+	# add_custom_target(install_uav
+	  # ${CMAKE_COMMAND}
+	  # -D "CMAKE_INSTALL_COMPONENT=uav"
+	  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+	   # DEPENDS trackUAVTrajectory
+	  # )
+	# add_custom_target(mtfu DEPENDS trackUAVTrajectory install_uav)
+# endif()

 if(FEAT_ENABLED)
 	add_executable(trackMarkers Examples/cpp/trackMarkers.cc)
@@ -74,17 +74,17 @@
 	target_link_libraries(trackMarkers mtf ${MTF_LIBS})
 	install(TARGETS trackMarkers RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT qr)
 	add_custom_target(qr DEPENDS trackMarkers)
-	if(NOT WIN32)
-		add_custom_target(install_qr
-		  ${CMAKE_COMMAND}
-		  -D "CMAKE_INSTALL_COMPONENT=qr"
-		  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-		   DEPENDS trackMarkers
-		  )
-		add_custom_target(mtfq DEPENDS trackMarkers install_qr)
-		set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_qr)
-		set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfq)
-	endif()
+	# if(NOT WIN32)
+		# add_custom_target(install_qr
+		  # ${CMAKE_COMMAND}
+		  # -D "CMAKE_INSTALL_COMPONENT=qr"
+		  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+		   # DEPENDS trackMarkers
+		  # )
+		# add_custom_target(mtfq DEPENDS trackMarkers install_qr)
+		# set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_qr)
+		# set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfq)
+	# endif()
 	set(EX_TARGET_NAMES ${EX_TARGET_NAMES} trackMarkers)
 endif()

@@ -95,15 +95,15 @@
 target_link_libraries(extractPatch mtf ${MTF_LIBS})
 install(TARGETS extractPatch RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT patch)
 add_custom_target(patch DEPENDS extractPatch)
-if(NOT WIN32)
-	add_custom_target(install_patch
-	  ${CMAKE_COMMAND}
-	  -D "CMAKE_INSTALL_COMPONENT=patch"
-	  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-	   DEPENDS extractPatch
-	  )
-	add_custom_target(mtfpa DEPENDS extractPatch install_patch)
-endif()
+# if(NOT WIN32)
+	# add_custom_target(install_patch
+	  # ${CMAKE_COMMAND}
+	  # -D "CMAKE_INSTALL_COMPONENT=patch"
+	  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+	   # DEPENDS extractPatch
+	  # )
+	# add_custom_target(mtfpa DEPENDS extractPatch install_patch)
+# endif()

 add_executable(generateSyntheticSeq Examples/cpp/generateSyntheticSeq.cc)
 target_compile_definitions(generateSyntheticSeq PUBLIC ${MTF_DEFINITIONS})
@@ -112,15 +112,15 @@
 target_link_libraries(generateSyntheticSeq mtf ${MTF_LIBS})
 install(TARGETS generateSyntheticSeq RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT syn)
 add_custom_target(syn DEPENDS generateSyntheticSeq)
-if(NOT WIN32)
-	add_custom_target(install_syn
-	  ${CMAKE_COMMAND}
-	  -D "CMAKE_INSTALL_COMPONENT=syn"
-	  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-	   DEPENDS generateSyntheticSeq
-	  )
-	add_custom_target(mtfs DEPENDS generateSyntheticSeq install_syn)
-endif()
+# if(NOT WIN32)
+	# add_custom_target(install_syn
+	  # ${CMAKE_COMMAND}
+	  # -D "CMAKE_INSTALL_COMPONENT=syn"
+	  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+	   # DEPENDS generateSyntheticSeq
+	  # )
+	# add_custom_target(mtfs DEPENDS generateSyntheticSeq install_syn)
+# endif()

 add_executable(createMosaic Examples/cpp/createMosaic.cc)
 target_compile_definitions(createMosaic PUBLIC ${MTF_DEFINITIONS})
@@ -129,15 +129,15 @@
 target_link_libraries(createMosaic mtf ${MTF_LIBS})
 install(TARGETS createMosaic RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT mos)
 add_custom_target(mos DEPENDS createMosaic)
-if(NOT WIN32)
-	add_custom_target(install_mos
-	  ${CMAKE_COMMAND}
-	  -D "CMAKE_INSTALL_COMPONENT=mos"
-	  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-	   DEPENDS createMosaic
-	  )
-	add_custom_target(mtfm DEPENDS createMosaic install_mos)
-endif()
+# if(NOT WIN32)
+	# add_custom_target(install_mos
+	  # ${CMAKE_COMMAND}
+	  # -D "CMAKE_INSTALL_COMPONENT=mos"
+	  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+	   # DEPENDS createMosaic
+	  # )
+	# add_custom_target(mtfm DEPENDS createMosaic install_mos)
+# endif()

 add_executable(registerSeq Examples/cpp/registerSeq.cc)
 target_compile_definitions(registerSeq PUBLIC ${MTF_DEFINITIONS})
@@ -146,15 +146,15 @@
 target_link_libraries(registerSeq mtf ${MTF_LIBS})
 install(TARGETS registerSeq RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT reg)
 add_custom_target(reg DEPENDS registerSeq)
-if(NOT WIN32)
-	add_custom_target(install_reg
-	  ${CMAKE_COMMAND}
-	  -D "CMAKE_INSTALL_COMPONENT=reg"
-	  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-	   DEPENDS registerSeq
-	  )
-	add_custom_target(mtfr DEPENDS registerSeq install_reg)
-endif()
+# if(NOT WIN32)
+	# add_custom_target(install_reg
+	  # ${CMAKE_COMMAND}
+	  # -D "CMAKE_INSTALL_COMPONENT=reg"
+	  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+	   # DEPENDS registerSeq
+	  # )
+	# add_custom_target(mtfr DEPENDS registerSeq install_reg)
+# endif()

 if(WITH_PY)
 	find_package(PythonLibs ${PY_VER})
@@ -174,17 +174,17 @@
 			target_link_libraries(pyMTF mtf ${MTF_LIBS} ${PYTHON_LIBRARIES} ${PYTHON_LIBS})
 			install(TARGETS pyMTF LIBRARY DESTINATION ${MTF_PY_INSTALL_DIR} COMPONENT py)
 			add_custom_target(py DEPENDS pyMTF)
-			if(NOT WIN32)
-				add_custom_target(install_py
-				  ${CMAKE_COMMAND}
-				  -D "CMAKE_INSTALL_COMPONENT=py"
-				  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-				   DEPENDS pyMTF
-				  )
-				  add_custom_target(mtfp DEPENDS pyMTF install_py)
-				  set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_py)
-				  set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfp)
-			endif()
+			# if(NOT WIN32)
+				# add_custom_target(install_py
+				  # ${CMAKE_COMMAND}
+				  # -D "CMAKE_INSTALL_COMPONENT=py"
+				  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+				   # DEPENDS pyMTF
+				  # )
+				  # add_custom_target(mtfp DEPENDS pyMTF install_py)
+				  # set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_py)
+				  # set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfp)
+			# endif()
 			set(EX_TARGET_NAMES ${EX_TARGET_NAMES} pyMTF)

@@ -202,17 +202,17 @@
 			target_link_libraries(pyMTF2 mtf ${MTF_LIBS} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${PYTHON_LIBS})
 			install(TARGETS pyMTF2 LIBRARY DESTINATION ${MTF_PY_INSTALL_DIR} COMPONENT py2)
 			add_custom_target(py2 DEPENDS pyMTF2)
-			if(NOT WIN32)
-				add_custom_target(install_py2
-				  ${CMAKE_COMMAND}
-				  -D "CMAKE_INSTALL_COMPONENT=py2"
-				  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-				   DEPENDS pyMTF2
-				  )
-				  add_custom_target(mtfp2 DEPENDS pyMTF2 install_py2)
-				  set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_py2)
-				  set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfp2)
-			endif()
+			# if(NOT WIN32)
+				# add_custom_target(install_py2
+				  # ${CMAKE_COMMAND}
+				  # -D "CMAKE_INSTALL_COMPONENT=py2"
+				  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+				   # DEPENDS pyMTF2
+				  # )
+				  # add_custom_target(mtfp2 DEPENDS pyMTF2 install_py2)
+				  # set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_py2)
+				  # set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfp2)
+			# endif()
 			set(EX_TARGET_NAMES ${EX_TARGET_NAMES} pyMTF2)
 		# else()
 			# message(STATUS "Incompatible version of Python library found so pyMTF is disabled: " ${PYTHONLIBS_VERSION_STRING})
@@ -245,17 +245,17 @@
 		LIBRARY DESTINATION ${MTF_MEX_INSTALL_DIR}
 		COMPONENT mex)
 		add_custom_target(mex DEPENDS mexMTF)
-		if(NOT WIN32)
-			add_custom_target(install_mex
-			  ${CMAKE_COMMAND}
-			  -D "CMAKE_INSTALL_COMPONENT=mex"
-			  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-			   DEPENDS mexMTF
-			  )
-			add_custom_target(mtfx DEPENDS mexMTF install_mex)
-			set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_mex)
-			set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfx)
-		endif()
+		# if(NOT WIN32)
+			# add_custom_target(install_mex
+			  # ${CMAKE_COMMAND}
+			  # -D "CMAKE_INSTALL_COMPONENT=mex"
+			  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+			   # DEPENDS mexMTF
+			  # )
+			# add_custom_target(mtfx DEPENDS mexMTF install_mex)
+			# set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_mex)
+			# set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfx)
+		# endif()
 		set(EX_TARGET_NAMES ${EX_TARGET_NAMES} mexMTF)

 		find_package(Boost REQUIRED COMPONENTS thread)
@@ -270,17 +270,17 @@
 			LIBRARY DESTINATION ${MTF_MEX_INSTALL_DIR}
 			COMPONENT mex2)
 			add_custom_target(mex2 DEPENDS mexMTF2)
-			if(NOT WIN32)
-				add_custom_target(install_mex2
-				  ${CMAKE_COMMAND}
-				  -D "CMAKE_INSTALL_COMPONENT=mex2"
-				  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-				   DEPENDS mexMTF2
-				  )
-				add_custom_target(mtfx2 DEPENDS mexMTF2 install_mex2)
-				set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_mex2)
-				set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfx2)
-			endif()
+			# if(NOT WIN32)
+				# add_custom_target(install_mex2
+				  # ${CMAKE_COMMAND}
+				  # -D "CMAKE_INSTALL_COMPONENT=mex2"
+				  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+				   # DEPENDS mexMTF2
+				  # )
+				# add_custom_target(mtfx2 DEPENDS mexMTF2 install_mex2)
+				# set(EX_INSTALL_TARGET_NAMES ${EX_INSTALL_TARGET_NAMES} install_mex2)
+				# set(EX_COMBINED_TARGET_NAMES ${EX_COMBINED_TARGET_NAMES} mtfx2)
+			# endif()
 			set(EX_TARGET_NAMES ${EX_TARGET_NAMES} mexMTF2)
 		else(Boost_FOUND)
 			message(STATUS "Boost thread module not found")
@@ -311,17 +311,19 @@
 target_link_libraries(diagnoseMTF mtf_diag mtf ${MTF_LIBS})
 install(TARGETS diagnoseMTF RUNTIME DESTINATION ${MTF_EXEC_INSTALL_DIR} COMPONENT diag)
 add_custom_target(diag DEPENDS diagnoseMTF)
-if(NOT WIN32)
-	add_custom_target(install_diag
-	  ${CMAKE_COMMAND}
-	  -D "CMAKE_INSTALL_COMPONENT=diag"
-	  -P "${MTF_BINARY_DIR}/cmake_install.cmake"
-	   DEPENDS diagnoseMTF
-	  )
-	add_custom_target(mtft DEPENDS diagnoseMTF mtf_diag install_diag install_diag_lib)
-endif()
+# if(NOT WIN32)
+	# add_custom_target(install_diag
+	  # ${CMAKE_COMMAND}
+	  # -D "CMAKE_INSTALL_COMPONENT=diag"
+	  # -P "${MTF_BINARY_DIR}/cmake_install.cmake"
+	   # DEPENDS diagnoseMTF
+	  # )
+	# add_custom_target(mtft DEPENDS diagnoseMTF mtf_diag install_diag install_diag_lib)
+# endif()
+
 # add_custom_target(all DEPENDS ${EX_TARGET_NAMES})
-if(NOT WIN32)
-	add_custom_target(install_all DEPENDS ${EX_INSTALL_TARGET_NAMES})
-	add_custom_target(mtfall DEPENDS ${EX_COMBINED_TARGET_NAMES})
-endif()
+
+# if(NOT WIN32)
+	# add_custom_target(install_all DEPENDS ${EX_INSTALL_TARGET_NAMES})
+	# add_custom_target(mtfall DEPENDS ${EX_COMBINED_TARGET_NAMES})
+# endif()


mistral: Fix include path in GUI cmake, too

Signed-off-by: gatecat <c690b4516f836771c8bd4e23cd8f1cebc83093a6@ds0.me>

--- gui/mistral/family.cmake
+++ gui/mistral/family.cmake
@@ -1 +1 @@
-target_include_directories(gui_mistral PRIVATE ${MISTRAL_ROOT}/lib)
+target_include_directories(gui_mistral PRIVATE ${MISTRAL_ROOT}/libmistral)


Split off 8.2.56

Split off 8.2.56

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 55 )
+set ( HPCC_POINT 57 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.88

Split off 7.12.88

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

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


Community Edition 7.4.0-rc3 Release Candidate 3

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

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


Split off 8.8.20

Split off 8.8.20

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

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


Update .pc file.

Update .pc file.

--- SCD.pc.cmake
+++ SCD.pc.cmake
@@ -8,6 +8,6 @@
 Name: ${PROJECT_NAME}
 Description: Library for collision detection computation
 Version: 1.0
-Libs: ${${PROJECT_NAME}_LDFLAGS} ${LIBINCL_KW}${LIB_NAME}${LIB_EXT}
+Libs: ${LIBDIR_KW}${install_pkg_libdir} ${LIBINCL_KW}${LIB_NAME}${LIB_EXT}
 Cflags: -I${install_pkg_include_dir}  ${${PROJECT_NAME}_CFLAGS} ${WITH_OPENGL_CFLAGS}


Protect rosidl_target_interfaces from using NOTFOUND in include_directories (#679)

Signed-off-by: Jose Luis Rivero <4718c3fb94836e2654e01497a98fab353726b9c0@osrfoundation.org>

--- rosidl_cmake/cmake/rosidl_target_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_target_interfaces.cmake
@@ -52,6 +52,8 @@

   add_dependencies(${target} ${interface_target})
   get_target_property(include_directories ${typesupport_target} INTERFACE_INCLUDE_DIRECTORIES)
-  target_include_directories(${target} PUBLIC ${include_directories})
+  if(${include_directories})
+    target_include_directories(${target} PUBLIC ${include_directories})
+  endif()
   target_link_libraries(${target} ${typesupport_target})
 endfunction()


dont deactivate examples on msvc always

dont deactivate examples on msvc always

--- CMake/External_OTB.cmake
+++ CMake/External_OTB.cmake
@@ -7,7 +7,7 @@
 set(${proj}_DEPENDENCIES)
 set(${proj}_ADDITIONAL_CACHE)

-set(BUILD_EXAMPLES ON)
+#set(BUILD_EXAMPLES ON)

 if(ENABLE_OTB_LARGE_INPUTS)
   set(OTB_SB_LARGEINPUT_CONFIG
@@ -131,7 +131,7 @@

 set(OTB_SB_JPEG_CONFIG)
 if(MSVC)
-  set(BUILD_EXAMPLES OFF)
+ # set(BUILD_EXAMPLES OFF)
   set(OTB_SB_OPENCV_CONFIG)
   set(OTB_SB_JPEG_CONFIG -DJPEG_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libjpeg.lib)
 endif()


added more wrapping cmake flags to itk wrapping

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -27,8 +27,16 @@
          -DITK_USE_REVIEW:BOOL=ON
          -DCableSwig_DIR:PATH=${CableSwig_DIR}
          -DWRAP_ITK_JAVA:BOOL=OFF
-         -DWRAP_ITK_TCL:BOOL=OFFF
+         -DWRAP_ITK_TCL:BOOL=OFF
          -DWRAP_unsigned_char:BOOL=ON
+         -DWRAP_double:BOOL=ON
+         -DWRAP_rgb_unsigned_char:BOOL=ON
+         -DWRAP_rgba_unsigned_char:BOOL=ON
+         -DWRAP_signed_char:BOOL=ON
+         -DWRAP_signed_long:BOOL=ON
+         -DWRAP_signed_short:BOOL=ON
+         -DWRAP_short:BOOL=ON
+         -DWRAP_unsigned_long:BOOL=ON
         )
   endif()


removed quotes from compile definitions

removed quotes from compile definitions

--- share/hugh/cmake/CMakeAddons_SetupVariables.cmake
+++ share/hugh/cmake/CMakeAddons_SetupVariables.cmake
@@ -34,7 +34,7 @@
   set(Boost_USE_MULTITHREAD     ON)

   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-  # add_definitions("-DBOOST_ALL_DYN_LINK")
+  # add_definitions(-DBOOST_ALL_DYN_LINK)

   find_package(Boost ${BOOST_MINIMUM_VERSION})
   if(Boost_FOUND)
@@ -51,7 +51,7 @@
   set(Boost_USE_MULTITHREAD     ON)

   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-  add_definitions("-DBOOST_ALL_DYN_LINK")
+  add_definitions(-DBOOST_ALL_DYN_LINK)
 endif()

 # GL[I|M]
@@ -70,22 +70,23 @@
 if(DEFINED ENV{GLM_ROOT_DIR})
   set(GLM_ROOT_DIR $ENV{GLM_ROOT_DIR})
 endif()
+
 # GLM
-# add_definitions("-DGLM_FORCE_CXX11")
-# add_definitions("-DGLM_FORCE_EXPLICIT_CTOR")
-add_definitions("-DGLM_FORCE_INLINE")
-# add_definitions("-DGLM_FORCE_MESSAGES")
-add_definitions("-DGLM_FORCE_RADIANS")
-add_definitions("-DGLM_FORCE_SWIZZLE")
-# add_definitions("-DGLM_FORCE_SIZE_FUNC")
-# add_definitions("-DGLM_FORCE_SIZE_T_LENGTH")
-# add_definitions("-DGLM_META_PROG_HELPERS")
-# add_definitions("-DGLM_PRECISION_HIGHP_FLOAT")
-# add_definitions("-DGLM_PRECISION_HIGHP_INT")
+# add_definitions(-DGLM_FORCE_CXX11)
+# add_definitions(-DGLM_FORCE_EXPLICIT_CTOR)
+add_definitions(-DGLM_FORCE_INLINE)
+# add_definitions(-DGLM_FORCE_MESSAGES)
+add_definitions(-DGLM_FORCE_RADIANS)
+add_definitions(-DGLM_FORCE_SWIZZLE)
+# add_definitions(-DGLM_FORCE_SIZE_FUNC)
+# add_definitions(-DGLM_FORCE_SIZE_T_LENGTH)
+# add_definitions(-DGLM_META_PROG_HELPERS)
+# add_definitions(-DGLM_PRECISION_HIGHP_FLOAT)
+# add_definitions(-DGLM_PRECISION_HIGHP_INT)

 if(HUGH_TRACE_ALL OR ${PROJECT_NAME}_TRACE_ALL)
   if(VERBOSE)
     message(STATUS "Enabling run-time tracing for complete project!")
   endif()
-  add_definitions("-DHUGH_ALL_TRACE")
+  add_definitions(-DHUGH_ALL_TRACE)
 endif()


Also provide legacy include

Also provide legacy include

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

--- deal.II/cmake/macros/macro_deal_ii_add_test.cmake
+++ deal.II/cmake/macros/macro_deal_ii_add_test.cmake
@@ -66,6 +66,7 @@
         INCLUDE_DIRECTORIES
           "${CMAKE_BINARY_DIR}/include"
           "${CMAKE_SOURCE_DIR}/include"
+          "${CMAKE_SOURCE_DIR}/include/deal.II/"
         )
       SET_PROPERTY(TARGET ${_test} APPEND PROPERTY
         COMPILE_DEFINITIONS


FIX (#3336): reactivate test now that it seems to pass

--- Modules/SceneSerialization/Testing/files.cmake
+++ Modules/SceneSerialization/Testing/files.cmake
@@ -1,6 +1,6 @@

 SET(MODULE_TESTS
   mitkPropertySerializationTest.cpp
-#  mitkSceneIOTest.cpp
+  mitkSceneIOTest.cpp
 )


psq_check_and_report_tool_version does what we need, don't repeat it

--- FindIncludeWhatYouUse.cmake
+++ FindIncludeWhatYouUse.cmake
@@ -66,13 +66,6 @@
                                        IWYU_EXECUTABLE
                                        IWYU_VERSION)

-    psq_print_if_not_quiet (IncludeWhatYouUse
-                            MSG "IncludeWhatYouUse version"
-                                "${IWYU_VERSION} found at"
-                                "${IWYU_EXECUTABLE}"
-                            DEPENDS IWYU_VERSION
-                                    IWYU_EXECUTABLE)
-
     set (IncludeWhatYouUse_FOUND ${IncludeWhatYouUse_FOUND} PARENT_SCOPE)

 endfunction (_find_iwyu)


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -389,6 +389,16 @@
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()

+            # Find also EGL library, if on ES
+            if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES)
+                find_package(EGL)
+                if(EGL_FOUND)
+                    list(APPEND _MAGNUM_${_COMPONENT}_LIBRARIES ${EGL_LIBRARY})
+                else()
+                    unset(MAGNUM_${_COMPONENT}_LIBRARY)
+                endif()
+            endif()
+
         # (Windowless) NaCl application dependencies
         elseif(${component} STREQUAL NaClApplication OR ${component} STREQUAL WindowlessNaClApplication)
             set(_MAGNUM_${_COMPONENT}_LIBRARIES ppapi_cpp ppapi)


Set binary search directory based on OpenCV_DIR

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -87,7 +87,7 @@

   if(OpenCV_DIR)
     if(WIN32)
-      list(APPEND _dir_candidates "${OpenCV_LIB_PATH}/../bin")
+      list(APPEND _dir_candidates "${OpenCV_DIR}/bin")
     endif()
   endif()


COMP: Update LearningBase dependencies

COMP: Update LearningBase dependencies

--- Modules/Learning/LearningBase/otb-module.cmake
+++ Modules/Learning/LearningBase/otb-module.cmake
@@ -5,6 +5,8 @@
   DEPENDS
     OTBCommon
     OTBITK
+    OTBImageIO
+    OTBImageBase

   OPTIONAL_DEPENDS
     OTBShark


fixed: make cg finding more convenient (thanks to Johannes Zarl for the patch)

git-svn-id: 9c86407f91444b2cc93bb44d37d96a685973386f@2404 4683daeb-ad0f-0410-a623-93161e962ae5

--- Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
+++ Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
@@ -6,20 +6,34 @@
 #  CG_FOUND, If false, do not try to use Cg.
 # also defined, but not for general use are
 #  CG_LIBRARY, where to find the JPEG library.
+##
+# The following variables can be used to give CMake a hint where to find Cg:
+# CG_ROOT
+##

-FIND_PATH(CG_INCLUDE_DIR Cg/cg.h)
+FIND_PATH(CG_INCLUDE_DIR Cg/cg.h
+  PATHS ${CG_ROOT} ENV CG_ROOT
+  PATH_SUFFIXES include)

-SET(CG_NAMES_RELEASE ${CG_NAMES_RELEASE} libCg)
-FIND_LIBRARY(CG_LIBRARY_RELEASE NAMES ${CG_NAMES_RELEASE} )
+SET(CG_NAMES_RELEASE ${CG_NAMES_RELEASE} Cg)
+FIND_LIBRARY(CG_LIBRARY_RELEASE NAMES ${CG_NAMES_RELEASE}
+  PATHS ${CG_ROOT} ENV CG_ROOT
+  PATH_SUFFIXES lib64 lib)

-SET(CG_NAMES_DEBUG ${CG_NAMES_DEBUG} libCgd)
-FIND_LIBRARY(CG_LIBRARY_DEBUG NAMES ${CG_NAMES_DEBUG} )
+SET(CG_NAMES_DEBUG ${CG_NAMES_DEBUG} Cgd)
+FIND_LIBRARY(CG_LIBRARY_DEBUG NAMES ${CG_NAMES_DEBUG}
+  PATHS ${CG_ROOT} ENV CG_ROOT
+  PATH_SUFFIXES lib64 lib)

-SET(CG_GL_NAMES_RELEASE ${CG_GL_NAMES_RELEASE} libCgGL)
-FIND_LIBRARY(CG_GL_LIBRARY_RELEASE NAMES ${CG_GL_NAMES_RELEASE} )
+SET(CG_GL_NAMES_RELEASE ${CG_GL_NAMES_RELEASE} CgGL)
+FIND_LIBRARY(CG_GL_LIBRARY_RELEASE NAMES ${CG_GL_NAMES_RELEASE}
+  PATHS ${CG_ROOT} ENV CG_ROOT
+  PATH_SUFFIXES lib64 lib)

-SET(CG_GL_NAMES_DEBUG ${CG_GL_NAMES_DEBUG} libCgGLd)
-FIND_LIBRARY(CG_GL_LIBRARY_DEBUG NAMES ${CG_GL_NAMES_DEBUG} )
+SET(CG_GL_NAMES_DEBUG ${CG_GL_NAMES_DEBUG} CgGLd)
+FIND_LIBRARY(CG_GL_LIBRARY_DEBUG NAMES ${CG_GL_NAMES_DEBUG}
+  PATHS ${CG_ROOT} ENV CG_ROOT
+  PATH_SUFFIXES lib64 lib)

 IF(CG_LIBRARY_DEBUG AND CG_GL_LIBRARY_DEBUG)
   SET(CG_LIBRARIES_FOUND TRUE)


Fix CGAL config script being non-relocatable

--- deps/CGAL/CGAL.cmake
+++ deps/CGAL/CGAL.cmake
@@ -6,4 +6,10 @@
     # URL      https://github.com/CGAL/cgal/archive/releases/CGAL-5.0.zip
     # URL_HASH SHA256=bd9327be903ab7ee379a8a7a0609eba0962f5078d2497cf8e13e8e1598584154
     DEPENDS dep_boost dep_GMP dep_MPFR
+)
+
+ExternalProject_Add_Step(dep_CGAL dep_CGAL_relocation_fix
+    DEPENDEES install
+    COMMAND ${CMAKE_COMMAND} -E remove CGALConfig-installation-dirs.cmake
+    WORKING_DIRECTORY "${DESTDIR}/usr/local/lib/cmake/CGAL"
 )


Fix MPFR being built as shared library

Fix MPFR being built as shared library

--- deps/MPFR/MPFR.cmake
+++ deps/MPFR/MPFR.cmake
@@ -21,7 +21,7 @@
     ExternalProject_Add(dep_MPFR
         URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2  # mirrors are allowed
         BUILD_IN_SOURCE ON
-        CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --with-gmp=${DESTDIR}/usr/local --with-pic
+        CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local --with-pic
         BUILD_COMMAND make -j
         INSTALL_COMMAND make install
         DEPENDS dep_GMP


r9220/sofa : fixed SofaPardisoSolver.cmake dependencies

Former-commit-id: 18ea5ba3c269d45113b33117b8ebb0c74da1dbdb

--- modules/sofa/component/SofaPardisoSolver.cmake
+++ modules/sofa/component/SofaPardisoSolver.cmake
@@ -20,6 +20,6 @@
 add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES})

 set(COMPILER_DEFINES "SOFA_BUILD_PARDISO_SOLVER")
-set(LINKER_DEPENDENCIES SofaSimulationTree SofaMeshCollision)
+set(LINKER_DEPENDENCIES SofaSimulationTree SofaMeshCollision SofaBaseVisual)

 include(${SOFA_CMAKE_DIR}/post.cmake)


Commenting out debug message for the build identifier string.  https://tracker.physiomeproject.org/show_bug.cgi?id=2648

--- source/configure/GenerateVersionHeader.cmake
+++ source/configure/GenerateVersionHeader.cmake
@@ -29,5 +29,5 @@
 " )

 FILE( WRITE ${CONFIGURED_VERSION_HEADER} ${VERSION_HEADER_STRING} )
-MESSAGE( STATUS "Build information: ${CMAKE_SYSTEM_PROCESSOR} ${OPERATING_SYSTEM} ${CMGUI_USER_INTERFACE} ${LOWERCASE_CURRENT_BUILD_TYPE} ${SVN_REVISION}" )
+#MESSAGE( STATUS "Build information: ${CMAKE_SYSTEM_PROCESSOR} ${OPERATING_SYSTEM} ${CMGUI_USER_INTERFACE} ${LOWERCASE_CURRENT_BUILD_TYPE} ${SVN_REVISION}" )


[C++, Build] store result from Findjsmn.cmake in jsmn_FOUND

Change-Id: I0e142e6e6b004b921bdd5be50a47431ba7b78969

--- cpp/CMake/Findjsmn.cmake
+++ cpp/CMake/Findjsmn.cmake
@@ -4,3 +4,5 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(jsmn DEFAULT_MSG
     jsmn_LIBRARY jsmn_INCLUDE_DIR)
+
+set(jsmn_FOUND ${JSMN_FOUND} CACHE BOOL "TRUE if jsmn was found, FALSE otherwise")


REFAC: remove unused variable

REFAC: remove unused variable

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -45,7 +45,6 @@
   set( CTEST_ENVIRONMENT
 "PATH=$ENV{PATH}
 GDAL_DATA=$ENV{GDAL_DATA}
-GEOTIFF_CSV=$ENV{GEOTIFF_CSV}
 PROJ_LIB=$ENV{PROJ_LIB}
 ")
 else()


Fixed CMake error when boost is not found

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -103,7 +103,7 @@
 # Find Boost
 # Prefer static linking in all cases
 set(Boost_USE_STATIC_LIBS TRUE)
-set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38")
+set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39")
 # Components that need linking (NB does not include heaader-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
@@ -177,7 +177,6 @@
   ${CEGUI_INCLUDE_DIRS}
   ${OIS_INCLUDE_DIRS}
   ${Cg_INCLUDE_DIRS}
-  ${Boost_INCLUDE_DIRS}
   ${X11_INCLUDE_DIR}
   ${DirectX_INCLUDE_DIRS}
   ${CppUnit_INCLUDE_DIRS}
@@ -187,9 +186,13 @@
 link_directories(
   ${OPENGL_LIBRARY_DIRS}
   ${Cg_LIBRARY_DIRS}
-  ${Boost_LIBRARY_DIRS}
   ${X11_LIBRARY_DIRS}
   ${DirectX_LIBRARY_DIRS}
   ${CppUnit_LIBRARY_DIRS}
 )

+if (Boost_FOUND)
+  include_directories(${Boost_INCLUDE_DIRS})
+  link_directories(${Boost_LIBRARY_DIRS})
+endif ()
+


Update boost to next release version 1.56.


ENH: ExternalData multi-algorithm support

Update ITK's ExternalData.cmake support to CMake's ExternalData.cmake from
v3.7.0-rc1-309-gaa10572, which includes CMake commit 33a9aaa89b437da29. This
adds support for multiple hash algorithms. This enables ITK to fetch from both
our current Midas and Apache resources, which use MD5 content addressed
storage, and also SHA512 content addressed resources, like Girder instances.

Change-Id: I05923b94172aaef905835710327ac2dae3bc18ba

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -196,6 +196,12 @@
 # For example, the argument ``DATA{img.png}`` may be satisfied by either a
 # real ``img.png`` file in the current source directory or a ``img.png.md5``
 # file containing its MD5 sum.
+#
+# Multiple content links of the same name with different hash algorithms
+# are supported (e.g. ``img.png.sha256`` and ``img.png.sha1``) so long as
+# they all correspond to the same real file.  This allows objects to be
+# fetched from sources indexed by different hash algorithms.
+#
 #
 # Referencing File Series
 # """""""""""""""""""""""
@@ -382,8 +388,14 @@

   set(files "")

-  # Set "_ExternalData_FILE_${file}" for each output file to avoid duplicate
-  # rules.  Use local data first to prefer real files over content links.
+  # Set a "_ExternalData_FILE_${file}" variable for each output file to avoid
+  # duplicate entries within this target.  Set a directory property of the same
+  # name to avoid repeating custom commands with the same output in this directory.
+  # Repeating custom commands with the same output across directories or across
+  # targets in the same directory may be a race, but this is likely okay because
+  # we use atomic replacement of output files.
+  #
+  # Use local data first to prefer real files over content links.

   # Custom commands to copy or link local data.
   get_property(data_local GLOBAL PROPERTY _ExternalData_${target}_LOCAL)
@@ -393,16 +405,20 @@
     list(GET tuple 1 name)
     if(NOT DEFINED "_ExternalData_FILE_${file}")
       set("_ExternalData_FILE_${file}" 1)
-      add_custom_command(
-        COMMENT "Generating ${file}"
-        OUTPUT "${file}"
-        COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
-                                 -Dfile=${file} -Dname=${name}
-                                 -DExternalData_ACTION=local
-                                 -DExternalData_CONFIG=${config}
-                                 -P ${_ExternalData_SELF}
-        MAIN_DEPENDENCY "${name}"
-        )
+      get_property(added DIRECTORY PROPERTY "_ExternalData_FILE_${file}")
+      if(NOT added)
+        set_property(DIRECTORY PROPERTY "_ExternalData_FILE_${file}" 1)
+        add_custom_command(
+          COMMENT "Generating ${file}"
+          OUTPUT "${file}"
+          COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
+                                   -Dfile=${file} -Dname=${name}
+                                   -DExternalData_ACTION=local
+                                   -DExternalData_CONFIG=${config}
+                                   -P ${_ExternalData_SELF}
+          MAIN_DEPENDENCY "${name}"
+          )
+      endif()
       list(APPEND files "${file}")
     endif()
   endforeach()
@@ -413,27 +429,33 @@
     string(REPLACE "|" ";" tuple "${entry}")
     list(GET tuple 0 file)
     list(GET tuple 1 name)
-    list(GET tuple 2 ext)
-    set(stamp "${ext}-stamp")
+    list(GET tuple 2 exts)
+    string(REPLACE "+" ";" exts_list "${exts}")
+    list(GET exts_list 0 first_ext)
+    set(stamp "-hash-stamp")
     if(NOT DEFINED "_ExternalData_FILE_${file}")
       set("_ExternalData_FILE_${file}" 1)
-      add_custom_command(
-        # Users care about the data file, so hide the hash/timestamp file.
-        COMMENT "Generating ${file}"
-        # The hash/timestamp file is the output from the build perspective.
-        # List the real file as a second output in case it is a broken link.
-        # The files must be listed in this order so CMake can hide from the
-        # make tool that a symlink target may not be newer than the input.
-        OUTPUT "${file}${stamp}" "${file}"
-        # Run the data fetch/update script.
-        COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
-                                 -Dfile=${file} -Dname=${name} -Dext=${ext}
-                                 -DExternalData_ACTION=fetch
-                                 -DExternalData_CONFIG=${config}
-                                 -P ${_ExternalData_SELF}
-        # Update whenever the object hash changes.
-        MAIN_DEPENDENCY "${name}${ext}"
-        )
+      get_property(added DIRECTORY PROPERTY "_ExternalData_FILE_${file}")
+      if(NOT added)
+        set_property(DIRECTORY PROPERTY "_ExternalData_FILE_${file}" 1)
+        add_custom_command(
+          # Users care about the data file, so hide the hash/timestamp file.
+          COMMENT "Generating ${file}"
+          # The hash/timestamp file is the output from the build perspective.
+          # List the real file as a second output in case it is a broken link.
+          # The files must be listed in this order so CMake can hide from the
+          # make tool that a symlink target may not be newer than the input.
+          OUTPUT "${file}${stamp}" "${file}"
+          # Run the data fetch/update script.
+          COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
+                                   -Dfile=${file} -Dname=${name} -Dexts=${exts}
+                                   -DExternalData_ACTION=fetch
+                                   -DExternalData_CONFIG=${config}
+                                   -P ${_ExternalData_SELF}
+          # Update whenever the object hash changes.
+          MAIN_DEPENDENCY "${name}${first_ext}"
+          )
+      endif()
       list(APPEND files "${file}${stamp}")
     endif()
   endforeach()
@@ -778,6 +800,7 @@
   cmake_policy(SET CMP0009 NEW)
   file(${glob} globbed RELATIVE "${top_src}" "${top_src}/${pattern}*")
   cmake_policy(POP)
+  set(externals_count -1)
   foreach(entry IN LISTS globbed)
     if("x${entry}" MATCHES "^x(.*)(\\.(${_ExternalData_REGEX_EXT}))$")
       set(relname "${CMAKE_MATCH_1}")
@@ -797,7 +820,12 @@
         set(name "${top_src}/${relname}")
         set(file "${top_bin}/${relname}")
         if(alg)
-          list(APPEND external "${file}|${name}|${alg}")
+          if(NOT "${external_${externals_count}_file_name}" STREQUAL "${file}|${name}")
+            # 0 works around negative number bug in older CMake
+            math(EXPR externals_count "0${externals_count} + 1")
+            set(external_${externals_count}_file_name "${file}|${name}")
+          endif()
+          list(APPEND external_${externals_count}_algs "${alg}")
         elseif(ExternalData_LINK_CONTENT)
           _ExternalData_link_content("${name}" alg)
           list(APPEND external "${file}|${name}|${alg}")
@@ -810,6 +838,14 @@
       endif()
     endif()
   endforeach()
+  if(${externals_count} GREATER -1)
+    foreach(ii RANGE ${externals_count})
+      string(REPLACE ";" "+" algs_delim "${external_${ii}_algs}")
+      list(APPEND external "${external_${ii}_file_name}|${algs_delim}")
+      unset(external_${ii}_algs)
+      unset(external_${ii}_file_name)
+    endforeach()
+  endif()
   set(external "${external}" PARENT_SCOPE)
   set(internal "${internal}" PARENT_SCOPE)
   set(have_original "${have_original}" PARENT_SCOPE)
@@ -927,13 +963,28 @@
   set("${msg_var}" "${msg}" PARENT_SCOPE)
 endfunction()

-function(_ExternalData_download_object name hash algo var_obj)
+function(_ExternalData_get_from_object_store hash algo var_obj var_success)
   # Search all object stores for an existing object.
   foreach(dir ${ExternalData_OBJECT_STORES})
     set(obj "${dir}/${algo}/${hash}")
     if(EXISTS "${obj}")
       message(STATUS "Found object: \"${obj}\"")
       set("${var_obj}" "${obj}" PARENT_SCOPE)
+      set("${var_success}" 1 PARENT_SCOPE)
+      return()
+    endif()
+  endforeach()
+endfunction()
+
+function(_ExternalData_download_object name hash algo var_obj var_success var_errorMsg)
+  # Search all object stores for an existing object.
+  set(success 1)
+  foreach(dir ${ExternalData_OBJECT_STORES})
+    set(obj "${dir}/${algo}/${hash}")
+    if(EXISTS "${obj}")
+      message(STATUS "Found object: \"${obj}\"")
+      set("${var_obj}" "${obj}" PARENT_SCOPE)
+      set("${var_success}" "${success}" PARENT_SCOPE)
       return()
     endif()
   endforeach()
@@ -959,7 +1010,8 @@
         set(url "${lhs}${algo}${rhs}")
       endif()
     endif()
-    message(STATUS "Fetching \"${url}\"")
+    string(REGEX REPLACE "((https?|ftp)://)([^@]+@)?(.*)" "\\1\\4" secured_url "${url}")
+    message(STATUS "Fetching \"${secured_url}\"")
     if(url MATCHES "^ExternalDataCustomScript://([A-Za-z_][A-Za-z0-9_]*)/(.*)$")
       _ExternalData_custom_fetch("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}" "${tmp}" err errMsg)
     else()
@@ -987,6 +1039,7 @@
   get_filename_component(dir "${name}" PATH)
   set(staged "${dir}/.ExternalData_${algo}_${hash}")

+  set(success 1)
   if(found)
     file(RENAME "${tmp}" "${obj}")
     message(STATUS "Downloaded object: \"${obj}\"")
@@ -997,38 +1050,75 @@
     if(NOT tried)
       set(tried "\n  (No ExternalData_URL_TEMPLATES given)")
     endif()
-    message(FATAL_ERROR "Object ${algo}=${hash} not found at:${tried}")
+    set(success 0)
+    set("${var_errorMsg}" "Object ${algo}=${hash} not found at:${tried}" PARENT_SCOPE)
   endif()

   set("${var_obj}" "${obj}" PARENT_SCOPE)
+  set("${var_success}" "${success}" PARENT_SCOPE)
 endfunction()

 if("${ExternalData_ACTION}" STREQUAL "fetch")
-  foreach(v ExternalData_OBJECT_STORES file name ext)
+  foreach(v ExternalData_OBJECT_STORES file name exts)
     if(NOT DEFINED "${v}")
       message(FATAL_ERROR "No \"-D${v}=\" value provided!")
     endif()
   endforeach()

-  file(READ "${name}${ext}" hash)
-  string(STRIP "${hash}" hash)
-
-  if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$")
-    string(TOUPPER "${CMAKE_MATCH_1}" algo)
-  else()
-    message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"")
-  endif()
-
-  _ExternalData_download_object("${name}" "${hash}" "${algo}" obj)
-
+  string(REPLACE "+" ";" exts_list "${exts}")
+  set(succeeded 0)
+  set(errorMsg "")
+  set(hash_list )
+  set(algo_list )
+  set(hash )
+  set(algo )
+  foreach(ext ${exts_list})
+    file(READ "${name}${ext}" hash)
+    string(STRIP "${hash}" hash)
+
+    if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$")
+      string(TOUPPER "${CMAKE_MATCH_1}" algo)
+    else()
+      message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"")
+    endif()
+
+    list(APPEND hash_list ${hash})
+    list(APPEND algo_list ${algo})
+  endforeach()
+
+  list(LENGTH exts_list num_extensions)
+  math(EXPR exts_range "${num_extensions} - 1")
+  foreach(ii RANGE 0 ${exts_range})
+    list(GET hash_list ${ii} hash)
+    list(GET algo_list ${ii} algo)
+    _ExternalData_get_from_object_store("${hash}" "${algo}" obj succeeded)
+    if(succeeded)
+      break()
+    endif()
+
+  endforeach()
+  if(NOT succeeded)
+    foreach(ii RANGE 0 ${exts_range})
+      list(GET hash_list ${ii} hash)
+      list(GET algo_list ${ii} algo)
+      _ExternalData_download_object("${name}" "${hash}" "${algo}"
+        obj succeeded algoErrorMsg)
+      set(errorMsg "${errorMsg}\n${algoErrorMsg}")
+      if(succeeded)
+        break()
+      endif()
+    endforeach()
+  endif()
+  if(NOT succeeded)
+    message(FATAL_ERROR "${errorMsg}")
+  endif()
   # Check if file already corresponds to the object.
-  set(stamp "${ext}-stamp")
+  set(stamp "-hash-stamp")
   set(file_up_to_date 0)
   if(EXISTS "${file}" AND EXISTS "${file}${stamp}")
     file(READ "${file}${stamp}" f_hash)
     string(STRIP "${f_hash}" f_hash)
     if("${f_hash}" STREQUAL "${hash}")
-      #message(STATUS "File already corresponds to object")
       set(file_up_to_date 1)
     endif()
   endif()


DOC: change AppFiltering module long description

--- Modules/Applications/AppFiltering/otb-module.cmake
+++ Modules/Applications/AppFiltering/otb-module.cmake
@@ -18,7 +18,7 @@
 # limitations under the License.
 #

-set(DOCUMENTATION "Basic filters application.")
+set(DOCUMENTATION "Image filtering application.")

 otb_module(OTBAppFiltering
   DEPENDS


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


comment out new target property

comment out new target property

Change-Id: I094fee1a1265584c53bde93401dc68dc722caee9

--- VAD_target_properties.cmake
+++ VAD_target_properties.cmake
@@ -161,7 +161,7 @@
   STATIC_LIBRARY_FLAGS_RELEASE
   STATIC_LIBRARY_FLAGS
   SUFFIX
-  TYPE
+#  TYPE
   VERSION
   VISIBILITY_INLINES_HIDDEN
   VS_DOTNET_REFERENCES


Fix cross-compiling builds using X11 shared libraries.

--- Source/ThirdParty/SDL/cmake/sdlchecks.cmake
+++ Source/ThirdParty/SDL/cmake/sdlchecks.cmake
@@ -355,7 +355,8 @@
 # - HAVE_DLOPEN opt
 macro(CheckX11)
   if(VIDEO_X11)
-    # Urho3D - no fix required - all these checks below work on native Linux build only, e.g. they would not work on RPI (native or X-compile) which is fortunately a good thing
+    # Urho3D - bug fix - in order to make these checks below work on both native and cross-compiling builds we need to add the '-shared' compiler flags to ensure the linker does not attempt to statically link against X11 shared libs which would otherwise fail the test when in cross-compiling mode
+    set(CMAKE_REQUIRED_FLAGS "-fPIC -shared ${ORIG_CMAKE_REQUIRED_FLAGS}")
     foreach (NAME X11 Xext Xcursor Xinerama Xi Xrandr Xrender Xss Xxf86vm)
       string (TOUPPER ${NAME} UPCASE_NAME)
       string (REGEX REPLACE \\..+$ "" UPCASE_NAME "${UPCASE_NAME}")  # Stringify for string replacement
@@ -364,21 +365,27 @@
     endforeach ()

     # Urho3D - commented out setting of X_CFLAGS based on the search result for X11/Xlib.h using the default search path (if it is found then it is in default path anyway so no point to add it into compiler header search path again)
+    # Urho3D - add check for Xdbe extension

     check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
     check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
     check_include_file(X11/extensions/XInput2.h HAVE_XINPUT_H)
     check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
     check_include_file(X11/extensions/Xrender.h HAVE_XRENDER_H)
+    check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
     check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
-    check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
+    check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xdbe.h" HAVE_XDBE_H)
+    check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)
     check_include_files("X11/Xlib.h;X11/extensions/xf86vmode.h" HAVE_XF86VM_H)
-    check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)

     if(X11_LIB)
       if(NOT HAVE_XEXT_H)
         message_error("Missing Xext.h, maybe you need to install the libxext-dev package?")
       endif()
+
+      if (HAVE_XDBE_H)
+        set(SDL_VIDEO_DRIVER_X11_XDBE 1)
+      endif ()

       set(HAVE_VIDEO_X11 TRUE)
       set(HAVE_SDL_VIDEO TRUE)
@@ -532,6 +539,7 @@
       endif()

       set(CMAKE_REQUIRED_LIBRARIES)
+      set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
     endif()
   endif()
 endmacro()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


adding febuary/june DX SDK paths for windows to DX cmake

--- indra/cmake/DirectX.cmake
+++ indra/cmake/DirectX.cmake
@@ -3,13 +3,14 @@
 if (VIEWER AND WINDOWS)
   find_path(DIRECTX_INCLUDE_DIR dxdiag.h
             "$ENV{DXSDK_DIR}/Include"
+            "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include"
+            "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (February 2010)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include"
-            "C:/DX90SDK/Include"
             "$ENV{PROGRAMFILES}/DX90SDK/Include"
             )
   if (DIRECTX_INCLUDE_DIR)
@@ -24,13 +25,14 @@

   find_path(DIRECTX_LIBRARY_DIR dxguid.lib
             "$ENV{DXSDK_DIR}/Lib/x86"
+            "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86"
+            "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (February 2010)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86"
-            "C:/DX90SDK/Lib"
             "$ENV{PROGRAMFILES}/DX90SDK/Lib"
             )
   if (DIRECTX_LIBRARY_DIR)


Adding include for flatcc to flat_c_libraries.

--- build_tools/cmake/flatbuffer_c_library.cmake
+++ build_tools/cmake/flatbuffer_c_library.cmake
@@ -147,6 +147,7 @@
   )
   target_compile_options(${_NAME}
     INTERFACE
+      "-I${IREE_ROOT_DIR}/third_party/flatcc/include/"
       "-I${IREE_ROOT_DIR}/third_party/flatcc/include/flatcc/reflection/"
   )


Add missing quotes around doc string

Add missing quotes around doc string

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -2,7 +2,7 @@

 if(NOT DEFINED WASM_LLVM_CONFIG)
   if(NOT "$ENV{WASM_LLVM_CONFIG}" STREQUAL "")
-    set(WASM_LLVM_CONFIG "$ENV{WASM_LLVM_CONFIG}" CACHE FILEPATH Location of llvm-config compiled with WASM support.)
+    set(WASM_LLVM_CONFIG "$ENV{WASM_LLVM_CONFIG}" CACHE FILEPATH "Location of llvm-config compiled with WASM support.")
   endif()
 endif()


Add little fix for MSVC version 1912.  I understand that the issue is fixed in version > 1912 but cannot at this time confirm this.

--- tests/gtest-1.7.0/cmake/internal_utils.cmake
+++ tests/gtest-1.7.0/cmake/internal_utils.cmake
@@ -66,6 +66,9 @@
       # Resolved overload was found by argument-dependent lookup.
       set(cxx_base_flags "${cxx_base_flags} -wd4675")
     endif()
+	if(MSVC_VERSION GREATER_EQUAL 1900 AND MSVC_VERSION LESS 1913)
+	  set(cxx_base_flags "${cxx_base_flags} -wd4996")
+	endif()
     set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
     set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
     set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")


Release version 2.1. Automatic dependency tracking added.

- libfind_package rewritten
   * Now tracks dependencies in list ${<PREFIX>_DEPENDENCIES} for libfind_process to use
   * No longer defaults to QUIET, extra parameters (such as "QUIET") may be added as needed
- libfind_process now complains of _INCLUDE_DIRS or _LIBRARIES are specified for processing
   * These are not config options and thus are mishandled and should not be used
- Handling of find modules with no version information changed: now they are accepted but we still complain.
- Added some debug output that can be enabled via LIBFIND_DEBUG=1

Note: PROCESS_INCLUDES and PROCESS_LIBS are only needed if the package uses options other
than <PREFIX>_INCLUDE_DIR and <PREFIX>_LIBRARY. Package's own variables with those names
are implicitly included as well as anything that is used via libfind_package (even non-
standard names if the other module is based on libfind because we track the option names).

--- LibFindMacros.cmake
+++ LibFindMacros.cmake
@@ -1,21 +1,20 @@
-# Version 2.0+
+# Version 2.1
 # Public Domain, originally written by Lasse Kärkkäinen <tronic>
 # Maintained at https://github.com/Tronic/cmake-modules
 # Please send your improvements as pull requests on Github.

-# Works the same as find_package, but forwards the "REQUIRED" argument used for
-# the current package and always uses the "QUIET" flag. For this to work, the
-# first parameter must be the prefix of the current package, then the prefix of
-# the new package etc, which are passed to find_package.
+# Find another package and make it a dependency of the current package.
+# This also automatically forwards the "REQUIRED" argument.
+# Usage: libfind_package(<prefix> <another package> [extra args to find_package])
 macro (libfind_package PREFIX PKG)
-  set (LIBFIND_PACKAGE_ARGS ${PKG} ${ARGN} QUIET)
+  set(${PREFIX}_args ${PKG} ${ARGN})
   if (${PREFIX}_FIND_REQUIRED)
-    set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
-  endif()
-  find_package(${LIBFIND_PACKAGE_ARGS})
-  unset(LIBFIND_PACKAGE_ARGS)
-  list(APPEND ${PREFIX}_DEPENDENCIES ${PKG})
-endmacro (libfind_package)
+    set(${PREFIX}_args ${${PREFIX}_args} REQUIRED)
+  endif()
+  find_package(${${PREFIX}_args})
+  set(${PREFIX}_DEPENDENCIES ${${PREFIX}_DEPENDENCIES};${PKG} PARENT_SCOPE)
+  unset(${PREFIX}_args)
+endmacro()

 # A simple wrapper to make pkg-config searches a bit easier.
 # Works the same as CMake's internal pkg_check_modules but is always quiet.
@@ -25,6 +24,35 @@
     pkg_check_modules(${ARGN} QUIET)
   endif()
 endmacro()
+
+# Avoid useless copy&pasta by doing what most simple libraries do anyway:
+# pkg-config, find headers, find library.
+# Usage: libfind_pkg_detect(<prefix> <pkg-config args> FIND_PATH <name> [other args] FIND_LIBRARY <name> [other args])
+# E.g. libfind_pkg_detect(SDL2 sdl2 FIND_PATH SDL.h PATH_SUFFIXES SDL2 FIND_LIBRARY SDL2)
+function (libfind_pkg_detect PREFIX)
+  # Parse arguments
+  set(argname pkgargs)
+  foreach (i ${ARGN})
+    if ("${i}" STREQUAL "FIND_PATH")
+      set(argname pathargs)
+    elseif ("${i}" STREQUAL "FIND_LIBRARY")
+      set(argname libraryargs)
+    else()
+      set(${argname} ${${argname}} ${i})
+    endif()
+  endforeach()
+  if (NOT pkgargs)
+    message(FATAL_ERROR "libfind_pkg_detect requires at least a pkg_config package name to be passed.")
+  endif()
+  # Find library
+  libfind_pkg_check_modules(${PREFIX}_PKGCONF ${pkgargs})
+  if (pathargs)
+    find_path(${PREFIX}_INCLUDE_DIR NAMES ${pathargs} HINTS ${${PREFIX}_PKGCONF_INCLUDE_DIRS})
+  endif()
+  if (libraryargs)
+    find_library(${PREFIX}_SDL_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS})
+  endif()
+endfunction()

 # Extracts a version #define from a version.h file, output stored to <PREFIX>_VERSION.
 # Usage: libfind_version_header(Foobar foobar/version.h FOOBAR_VERSION_STR)
@@ -127,6 +155,11 @@
     list(REMOVE_DUPLICATES libraryopts)
   endif()

+  string(REGEX REPLACE ".*[ ;]([^ ;]*(_INCLUDE_DIRS|_LIBRARIES))" "\\1" tmp "${includeopts} ${libraryopts}")
+  if (NOT tmp STREQUAL "${includeopts} ${libraryopts}")
+    message(AUTHOR_WARNING "Plural form ${tmp} found in config options of ${PREFIX}. This works as before but is now deprecated. Please only use singular forms INCLUDE_DIR and LIBRARY, and update your find scripts for LibFindMacros > 2.0 automatic dependency system (most often you can simply remove the PROCESS variables entirely).")
+  endif()
+
   # Include/library names separated by spaces (notice: not CMake lists)
   unset(includes)
   unset(libs)
@@ -135,7 +168,7 @@
   foreach (i ${includeopts})
     list(APPEND configopts ${i})
     if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND")
-      set(includes ${includes} ${${i}})
+      list(APPEND includes "${${i}}")
     else()
       set(found FALSE)
       set(missing_headers TRUE)
@@ -146,7 +179,7 @@
   foreach (i ${libraryopts})
     list(APPEND configopts ${i})
     if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND")
-      set(libs ${libs} ${${i}})
+      list(APPEND libs "${${i}}")
     else()
       set (found FALSE)
     endif()
@@ -155,8 +188,7 @@
   # Version checks
   if (found AND findver)
     if (NOT version)
-      message (AUTHOR_WARNING "Find${PREFIX}.cmake does not provide version information. Either fix the module or remove any find_package() version requirements.")
-      set(found FALSE)
+      message(WARNING "The find module for ${PREFIX} does not provide version information, so we'll just assume that it is OK. Please fix the module or remove package version requirements to get rid of this warning.")
     elseif (version VERSION_LESS findver OR (exactver AND NOT version VERSION_EQUAL findver))
       set(found FALSE)
       set(version_unsuitable TRUE)
@@ -175,6 +207,13 @@
     set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
     if (NOT quiet)
       message(STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
+      if (LIBFIND_DEBUG)
+        message(STATUS "  ${PREFIX}_INCLUDE_OPTS=${${PREFIX}_INCLUDE_OPTS}")
+        message(STATUS "  ${PREFIX}_LIBRARY_OPTS=${${PREFIX}_LIBRARY_OPTS}")
+        message(STATUS "  ${PREFIX}_INCLUDE_DIRS=${includes}")
+        message(STATUS "  ${PREFIX}_LIBRARIES=${libs}")
+        message(STATUS "  ${PREFIX}_DEPENDENCIES=${${PREFIX}_DEPENDENCIES}")
+      endif()
     endif()
     return()
   endif()


Made changes requested in the pull request:

* improved variable and file naming
* add nvcc flags for all detected architectures
* better handling of the value-formatting

--- cmake/Modules/HandleCUDAComputeCapability.cmake
+++ cmake/Modules/HandleCUDAComputeCapability.cmake
@@ -9,9 +9,13 @@

 if (NOT CUDA_TARGET_COMPUTE_CAPABILITY)
 	if (CMAKE_CUDA_COMPILER_LOADED)
-		set(CUDAFILE ${CMAKE_CURRENT_BINARY_DIR}/check_cuda.cu)
+		set(CUDAFILE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/query_gpu_compute_capability.cu)
 		file(WRITE ${CUDAFILE}
-"#include <stdio.h>\n\
+"#include <string>\n\
+#include <iostream>\n\
+#include <vector>\n\
+#include <algorithm>\n\
+#include <sstream>\n\
 #include <cuda_runtime_api.h>\n\
 int main()\n\
 {\n\
@@ -19,45 +23,54 @@
 	cudaError_t status;\n\
 	int device_count;\n\
 	status = cudaGetDeviceCount(&device_count);\n\
-	int device_index = 0;\n\
+	std::vector<std::string> sm_values;\n\
 	if (status != cudaSuccess) {\n\
 		fprintf(stderr,\"cudaGetDeviceCount() failed: %s\\n\", cudaGetErrorString(status));\n\
 		return -1;\n\
 	}\n\
-	if (device_index >= device_count) {\n\
-		fprintf(stderr, \"Specified device index %d exceeds the maximum (the device count on this system is %d)\\n\", device_index, device_count);\n\
-		return -1;\n\
+	for(int device_index = 0; device_index < device_count; device_index++){\n\
+		status = cudaGetDeviceProperties(&prop, device_index);\n\
+		if (status != cudaSuccess) {\n\
+			fprintf(stderr,\"cudaGetDeviceProperties() for device ${device_index} failed: %s\\n\", cudaGetErrorString(status));\n\
+			return -1;\n\
+		}\n\
+		std::ostringstream ss;\n\
+		ss << prop.major << \".\" << prop.minor;\n\
+		sm_values.push_back(ss.str());\n\
 	}\n\
-	status = cudaGetDeviceProperties(&prop, device_index);\n\
-	if (status != cudaSuccess) {\n\
-		fprintf(stderr,\"cudaGetDeviceProperties() for device ${device_index} failed: %s\\n\", cudaGetErrorString(status));\n\
-		return -1;\n\
+	std::vector<std::string>::iterator end = std::unique(sm_values.begin(), sm_values.end()); ;\n\
+	sm_values.resize(std::distance(sm_values.begin(), end));\n\
+	for(std::vector<std::string>::iterator it = sm_values.begin(); it != sm_values.end(); it++) {\n\
+		std::cout << *it;\n\
+		if((it+1) != sm_values.end()) std::cout << \";\";\n\
 	}\n\
-	printf(\"%d%d %d.%d\", prop.major, prop.minor, prop.major, prop.minor);\n\
 	return 0;\n\
 }")
-		try_run(run_result compile_result ${CMAKE_CURRENT_BINARY_DIR} ${CUDAFILE}
+		try_run(RUN_RESULT COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CUDAFILE}
 			RUN_OUTPUT_VARIABLE CUDA_TARGET_COMPUTE_CAPABILITY_
 			COMPILE_OUTPUT_VARIABLE compile_output)
-		if(NOT "${compile_result}")
+		if(NOT "${COMPILE_RESULT}")
 			message(SEND_ERROR "Detecting CUDA_TARGET_COMPUTE_CAPABILITY failed: Compilation failure")
 			message(SEND_ERROR "${compile_output}")
-		elseif(NOT ("${run_result}" EQUAL "0"))
+		elseif(NOT ("${RUN_RESULT}" EQUAL "0"))
 			message(SEND_ERROR "Detecting CUDA_TARGET_COMPUTE_CAPABILITY failed: Run failure")
 			message(SEND_ERROR "${CUDA_TARGET_COMPUTE_CAPABILITY_}")
 		endif()
-		separate_arguments(CUDA_TARGET_COMPUTE_CAPABILITY_ UNIX_COMMAND "${CUDA_TARGET_COMPUTE_CAPABILITY_}")
-		list(GET CUDA_TARGET_COMPUTE_CAPABILITY_ 1 FORMATTED_COMPUTE_CAPABILITY)
-		list(GET CUDA_TARGET_COMPUTE_CAPABILITY_ 0 CUDA_TARGET_COMPUTE_CAPABILITY_)
 	endif()
 endif()

-set(CUDA_TARGET_COMPUTE_CAPABILITY "${CUDA_TARGET_COMPUTE_CAPABILITY_}" CACHE STRING "CUDA compute capability of the (first) \
-	CUDA device on the system, in XY format (like the X.Y format but no dot); see table of features and capabilities by \
+set(CUDA_TARGET_COMPUTE_CAPABILITY "${CUDA_TARGET_COMPUTE_CAPABILITY_}" CACHE STRING "List of CUDA compute capabilities of the targeted \
+	CUDA devices in X.Y format - see table of features and capabilities by \
 	capability X.Y value at https://en.wikipedia.org/wiki/CUDA#Version_features_and_specifications")

-message(STATUS "CUDA device-side code will assume compute capability ${FORMATTED_COMPUTE_CAPABILITY}")
+message(STATUS "CUDA device-side code will generated for the compute capabilitie(s) ${CUDA_TARGET_COMPUTE_CAPABILITY}")

-set(CUDA_GENCODE "arch=compute_${CUDA_TARGET_COMPUTE_CAPABILITY},code=compute_${CUDA_TARGET_COMPUTE_CAPABILITY}")
-set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode ${CUDA_GENCODE} )
+set(FORMATTED_COMPUTE_CAPABILITY "")
+foreach(COMPUTE_CAPABILITY ${CUDA_TARGET_COMPUTE_CAPABILITY})
+	string(REPLACE "." "" COMPUTE_CAPABILITY "${COMPUTE_CAPABILITY}")
+	string(APPEND FORMATTED_COMPUTE_CAPABILITY " -gencode arch=compute_${COMPUTE_CAPABILITY},code=compute_${COMPUTE_CAPABILITY}")
+endforeach(COMPUTE_CAPABILITY)

+message(STATUS "Using extra NVCC flags:${FORMATTED_COMPUTE_CAPABILITY}")
+
+set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ${FORMATTED_COMPUTE_CAPABILITY})


Add qMRMLNodeComboBox::NoneDisplay and qMRMLSortFilterProxyModel::visibleNodeIDs

Closes #13890

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -79,7 +79,7 @@
     BINARY_DIR ${${proj}_DIR}
     PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Slicer.git"
-    GIT_TAG "a3a325ac9fe54061c15ed32311e1972b5486ebed"
+    GIT_TAG "7a5698cd4e6f62350b3e948eb259b0155e7cd2b6"
     ${bender_external_update}
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


Bumpt TubeTK for TRE file loading simplifications

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "3f74380ade5a73b4029b9c6812eadfa915748320"
+    GIT_TAG "be9483afc58802298f4081db7127d056c5154715"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


COMP: Added SOFA_NO_OPENGL definition to projects that use SOFA.

--- CMakeExternals/PatchSOFA-rev9479.cmake
+++ CMakeExternals/PatchSOFA-rev9479.cmake
@@ -16,7 +16,7 @@
 file(APPEND "CMakeLists.txt" "\n\nconfigure_file(SOFAConfig.cmake.in SOFAConfig.cmake @ONLY)")

 file(WRITE "SOFAConfig.cmake.in"
-"add_definitions(-DSOFA_HAVE_EIGEN2;-DSOFA_XML_PARSER_TINYXML;-DTIXML_USE_STL;-DMINI_FLOWVR)
+"add_definitions(-DSOFA_NO_OPENGL;-DSOFA_HAVE_EIGEN2;-DSOFA_XML_PARSER_TINYXML;-DTIXML_USE_STL;-DMINI_FLOWVR)

 set(SOFA_INCLUDE_DIRS \"@SOFA_EXTLIBS_DIR@/eigen-3.1.1;@SOFA_EXTLIBS_DIR@/miniBoost;@SOFA_EXTLIBS_DIR@/miniFlowVR/include;@SOFA_EXTLIBS_DIR@/newmat;@SOFA_EXTLIBS_DIR@/tinyxml;@SOFA_SRC_DIR@/framework;@SOFA_SRC_DIR@/modules\")


minor fix

minor fix

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -161,7 +161,7 @@
 	find_package(NumPy)
 	if(PYTHONLIBS_FOUND AND PYTHON_NUMPY_FOUND)
 		execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE MTF_PY_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
-		message(STATUS "MDP_PY_INSTALL_DIR: ${MDP_PY_INSTALL_DIR}")
+		message(STATUS "MTF_PY_INSTALL_DIR: ${MTF_PY_INSTALL_DIR}")

 		# if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.0.0)
 			add_library(pyMTF MODULE Examples/cpp/pyMTF.cc)


Bugfix: Do not silently ignore invalid feature constraints, but drop the test and print a warning

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@31554 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/macros/macro_pickup_tests.cmake
+++ deal.II/cmake/macros/macro_pickup_tests.cmake
@@ -65,10 +65,20 @@
         _feature ${_match}
         )
       STRING(TOUPPER ${_feature} _feature)
-      STRING(REGEX MATCH "(on|off|yes|no|true|false)$" _boolean ${_match})

-      IF( (DEAL_II_${_feature} AND NOT ${_boolean}) OR
-          (NOT DEAL_II_${_feature} AND ${_boolean}) )
+      # Make sure that _match is a valid feature constraint:
+      IF(DEFINED DEAL_II_${_feature})
+        STRING(REGEX MATCH "(on|off|yes|no|true|false)$" _boolean ${_match})
+        IF( (DEAL_II_${_feature} AND NOT ${_boolean}) OR
+            (NOT DEAL_II_${_feature} AND ${_boolean}) )
+          SET(_define_test FALSE)
+        ENDIF()
+      ELSE()
+        MESSAGE(WARNING "
+Invalid feature constraint \"${_match}\" in file
+\"${_comparison}\":
+The feature \"DEAL_II_${_feature}\" does not exist.\n"
+          )
         SET(_define_test FALSE)
       ENDIF()
     ENDFOREACH()


inite_element_to_iso_lines has been changed to a cpp file, this also needs to be specified in one of the cmake files. Tracker item 1917, https://tracker.physiomeproject.org/show_bug.cgi?id=1917

--- source/misc.cmake
+++ source/misc.cmake
@@ -25,7 +25,7 @@

 SET( FINITE_ELEMENT_GRAPHICS_SRCS
 	finite_element/finite_element_to_graphics_object.cpp
-	finite_element/finite_element_to_iso_lines.c
+	finite_element/finite_element_to_iso_lines.cpp
 	finite_element/finite_element_to_streamlines.cpp )

 SET( FINITE_ELEMENT_SRCS


Fixing type_safe's cmake file

Fixing type_safe's cmake file

--- engine/libs/type_safe/external/external.cmake
+++ engine/libs/type_safe/external/external.cmake
@@ -2,4 +2,4 @@
 # This file is subject to the license terms in the LICENSE file
 # found in the top-level directory of this distribution.

-add_subdirectory(${CMAKE_SOURCE_DIR}/external/debug_assert)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/debug_assert)


Fixed GDCM library search path.

Fixed GDCM library search path.

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -54,6 +54,9 @@
     if(DCMTK_DIR)
       list(APPEND _dir_candidates "${DCMTK_DIR}/bin")
     endif()
+    if(GDCM_DIR)
+      list(APPEND _dir_candidates "${GDCM_DIR}/../../bin")
+    endif()
     if(OpenCV_DIR)
       list(APPEND _dir_candidates "${OpenCV_DIR}/bin")
     endif()
@@ -73,6 +76,9 @@
   else()
     if(DCMTK_DIR)
       list(APPEND _dir_candidates "${DCMTK_DIR}/lib")
+    endif()
+    if(GDCM_DIR)
+      list(APPEND _dir_candidates "${GDCM_DIR}/..")
     endif()
     if(OpenCV_DIR)
       list(APPEND _dir_candidates "${OpenCV_DIR}/lib")
@@ -112,9 +118,6 @@
   endif()
   if(GLUT_DIR)
     list(APPEND _dir_candidates "${GLUT_DIR}")
-  endif()
-  if(GDCM_DIR)
-    list(APPEND _dir_candidates "${GDCM_DIR}/bin")
   endif()
   if(GLEW_DIR)
     list(APPEND _dir_candidates "${GLEW_DIR}")


typo in CMakeVariable (FLAGS not FLATS)

typo in CMakeVariable (FLAGS not FLATS)

--- cmake/CompileFlags.cmake
+++ cmake/CompileFlags.cmake
@@ -15,9 +15,9 @@

 set(UNIX_DEFAULT_CXX_FLAGS                "-Wall -Wextra  -pthread -msse3 -Wno-sign-compare -Wno-unused-parameter -fno-exceptions -fPIC")
-set(UNIX_DEFAULT_CXX_FLATS_DEBUG          "-D_DEBUG -DCORE_DEBUG -g3 -ggdb")
-set(UNIX_DEFAULT_CXX_FLATS_RELEASE        "-DNDEBUG -O3")
-set(UNIX_DEFAULT_CXX_FLATS_RELWITHDEBINFO "-g3")
+set(UNIX_DEFAULT_CXX_FLAGS_DEBUG          "-D_DEBUG -DCORE_DEBUG -g3 -ggdb")
+set(UNIX_DEFAULT_CXX_FLAGS_RELEASE        "-DNDEBUG -O3")
+set(UNIX_DEFAULT_CXX_FLAGS_RELWITHDEBINFO "-g3")

 set(CMAKE_CXX_STANDARD 14)

@@ -34,9 +34,9 @@
     endif()

     set(CMAKE_CXX_FLAGS                "${UNIX_DEFAULT_CXX_FLAGS}                ${CMAKE_CXX_FLAGS}")
-    set(CMAKE_CXX_FLAGS_DEBUG          "${UNIX_DEFAULT_CXX_FLATS_DEBUG}          ${CMAKE_CXX_FLAGS_DEBUG}")
-    set(CMAKE_CXX_FLAGS_RELEASE        "${UNIX_DEFAULT_CXX_FLATS_RELEASE}        ${MATH_FLAG}")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${UNIX_DEFAULT_CXX_FLATS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_RELEASE}")
+    set(CMAKE_CXX_FLAGS_DEBUG          "${UNIX_DEFAULT_CXX_FLAGS_DEBUG}          ${CMAKE_CXX_FLAGS_DEBUG}")
+    set(CMAKE_CXX_FLAGS_RELEASE        "${UNIX_DEFAULT_CXX_FLAGS_RELEASE}        ${MATH_FLAG}")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${UNIX_DEFAULT_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_RELEASE}")

     add_definitions( -Wno-deprecated-declarations ) # Do not warn for eigen bind being deprecated
 elseif (UNIX OR MINGW)
@@ -55,9 +55,9 @@
     endif()

     set(CMAKE_CXX_FLAGS                "${UNIX_DEFAULT_CXX_FLAGS}                ${EIGEN_ALIGNMENT_FLAG} ${CMAKE_CXX_FLAGS}")
-    set(CMAKE_CXX_FLAGS_DEBUG          "${UNIX_DEFAULT_CXX_FLATS_DEBUG}          ${CMAKE_CXX_FLAGS_DEBUG}")
-    set(CMAKE_CXX_FLAGS_RELEASE        "${UNIX_DEFAULT_CXX_FLATS_RELEASE}        ${MATH_FLAG}")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${UNIX_DEFAULT_CXX_FLATS_RELWITHDEBINFO} -ggdb ${CMAKE_CXX_FLAGS_RELEASE}")
+    set(CMAKE_CXX_FLAGS_DEBUG          "${UNIX_DEFAULT_CXX_FLAGS_DEBUG}          ${CMAKE_CXX_FLAGS_DEBUG}")
+    set(CMAKE_CXX_FLAGS_RELEASE        "${UNIX_DEFAULT_CXX_FLAGS_RELEASE}        ${MATH_FLAG}")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${UNIX_DEFAULT_CXX_FLAGS_RELWITHDEBINFO} -ggdb ${CMAKE_CXX_FLAGS_RELEASE}")

     # Prevent Eigen from spitting thousands of warnings with gcc 6+
     add_definitions(-Wno-deprecated-declarations)


minor bugfix for cmake

minor bugfix for cmake

Summary: TSIA

Reviewed By: asaadaldien

Differential Revision: D4778069

fbshipit-source-id: 965bd7e00738ed508d5a9b0cae109b73ba1e9b62

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -228,7 +228,7 @@
   find_package(OpenMP)
   if(OpenMP_FOUND)
     message(STATUS "Adding " ${OpenMP_CXX_FLAGS})
-    set(CMAKE_C_FLAGS "{$CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
   else()


Bug 914: fix compiler detection on windows

--HG--
branch : 3.2

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -322,22 +322,29 @@
     endif()
   else()
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
-    # supporting a "--version" flag
+    # supporting a "--version" or "/version" flag
+
+    if(WIN32 AND NOT CYGWIN)
+      set(EIGEN_CXX_FLAG_VERSION "/version")
+    else()
+      set(EIGEN_CXX_FLAG_VERSION "--version")
+    endif()

     # check whether the head command exists
     find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
     if(HEAD_EXE)
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
                       COMMAND head -n 1
                       OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
     else()
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER}  ${EIGEN_CXX_FLAG_VERSION}
                       OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
       string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})
     endif()

     ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
     set(${VAR} "${CNAME}-${CVER}")
+
   endif()
 endmacro(ei_get_compilerver)


fixed so that libhdf5 does not rebuild all the time on linux

--- cmake/ExternalHDF5.cmake
+++ cmake/ExternalHDF5.cmake
@@ -6,20 +6,21 @@
         PREFIX ${FAST_EXTERNAL_BUILD_DIR}/hdf5
         BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/hdf5
         GIT_REPOSITORY "https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git"
-        GIT_TAG "hdf5-1_10_6"
+        GIT_TAG "5b9cf732caab9daa6ed1e00f2df4f5a792340196" #"hdf5-1_10_6"
+        UPDATE_COMMAND "" # Hack to avoid rebuild all the time on linux
         CMAKE_ARGS
-        -DHDF5_NO_PACKAGES:BOOL=ON
-        -DONLY_SHARED_LIBS:BOOL=ON
-        -DBUILD_TESTING:BOOL=OFF
-        -DHDF5_BUILD_TOOLS:BOOL=OFF
-        -DHDF5_BUILD_EXAMPLES:BOOL=OFF
-        -DHDF5_BUILD_CPP_LIB:BOOL=ON
-        -DHDF5_BUILD_HL_LIB:BOOL=OFF
+          -DHDF5_NO_PACKAGES:BOOL=ON
+          -DONLY_SHARED_LIBS:BOOL=ON
+          -DBUILD_TESTING:BOOL=OFF
+          -DHDF5_BUILD_TOOLS:BOOL=OFF
+          -DHDF5_BUILD_EXAMPLES:BOOL=OFF
+          -DHDF5_BUILD_CPP_LIB:BOOL=ON
+          -DHDF5_BUILD_HL_LIB:BOOL=OFF
         CMAKE_CACHE_ARGS
-        -DCMAKE_BUILD_TYPE:STRING=Release
-        -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-        -DCMAKE_INSTALL_MESSAGE:BOOL=LAZY
-        -DCMAKE_INSTALL_PREFIX:STRING=${FAST_EXTERNAL_INSTALL_DIR}
+          -DCMAKE_BUILD_TYPE:STRING=Release
+          -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
+          -DCMAKE_INSTALL_MESSAGE:BOOL=LAZY
+          -DCMAKE_INSTALL_PREFIX:STRING=${FAST_EXTERNAL_INSTALL_DIR}
         )

 if(WIN32)


Readded md5sum for fifechan

Readded md5sum for fifechan

--- cmake/get-fifechan.cmake
+++ cmake/get-fifechan.cmake
@@ -36,7 +36,7 @@
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-VC14.zip
       URL                 https://ci.appveyor.com/api/buildjobs/eavnmgwxu19xa6r6/artifacts/fifechan-shared-VC14-x86.zip
-      URL_MD5             1
+      URL_MD5             a5707da453fc0788eab55c73f7772f03
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND


Cotire: Exclude the "ext/warn" includes from cotire.

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -30,13 +30,15 @@
 include(${CMAKE_CURRENT_LIST_DIR}/clean_library_list.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/cotire.cmake)

-mark_as_advanced(COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS
-COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH
-COTIRE_DEBUG
-COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES
-COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES
-COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS
-COTIRE_VERBOSE)
+mark_as_advanced(
+    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS
+    COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH
+    COTIRE_DEBUG
+    COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES
+    COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES
+    COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS
+    COTIRE_VERBOSE
+)

 #--------------------------------------------------------------------
 # Creates project with initial variables
@@ -818,34 +820,27 @@
 		if(_pchDisabledForThisModule)
 			set_target_properties(${_projectName} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
 		endif()
-		 set_target_properties(${_projectName} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
-		 get_target_property(_prefixHeader inviwo-core COTIRE_CXX_PREFIX_HEADER)
-		 set_target_properties(${_projectName} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${_prefixHeader}")
-		 cotire(${_projectName})
-    endif()
-	# else()
-			# get_target_property(_pchFile inviwo-core COTIRE_CXX_PRECOMPILED_HEADER)
-			# cotire_setup_pch_file_inclusion(
-					# ${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_sourceFiles})
-			# get_filename_component(pchFileDir ${_pchFile} PATH)
-			# file(GLOB PDB_FILES "${pchFileDir}/*.pdb")
-			# file(COPY ${PDB_FILES} DESTINATION ${_target})
-			# file(GLOB IDB_FILES "${pchFileDir}/*.idb")
-			# file(COPY ${IDB_FILES} DESTINATION ${_target})
-	# endif()
+
+        set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH
+            "${COTIRE_PREFIX_HEADER_IGNORE_PATH};${IVW_EXTENSIONS_DIR}/warn")
+        set_target_properties(${_projectName} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
+        get_target_property(_prefixHeader inviwo-core COTIRE_CXX_PREFIX_HEADER)
+        set_target_properties(${_projectName} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${_prefixHeader}")
+        cotire(${_projectName})
+    endif()
 endmacro()

 #--------------------------------------------------------------------
 # Optimize compilation with pre-compilied headers
 macro(ivw_compile_optimize)
-    #set_target_properties(${_projectName} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
     if(PRECOMPILED_HEADERS)
+        set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH
+            "${COTIRE_PREFIX_HEADER_IGNORE_PATH};${IVW_EXTENSIONS_DIR}/warn")
         set_target_properties(${_projectName} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
 		list(APPEND _allPchDirs ${IVW_EXTENSIONS_DIR})
 		set_target_properties(${_projectName} PROPERTIES COTIRE_PREFIX_HEADER_INCLUDE_PATH "${_allPchDirs}")
 		cotire(${_projectName})
     endif()
-    #target_link_libraries(${_projectName}_unity ${_allLibs})
 endmacro()

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


Hack: accommodate bad file search path for coverage.xml in CTest

We delete this file because if we don't, CTest tries to submit it
as the Coverage.xml file to CDash, which rejects it.

--- cmake/travis_build.cmake
+++ cmake/travis_build.cmake
@@ -11,6 +11,7 @@
 ctest_build()
 ctest_test(PARALLEL_LEVEL 3 RETURN_VALUE res)
 ctest_coverage()
+file(REMOVE ${CTEST_BINARY_DIRECTORY}/coverage.xml)

 if(NOT res EQUAL 0)
   message(FATAL_ERROR "Test failures occurred.")


Updated FW

Updated FW

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "17a656f6a154a0f58f7da73fcda7e5b7e9925c2a")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "2ea5a46de3560651d6c7cb53f6f9c9cf7356497b")

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


Added Clock.now bindings on device

Added Clock.now bindings on device

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "7640ec21f5bdfa508269cb948771b8c99be40e06")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "47e3396c6a6d65a3223ff56f8c9215f8b98e93f8")

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


remove FLightTask Orbit from fmu-v2 target

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -173,3 +173,5 @@
 	# Hardware test
 	#examples/hwtest
 )
+
+set(flight_tasks_to_remove Orbit)


Disable python bindings when building XROOTD with the builtin_xrootd option.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -639,6 +639,7 @@
                -DCMAKE_CXX_FLAGS=${__cxxflags}
                -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
                -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
+               -DENABLE_PYTHON=OFF
   )
   # We cannot call find_package(XROOTD) becuase the package is not yet built. So, we need to emulate what it defines....
   set(_LIBDIR_DEFAULT "lib")


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 20210115)
+set(CastXML_VERSION_PATCH 20210303)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


v0.9.4 update

v0.9.4 update

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,2 +1,2 @@
 # This version number is loaded by the package and the project.
-SET( VERSION "0.9.1" )
+SET( VERSION "0.9.4" )


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -260,6 +260,14 @@
     endif()
 endforeach()

+# OpenGL library preference. Prefer to use GLVND, since that's the better
+# approach nowadays, but allow the users to override it from outside in case
+# it is broken for some reason (Nvidia drivers in Debian's testing (Buster) --
+# reported on 2019-04-09).
+if(NOT CMAKE_VERSION VERSION_LESS 3.10 AND NOT OpenGL_GL_PREFERENCE)
+    set(OpenGL_GL_PREFERENCE GLVND)
+endif()
+
 # Base Magnum library
 if(NOT TARGET Magnum::Magnum)
     add_library(Magnum::Magnum UNKNOWN IMPORTED)
@@ -618,12 +626,13 @@
                 # our own EGL find module, which makes things simpler. The
                 # upstream FindOpenGL is anything but simple. Also can't use
                 # OpenGL_OpenGL_FOUND, because that one is set also if GLVND is
-                # *not* found. WTF.
+                # *not* found. WTF. Also can't just check for
+                # OPENGL_opengl_LIBRARY because that's set even if
+                # OpenGL_GL_PREFERENCE is explicitly set to LEGACY.
                 if(MAGNUM_TARGET_GL)
                     if(CORRADE_TARGET_UNIX AND NOT CORRADE_TARGET_APPLE AND (NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES))
-                        set(OpenGL_GL_PREFERENCE GLVND)
                         find_package(OpenGL)
-                        if(OPENGL_opengl_LIBRARY)
+                        if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND)
                             set_property(TARGET Magnum::${_component} APPEND
                             PROPERTY INTERFACE_LINK_LIBRARIES OpenGL::GLX)
                         endif()
@@ -656,12 +665,13 @@
                 # our own EGL find module, which makes things simpler. The
                 # upstream FindOpenGL is anything but simple. Also can't use
                 # OpenGL_OpenGL_FOUND, because that one is set also if GLVND is
-                # *not* found. WTF.
+                # *not* found. WTF. Also can't just check for
+                # OPENGL_opengl_LIBRARY because that's set even if
+                # OpenGL_GL_PREFERENCE is explicitly set to LEGACY.
                 if(MAGNUM_TARGET_GL)
                     if(CORRADE_TARGET_UNIX AND NOT CORRADE_TARGET_APPLE AND (NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES))
-                        set(OpenGL_GL_PREFERENCE GLVND)
                         find_package(OpenGL)
-                        if(OPENGL_opengl_LIBRARY)
+                        if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND)
                             set_property(TARGET Magnum::${_component} APPEND
                             PROPERTY INTERFACE_LINK_LIBRARIES OpenGL::GLX)
                         endif()
@@ -683,10 +693,11 @@
                 # With GLVND (since CMake 3.11) we need to explicitly link to
                 # GLX because libOpenGL doesn't provide it. Also can't use
                 # OpenGL_OpenGL_FOUND, because that one is set also if GLVND is
-                # *not* found. WTF.
-                set(OpenGL_GL_PREFERENCE GLVND)
+                # *not* found. WTF. Also can't just check for
+                # OPENGL_opengl_LIBRARY because that's set even if
+                # OpenGL_GL_PREFERENCE is explicitly set to LEGACY.
                 find_package(OpenGL)
-                if(OPENGL_opengl_LIBRARY)
+                if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND)
                     set_property(TARGET Magnum::${_component} APPEND PROPERTY
                         INTERFACE_LINK_LIBRARIES OpenGL::GLX)
                 endif()
@@ -736,10 +747,11 @@
                 # With GLVND (since CMake 3.11) we need to explicitly link to
                 # GLX because libOpenGL doesn't provide it. Also can't use
                 # OpenGL_OpenGL_FOUND, because that one is set also if GLVND is
-                # *not* found. If GLVND is not used, link to X11 instead.
-                set(OpenGL_GL_PREFERENCE GLVND)
+                # *not* found. If GLVND is not used, link to X11 instead. Also
+                # can't just check for OPENGL_opengl_LIBRARY because that's set
+                # even if OpenGL_GL_PREFERENCE is explicitly set to LEGACY.
                 find_package(OpenGL)
-                if(OPENGL_opengl_LIBRARY)
+                if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND)
                     set_property(TARGET Magnum::${_component} APPEND PROPERTY
                         INTERFACE_LINK_LIBRARIES OpenGL::GLX)
                 else()
@@ -780,10 +792,11 @@
                 # imported target. Otherwise (and also on all systems except
                 # Linux) link to the classic libGL. Can't use
                 # OpenGL_OpenGL_FOUND, because that one is set also if GLVND is
-                # *not* found. WTF.
-                set(OpenGL_GL_PREFERENCE GLVND)
+                # *not* found. WTF. Also can't just check for
+                # OPENGL_opengl_LIBRARY because that's set even if
+                # OpenGL_GL_PREFERENCE is explicitly set to LEGACY.
                 find_package(OpenGL REQUIRED)
-                if(OPENGL_opengl_LIBRARY)
+                if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND)
                     set_property(TARGET Magnum::${_component} APPEND PROPERTY
                         INTERFACE_LINK_LIBRARIES OpenGL::OpenGL)
                 else()


s/cfg/yml/

s/cfg/yml/

--- modules/boost/boost.cmake
+++ modules/boost/boost.cmake
@@ -5,7 +5,7 @@
 # Autocmake update time.
 # Note that the build-up commands are not Windows-compatible!
 #
-# Your autocmake.cfg should contain::
+# Your autocmake.yml should contain::
 #
 # - boost:
 #   - major: 1


ENH: parse version for muParser

ENH: parse version for muParser

--- CMake/FindMuParser.cmake
+++ CMake/FindMuParser.cmake
@@ -4,6 +4,11 @@
 #   MUPARSER_FOUND        - True if MuParser found.
 #   MUPARSER_INCLUDE_DIRS - where to find muParser.h, etc.
 #   MUPARSER_LIBRARIES    - List of libraries when using MuParser.
+#   MUPARSER_VERSION        - version string
+#   MUPARSER_VERSION_MAJOR  - version major number
+#   MUPARSER_VERSION_MINOR  - version minor number
+#   MUPARSER_VERSION_PATCH  - version patch number
+#   MUPARSER_VERSION_NUMBER - version number ((major*100)+minor)*100+patch
 #

 if( MUPARSER_INCLUDE_DIR )
@@ -13,6 +18,20 @@

 find_path( MUPARSER_INCLUDE_DIR muParser.h
            PATH_SUFFIXES muParser )
+
+if(EXISTS "${MUPARSER_INCLUDE_DIR}/muParserDef.h")
+  file(READ "${MUPARSER_INCLUDE_DIR}/muParserDef.h" _muParserDef_h_CONTENTS)
+  string(REGEX REPLACE ".*# *define MUP_VERSION *_T\\(\"([0-9.]+)\"\\).*" "\\1" MUPARSER_VERSION "${_muParserDef_h_CONTENTS}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" MUPARSER_VERSION_MAJOR "${MUPARSER_VERSION}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" MUPARSER_VERSION_MINOR "${MUPARSER_VERSION}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" MUPARSER_VERSION_PATCH "${MUPARSER_VERSION}")
+  math(EXPR MUPARSER_VERSION_NUMBER
+    "((${MUPARSER_VERSION_MAJOR})*100+${MUPARSER_VERSION_MINOR})*100+${MUPARSER_VERSION_PATCH}")
+else()
+  if(NOT MuParser_FIND_QUIETLY)
+  message(WARNING "muParserDef.h not found !")
+  endif()
+endif()

 find_library( MUPARSER_LIBRARY
               NAMES muparser


fixed file name in error message

fixed file name in error message

--- CMake/viscl-macros.cmake
+++ CMake/viscl-macros.cmake
@@ -1,7 +1,7 @@

 set(OPENCL_STRINGIFY ${CMAKE_CURRENT_LIST_DIR}/viscl-stringify.cmake)
 if (NOT EXISTS ${OPENCL_STRINGIFY})
-  message(FATAL_ERROR "stringify.cmake not found in ${CMAKE_CURRENT_LIST_DIR}")
+  message(FATAL_ERROR "viscl-stringify.cmake not found in ${CMAKE_CURRENT_LIST_DIR}")
 endif()