FindCUDA fix : do not unset CACHE variables on first call

This will allow to override CUDA CMake variables from first CMake call,
like cmake -DCUDA_TOOLKIT_ROOT_DIR=... -DCUDA_CUDA_LIBRARY=...

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -529,7 +529,7 @@

 # Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed,
 # if they have then clear the cache variables, so that will be detected again.
-if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
+if(DEFINED CUDA_TOOLKIT_ROOT_DIR_INTERNAL AND (NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}"))
   unset(CUDA_TARGET_TRIPLET CACHE)
   unset(CUDA_TOOLKIT_TARGET_DIR CACHE)
   unset(CUDA_NVCC_EXECUTABLE CACHE)
@@ -537,8 +537,8 @@
   cuda_unset_include_and_libraries()
 endif()

-if(NOT "${CUDA_TARGET_TRIPLET}" STREQUAL "${CUDA_TARGET_TRIPLET_INTERNAL}" OR
-   (DEFINED CUDA_TOOLKIT_TARGET_DIR AND NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}"))
+if(DEFINED CUDA_TARGET_TRIPLET_INTERNAL AND (NOT "${CUDA_TARGET_TRIPLET}" STREQUAL "${CUDA_TARGET_TRIPLET_INTERNAL}") OR
+   (DEFINED CUDA_TOOLKIT_TARGET_DIR  AND DEFINED CUDA_TOOLKIT_TARGET_DIR_INTERNAL AND NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}"))
   cuda_unset_include_and_libraries()
 endif()


Fix appveyor by changing FindSDL2.cmake

Fix appveyor by changing FindSDL2.cmake

--- cmake/FindSDL2.cmake
+++ cmake/FindSDL2.cmake
@@ -1,4 +1,3 @@
-
 # Locate SDL2 library
 # This module defines
 # SDL2_LIBRARY, the name of the library to link against
@@ -7,13 +6,13 @@
 #
 # This module responds to the the flag:
 # SDL2_BUILDING_LIBRARY
-# If this is defined, then no SDL2_main will be linked in because
+# If this is defined, then no SDL2main will be linked in because
 # only applications need main().
 # Otherwise, it is assumed you are building an application and this
 # module will attempt to locate and set the the proper link flags
 # as part of the returned SDL2_LIBRARY variable.
 #
-# Don't forget to include SDL2main.h and SDL2main.m your project for the
+# Don't forget to include SDLmain.h and SDLmain.m your project for the
 # OS X framework based version. (Other versions link to -lSDL2main which
 # this module will try to find on your behalf.) Also for OS X, this
 # module will automatically add the -framework Cocoa on your behalf.
@@ -28,17 +27,17 @@
 # variable, but when these values are unset, SDL2_LIBRARY does not get created.
 #
 #
-# $SDL2 is an environment variable that would
-# correspond to the ./configure --prefix=$SDL2
+# $SDL2DIR is an environment variable that would
+# correspond to the ./configure --prefix=$SDL2DIR
 # used in building SDL2.
-# l.e.galup 9-20-02
+# l.e.galup  9-20-02
 #
 # Modified by Eric Wing.
 # Added code to assist with automated building by using environmental variables
 # and providing a more controlled/consistent search behavior.
 # Added new modifications to recognize OS X frameworks and
 # additional Unix paths (FreeBSD, etc).
-# Also corrected the header search path to follow "proper" SDL2 guidelines.
+# Also corrected the header search path to follow "proper" SDL guidelines.
 # Added a search for SDL2main which is needed by some platforms.
 # Added a search for threads which is needed by some platforms.
 # Added needed compile switches for MinGW.
@@ -49,110 +48,56 @@
 # CMAKE_INCLUDE_PATH to modify the search paths.
 #
 # Note that the header path has changed from SDL2/SDL.h to just SDL.h
-# This needed to change because "proper" SDL2 convention
+# This needed to change because "proper" SDL convention
 # is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
 # reasons because not all systems place things in SDL2/ (see FreeBSD).
-#
-# Ported by Johnny Patterson. This is a literal port for SDL2 of the FindSDL.cmake
-# module with the minor edit of changing "SDL" to "SDL2" where necessary. This
-# was not created for redistribution, and exists temporarily pending official
-# SDL2 CMake modules.
-#
-# Note that on windows this will only search for the 32bit libraries, to search
-# for 64bit change x86/i686-w64 to x64/x86_64-w64

 #=============================================================================
 # Copyright 2003-2009 Kitware, Inc.
 #
-# CMake - Cross Platform Makefile Generator
-# Copyright 2000-2014 Kitware, Inc.
-# Copyright 2000-2011 Insight Software Consortium
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# * Neither the names of Kitware, Inc., the Insight Software Consortium,
-# nor the names of their contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
 #
 # This software is distributed WITHOUT ANY WARRANTY; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # See the License for more information.
 #=============================================================================
 # (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
+#  License text for the above reference.)

-FIND_PATH(SDL2_INCLUDE_DIR SDL.h
-	HINTS
-	${SDL2}
-	$ENV{SDL2}
-	PATH_SUFFIXES include/SDL2 include SDL2
-	i686-w64-mingw32/include/SDL2
-	x86_64-w64-mingw32/include/SDL2
-	PATHS
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(SDL2_ARCH_64 TRUE)
+  set(SDL2_PROCESSOR_ARCH "x64")
+else()
+  set(SDL2_ARCH_64 FALSE)
+  set(SDL2_PROCESSOR_ARCH "x86")
+endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+
+SET(SDL2_SEARCH_PATHS
 	~/Library/Frameworks
 	/Library/Frameworks
-	/usr/local/include/SDL2
-	/usr/include/SDL2
+	/usr/local
+	/usr
 	/sw # Fink
 	/opt/local # DarwinPorts
 	/opt/csw # Blastwave
 	/opt
 )

-# Lookup the 64 bit libs on x64
-IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
-	FIND_LIBRARY(SDL2_LIBRARY_TEMP SDL2
-		HINTS
-		${SDL2}
-		$ENV{SDL2}
-		PATH_SUFFIXES lib64 lib
-		lib/x64
-		x86_64-w64-mingw32/lib
-		PATHS
-		/sw
-		/opt/local
-		/opt/csw
-		/opt
-	)
-# On 32bit build find the 32bit libs
-ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
-	FIND_LIBRARY(SDL2_LIBRARY_TEMP SDL2
-		HINTS
-		${SDL2}
-		$ENV{SDL2}
-		PATH_SUFFIXES lib
-		lib/x86
-		i686-w64-mingw32/lib
-		PATHS
-		/sw
-		/opt/local
-		/opt/csw
-		/opt
-	)
-ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+FIND_PATH(SDL2_INCLUDE_DIR SDL.h
+	HINTS
+	$ENV{SDL2DIR}
+	PATH_SUFFIXES include/SDL2 include
+	PATHS ${SDL2_SEARCH_PATHS}
+)
+
+FIND_LIBRARY(SDL2_LIBRARY_TEMP
+	NAMES SDL2
+	HINTS
+	$ENV{SDL2DIR}
+	PATH_SUFFIXES lib64 lib lib/${SDL2_PROCESSOR_ARCH}
+	PATHS ${SDL2_SEARCH_PATHS}
+)

 IF(NOT SDL2_BUILDING_LIBRARY)
 	IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
@@ -160,39 +105,13 @@
 		# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
 		# seem to provide SDL2main for compatibility even though they don't
 		# necessarily need it.
-		# Lookup the 64 bit libs on x64
-		IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
-			FIND_LIBRARY(SDL2MAIN_LIBRARY
-				NAMES SDL2main
-				HINTS
-				${SDL2}
-				$ENV{SDL2}
-				PATH_SUFFIXES lib64 lib
-				lib/x64
-				x86_64-w64-mingw32/lib
-				PATHS
-				/sw
-				/opt/local
-				/opt/csw
-				/opt
-				)
-			# On 32bit build find the 32bit libs
-		ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
-			FIND_LIBRARY(SDL2MAIN_LIBRARY
-				NAMES SDL2main
-				HINTS
-				${SDL2}
-				$ENV{SDL2}
-				PATH_SUFFIXES lib
-				lib/x86
-				i686-w64-mingw32/lib
-				PATHS
-				/sw
-				/opt/local
-				/opt/csw
-				/opt
-				)
-		ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+		FIND_LIBRARY(SDL2MAIN_LIBRARY
+			NAMES SDL2main
+			HINTS
+			$ENV{SDL2DIR}
+			PATH_SUFFIXES lib64 lib lib/${SDL2_PROCESSOR_ARCH}
+			PATHS ${SDL2_SEARCH_PATHS}
+		)
 	ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
 ENDIF(NOT SDL2_BUILDING_LIBRARY)

@@ -211,46 +130,42 @@
 	SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
 ENDIF(MINGW)

-SET(SDL2_FOUND "NO")
-	IF(SDL2_LIBRARY_TEMP)
-		# For SDL2main
-		IF(NOT SDL2_BUILDING_LIBRARY)
-			IF(SDL2MAIN_LIBRARY)
-				SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
-			ENDIF(SDL2MAIN_LIBRARY)
-		ENDIF(NOT SDL2_BUILDING_LIBRARY)
+IF(SDL2_LIBRARY_TEMP)
+	# For SDL2main
+	IF(NOT SDL2_BUILDING_LIBRARY)
+		IF(SDL2MAIN_LIBRARY)
+			SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
+		ENDIF(SDL2MAIN_LIBRARY)
+	ENDIF(NOT SDL2_BUILDING_LIBRARY)

-		# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
-		# CMake doesn't display the -framework Cocoa string in the UI even
-		# though it actually is there if I modify a pre-used variable.
-		# I think it has something to do with the CACHE STRING.
-		# So I use a temporary variable until the end so I can set the
-		# "real" variable in one-shot.
-		IF(APPLE)
-			SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
-		ENDIF(APPLE)
+	# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
+	# CMake doesn't display the -framework Cocoa string in the UI even
+	# though it actually is there if I modify a pre-used variable.
+	# I think it has something to do with the CACHE STRING.
+	# So I use a temporary variable until the end so I can set the
+	# "real" variable in one-shot.
+	IF(APPLE)
+		SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
+	ENDIF(APPLE)

-		# For threads, as mentioned Apple doesn't need this.
-		# In fact, there seems to be a problem if I used the Threads package
-		# and try using this line, so I'm just skipping it entirely for OS X.
-		IF(NOT APPLE)
-			SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
-		ENDIF(NOT APPLE)
+	# For threads, as mentioned Apple doesn't need this.
+	# In fact, there seems to be a problem if I used the Threads package
+	# and try using this line, so I'm just skipping it entirely for OS X.
+	IF(NOT APPLE)
+		SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
+	ENDIF(NOT APPLE)

-		# For MinGW library
-		IF(MINGW)
-			SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
-		ENDIF(MINGW)
+	# For MinGW library
+	IF(MINGW)
+		SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
+	ENDIF(MINGW)

-		# Set the final string here so the GUI reflects the final state.
-		SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
-		# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
-		SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
-
-		SET(SDL2_FOUND "YES")
+	# Set the final string here so the GUI reflects the final state.
+	SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
+	# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
+	SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
 ENDIF(SDL2_LIBRARY_TEMP)

 INCLUDE(FindPackageHandleStandardArgs)

-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
-
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)


Fix FindgRPC.cmake (#4341)

Fix FindgRPC.cmake (#4341)

--- cmake/FindgRPC.cmake
+++ cmake/FindgRPC.cmake
@@ -4,7 +4,7 @@

 find_package(gRPC CONFIG QUIET)

-if(TARGET gRPC::gRPC)
+if(TARGET grpc::grpc)
   return()
 endif()


Update the list of libraries that llvm11 uses

--- cmake/Findllvm.cmake
+++ cmake/Findllvm.cmake
@@ -174,12 +174,13 @@
   FIND_AND_ADD_LLVM_LIB(LLVMMCA)
   FIND_AND_ADD_LLVM_LIB(LLVMLTO)
   FIND_AND_ADD_LLVM_LIB(LLVMPasses)
+  FIND_AND_ADD_LLVM_LIB(LLVMCoroutines)
   FIND_AND_ADD_LLVM_LIB(LLVMObjCARCOpts)
+  FIND_AND_ADD_LLVM_LIB(LLVMExtensions)
   FIND_AND_ADD_LLVM_LIB(LLVMLineEditor)
   FIND_AND_ADD_LLVM_LIB(LLVMLibDriver)
   FIND_AND_ADD_LLVM_LIB(LLVMInterpreter)
   FIND_AND_ADD_LLVM_LIB(LLVMFuzzMutate)
-  FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenMP)
   FIND_AND_ADD_LLVM_LIB(LLVMMCJIT)
   FIND_AND_ADD_LLVM_LIB(LLVMExecutionEngine)
   FIND_AND_ADD_LLVM_LIB(LLVMRuntimeDyld)
@@ -188,21 +189,14 @@
   FIND_AND_ADD_LLVM_LIB(LLVMOption)
   FIND_AND_ADD_LLVM_LIB(LLVMDebugInfoGSYM)
   FIND_AND_ADD_LLVM_LIB(LLVMCoverage)
-  FIND_AND_ADD_LLVM_LIB(LLVMCoroutines)
-  FIND_AND_ADD_LLVM_LIB(LLVMAVRDisassembler)
-  FIND_AND_ADD_LLVM_LIB(LLVMAVRCodeGen)
-  FIND_AND_ADD_LLVM_LIB(LLVMAVRAsmParser)
-  FIND_AND_ADD_LLVM_LIB(LLVMAVRDesc)
-  FIND_AND_ADD_LLVM_LIB(LLVMAVRInfo)
   FIND_AND_ADD_LLVM_LIB(LLVMXCoreDisassembler)
   FIND_AND_ADD_LLVM_LIB(LLVMXCoreCodeGen)
   FIND_AND_ADD_LLVM_LIB(LLVMXCoreDesc)
   FIND_AND_ADD_LLVM_LIB(LLVMXCoreInfo)
   FIND_AND_ADD_LLVM_LIB(LLVMX86Disassembler)
+  FIND_AND_ADD_LLVM_LIB(LLVMX86CodeGen)
   FIND_AND_ADD_LLVM_LIB(LLVMX86AsmParser)
-  FIND_AND_ADD_LLVM_LIB(LLVMX86CodeGen)
   FIND_AND_ADD_LLVM_LIB(LLVMX86Desc)
-  FIND_AND_ADD_LLVM_LIB(LLVMX86Utils)
   FIND_AND_ADD_LLVM_LIB(LLVMX86Info)
   FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyDisassembler)
   FIND_AND_ADD_LLVM_LIB(LLVMWebAssemblyCodeGen)
@@ -258,6 +252,11 @@
   FIND_AND_ADD_LLVM_LIB(LLVMBPFAsmParser)
   FIND_AND_ADD_LLVM_LIB(LLVMBPFDesc)
   FIND_AND_ADD_LLVM_LIB(LLVMBPFInfo)
+  FIND_AND_ADD_LLVM_LIB(LLVMAVRDisassembler)
+  FIND_AND_ADD_LLVM_LIB(LLVMAVRCodeGen)
+  FIND_AND_ADD_LLVM_LIB(LLVMAVRAsmParser)
+  FIND_AND_ADD_LLVM_LIB(LLVMAVRDesc)
+  FIND_AND_ADD_LLVM_LIB(LLVMAVRInfo)
   FIND_AND_ADD_LLVM_LIB(LLVMARMDisassembler)
   FIND_AND_ADD_LLVM_LIB(LLVMARMCodeGen)
   FIND_AND_ADD_LLVM_LIB(LLVMARMAsmParser)
@@ -273,6 +272,7 @@
   FIND_AND_ADD_LLVM_LIB(LLVMLinker)
   FIND_AND_ADD_LLVM_LIB(LLVMIRReader)
   FIND_AND_ADD_LLVM_LIB(LLVMAsmParser)
+  FIND_AND_ADD_LLVM_LIB(LLVMFrontendOpenMP)
   FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUAsmParser)
   FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUDesc)
   FIND_AND_ADD_LLVM_LIB(LLVMAMDGPUUtils)


Added a description text for the custom viewer.

--- Examples/BlueBerryExampleLauncher/Configurations/CustomViewer.cmake
+++ Examples/BlueBerryExampleLauncher/Configurations/CustomViewer.cmake
@@ -3,3 +3,21 @@
   org.mitk.gui.qt.datamanager
   org.mitk.example.gui.customviewer.views
 )
+
+set(DESCRIPTION
+"The Custom Viewer Example is a BlueBerry example plugin, developed to demonstrate customization capabilities provided by the BlueBerry application framework. The example plugin implements a GUI customized viewer application. The developed viewer incorporates simple viewer functionality embedded in a customized graphical user interface.
+
+

+Spoken in BlueBerry terms, the following features are provided:
+
+

+
 Hidden Menu-, Tool- and Statusbars

+
 Hidden Editor Area

+
 Fixed perspectives

+
 Customized main window contents

+
 Customized perspectives bar based on QTabBar

+
 GUI Customization using Qt-Stylesheets

+

+
+See the main documentation for details."
+)


[Build] Added support for RMOL and AirInv in the CMake framework.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -120,7 +120,11 @@
   if (NOT EXISTS ${DOC_INSTALL_FILE})
     unset (DOC_INSTALL_FILE)
   endif (NOT EXISTS ${DOC_INSTALL_FILE})
-  set (BASICDOC_FILES AUTHORS NEWS README ${DOC_INSTALL_FILE})
+  set (DOC_NEWS_FILE NEWS)
+  if (NOT EXISTS ${DOC_NEWS_FILE})
+    unset (DOC_NEWS_FILE)
+  endif (NOT EXISTS ${DOC_NEWS_FILE})
+  set (BASICDOC_FILES AUTHORS ${DOC_NEWS_FILE} README ${DOC_INSTALL_FILE})
   set (BASICDOC_PATH "share/doc/${PACKAGE}-${PACKAGE_VERSION}")

 endmacro (set_project_options)
@@ -291,9 +295,49 @@
       get_stdair (${_arg_version})
     endif (${_arg_lower} STREQUAL "stdair")

+    if (${_arg_lower} STREQUAL "sevmgr")
+      get_sevmgr (${_arg_version})
+    endif (${_arg_lower} STREQUAL "sevmgr")
+
+    if (${_arg_lower} STREQUAL "trademgen")
+      get_trademgen (${_arg_version})
+    endif (${_arg_lower} STREQUAL "trademgen")
+
+    if (${_arg_lower} STREQUAL "travelccm")
+      get_travelccm (${_arg_version})
+    endif (${_arg_lower} STREQUAL "travelccm")
+
+    if (${_arg_lower} STREQUAL "airsched")
+      get_airsched (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airsched")
+
     if (${_arg_lower} STREQUAL "airrac")
       get_airrac (${_arg_version})
     endif (${_arg_lower} STREQUAL "airrac")
+
+    if (${_arg_lower} STREQUAL "rmol")
+      get_rmol (${_arg_version})
+    endif (${_arg_lower} STREQUAL "rmol")
+
+    if (${_arg_lower} STREQUAL "airinv")
+      get_airinv (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airinv")
+
+    if (${_arg_lower} STREQUAL "avlcal")
+      get_avlcal (${_arg_version})
+    endif (${_arg_lower} STREQUAL "avlcal")
+
+    if (${_arg_lower} STREQUAL "simfqt")
+      get_simfqt (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simfqt")
+
+    if (${_arg_lower} STREQUAL "simlfs")
+      get_simlfs (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simlfs")
+
+    if (${_arg_lower} STREQUAL "simcrs")
+      get_simcrs (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simcrs")

     if (${_arg_lower} STREQUAL "doxygen")
       get_doxygen (${_arg_version})
@@ -577,6 +621,70 @@
   endif (AirRAC_FOUND)

 endmacro (get_airrac)
+
+# ~~~~~~~~~~ RMOL ~~~~~~~~~
+macro (get_rmol)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires RMOL-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires RMOL without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (RMOL ${_required_version} REQUIRED
+	HINTS ${WITH_RMOL_PREFIX})
+  if (RMOL_FOUND)
+    #
+    message (STATUS "Found RMOL version: ${RMOL_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${RMOL_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${RMOL_LIBRARIES})
+
+  else (RMOL_FOUND)
+    set (ERROR_MSG "The RMOL library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_RMOL_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<RMOL install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (RMOL_FOUND)
+
+endmacro (get_rmol)
+
+# ~~~~~~~~~~ Airinv ~~~~~~~~~
+macro (get_airinv)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires Airinv-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires Airinv without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (Airinv ${_required_version} REQUIRED
+	HINTS ${WITH_AIRINV_PREFIX})
+  if (Airinv_FOUND)
+    #
+    message (STATUS "Found Airinv version: ${AIRINV_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AIRINV_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRINV_LIBRARIES})
+
+  else (Airinv_FOUND)
+    set (ERROR_MSG "The Airinv library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRINV_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<Airinv install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (Airinv_FOUND)
+
+endmacro (get_airinv)

 ##############################################
@@ -1572,6 +1680,34 @@
     message (STATUS "  - AIRRAC_INCLUDE_DIRS ........ : ${AIRRAC_INCLUDE_DIRS}")
   endif (AirRAC_FOUND)
 endmacro (display_airrac)
+
+# RMOL
+macro (display_rmol)
+  if (RMOL_FOUND)
+    message (STATUS)
+    message (STATUS "* RMOL:")
+    message (STATUS "  - RMOL_VERSION ............... : ${RMOL_VERSION}")
+    message (STATUS "  - RMOL_BINARY_DIRS ........... : ${RMOL_BINARY_DIRS}")
+    message (STATUS "  - RMOL_EXECUTABLES ........... : ${RMOL_EXECUTABLES}")
+    message (STATUS "  - RMOL_LIBRARY_DIRS .......... : ${RMOL_LIBRARY_DIRS}")
+    message (STATUS "  - RMOL_LIBRARIES ............. : ${RMOL_LIBRARIES}")
+    message (STATUS "  - RMOL_INCLUDE_DIRS .......... : ${RMOL_INCLUDE_DIRS}")
+  endif (RMOL_FOUND)
+endmacro (display_rmol)
+
+# Airinv
+macro (display_airinv)
+  if (Airinv_FOUND)
+    message (STATUS)
+    message (STATUS "* Airinv:")
+    message (STATUS "  - AIRINV_VERSION ............. : ${AIRINV_VERSION}")
+    message (STATUS "  - AIRINV_BINARY_DIRS ......... : ${AIRINV_BINARY_DIRS}")
+    message (STATUS "  - AIRINV_EXECUTABLES ......... : ${AIRINV_EXECUTABLES}")
+    message (STATUS "  - AIRINV_LIBRARY_DIRS ........ : ${AIRINV_LIBRARY_DIRS}")
+    message (STATUS "  - AIRINV_LIBRARIES ........... : ${AIRINV_LIBRARIES}")
+    message (STATUS "  - AIRINV_INCLUDE_DIRS ........ : ${AIRINV_INCLUDE_DIRS}")
+  endif (Airinv_FOUND)
+endmacro (display_airinv)

 ##
 macro (display_status_all_modules)
@@ -1658,6 +1794,8 @@
   display_soci ()
   display_stdair ()
   display_airrac ()
+  display_rmol ()
+  display_airinv ()
   #
   message (STATUS)
   message (STATUS "Change a value with: cmake -D<Variable>=<Value>" )


ENH: The only compulsory ITK IO module is ITKIONRRD

All the other IO modules are optional. It will use the ones it finds.

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -63,46 +63,56 @@
   ITKVTK
   ITKTransform
   ITKIOImageBase
-  ITKIONRRD
+  ITKIOTransformBase
+  ITKIOTransformInsightLegacy
+  ITKIOTransformMatlab
   ITKImageCompare
+  ITKTestKernel
+)
+
+# IO modules: we only load the IO modules that are available with ITK. Because the toolds compiled in this project read and write DWI and DTI,
+# we leave only NRRD as the compulsory module.
+set( ALL_IO
   ITKIOBMP
   ITKIOBioRad
   ITKIOCSV
-#  ITKIODCMTK
+  ITKIODCMTK
   ITKIOGDCM
   ITKIOGE
   ITKIOGIPL
   ITKIOHDF5
   ITKIOIPL
-  ITKIOImageBase
   ITKIOJPEG
   ITKIOLSM
   ITKIOMRC
   ITKIOMesh
   ITKIOMeta
   ITKIONIFTI
-  ITKIONRRD
   ITKIOPNG
   ITKIORAW
   ITKIOSiemens
   ITKIOSpatialObjects
   ITKIOStimulate
   ITKIOTIFF
-  ITKIOTransformBase
   ITKIOTransformHDF5
-  ITKIOTransformInsightLegacy
-  ITKIOTransformMatlab
   ITKIOVTK
   ITKIOXML
-  ITKTestKernel
 )

+list(APPEND LIST_ITK_IO_USED ITKIONRRD )
+foreach( io ${ALL_IO} )
+  list( FIND ITK_MODULES_ENABLED ${io} position )
+  if( ${position} GREATER -1 ) #not found: ${position}==-1
+    list( APPEND LIST_ITK_IO_USED ${io} )
+  endif()
+endforeach()
+
 if( NOT DTIProcess_BUILD_SLICER_EXTENSION )
-  list( APPEND LIST_ITK_COMPONENTS MGHIO )
+  list( APPEND LIST_ITK_IO_USED MGHIO )
 endif()

 find_package(ITK COMPONENTS
-   ${LIST_ITK_COMPONENTS}
+   ${LIST_ITK_COMPONENTS} ${LIST_ITK_IO_USED}
    REQUIRED
    )
 include(${ITK_USE_FILE})


ERR: change rollup to EDT.

ERR: change rollup to EDT.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,6 +1,6 @@
 # Dashboard is opened for submissions for a 24 hour period starting at
 # the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
-SET (NIGHTLY_START_TIME "23:00:00 EST")
+SET (NIGHTLY_START_TIME "23:00:00 EDT")

 # Dart server to submit results (used by client)
 SET (DROP_SITE "public.kitware.com")


ENH: Add support for http submission

ENH: Add support for http submission

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -3,13 +3,21 @@
 SET (NIGHTLY_START_TIME "1:00:00 EDT")

 # Dart server to submit results (used by client)
-SET (DROP_SITE "www.itk.org")
-SET (DROP_LOCATION "/incoming")
-SET (DROP_SITE_USER "ftpuser")
-SET (DROP_SITE_PASSWORD "public")
-SET (DROP_METHOD "ftp")
+IF(NOT DROP_METHOD)
+  SET (DROP_METHOD "ftp")
+ENDIF(NOT DROP_METHOD)
+IF(DROP_METHOD MATCHES http)
+  SET (DROP_SITE "public.kitware.com")
+  SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
+ELSE(DROP_METHOD MATCHES http)
+  SET (DROP_SITE "www.itk.org")
+  SET (DROP_LOCATION "/incoming")
+  SET (DROP_SITE_USER "ftpuser")
+  SET (DROP_SITE_PASSWORD "public")
+ENDIF(DROP_METHOD MATCHES http)
+
 SET (TRIGGER_SITE
-       "http://${DROP_SITE}/cgi-bin/Submit-Insight-TestingResults.pl")
+  "http://${DROP_SITE}/cgi-bin/Submit-Insight-TestingResults.pl")

 # Project Home Page
 SET (PROJECT_URL "http://www.itk.org/")


Win32 compilation

Win32 compilation

--- salome_adm/cmake_files/FindGraphviz.cmake
+++ salome_adm/cmake_files/FindGraphviz.cmake
@@ -34,11 +34,11 @@
 FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/graph.h)
 SET(GRAPHVIZ_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz)

-FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY      NAMES cdt)
-FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY   NAMES cgraph)
-FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY    NAMES graph)
-FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY      NAMES gvc)
-FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan)
+FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY      NAMES cdt PATH_SUFFIXES bin)
+FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY   NAMES cgraph PATH_SUFFIXES bin)
+FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY    NAMES graph PATH_SUFFIXES bin)
+FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY      NAMES gvc PATH_SUFFIXES bin)
+FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan PATH_SUFFIXES bin)

 SET(GRAPHVIZ_LIBRARIES
   ${GRAPHVIZ_cdt_LIBRARY}


[Build] Re-instated the CMake support for Xapian (which had unfortunately disappeared after a Git merge).


Bugfix for OGRE-210 and message for atomic

--HG--
branch : v1-9

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -170,7 +170,7 @@
     find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()

-if(Boost_FOUND)
+if(Boost_FOUND AND NOT WIN32)
   list(REMOVE_DUPLICATES Boost_LIBRARIES)
 endif()

@@ -181,6 +181,9 @@
 if(Boost_VERSION GREATER 104900)
     macro_log_feature(Boost_SYSTEM_FOUND "boost-system" "Used for threading support" "http://boost.org" FALSE "" "")
     macro_log_feature(Boost_CHRONO_FOUND "boost-chrono" "Used for threading support" "http://boost.org" FALSE "" "")
+	if(Boost_VERSION GREATER 105300)
+		macro_log_feature(Boost_ATOMIC_FOUND "boost-atomic" "Used for threading support" "http://boost.org" FALSE "" "")
+	endif()
 endif()

 # POCO


Don't cache {C,CXX} flags, this file is parsed twice, the first time CMAKE_SIZEOF_VOID_P is unset so the variables are set incorrectly.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -204,19 +204,13 @@
     ENDIF()
   ENDIF()

-  SET(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CXXFLAGS}"
-    CACHE STRING "Release type C++ compiler flags")
-  SET(CMAKE_C_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CFLAGS}"
-    CACHE STRING "Release type C compile flags")
-
-  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CXXFLAGS}"
-    CACHE STRING "Default/RelWithDebInfo type C++ compiler flags")
-  SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CFLAGS}"
-    CACHE STRING "Default/RelWithDebInfo type C compiler flags")
-
-  SET(CMAKE_CXX_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CXXFLAGS}"
-    CACHE STRING "Debug type C++ compiler flags")
-  SET(CMAKE_C_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CFLAGS}"
-    CACHE STRING "Debug type C compiler flags")
-
-ENDIF()
+  SET(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CXXFLAGS}")
+  SET(CMAKE_C_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CFLAGS}")
+
+  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CXXFLAGS}")
+  SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CFLAGS}")
+
+  SET(CMAKE_CXX_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CXXFLAGS}")
+  SET(CMAKE_C_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CFLAGS}")
+
+ENDIF()


ENH: Import improved FindMPI module from CMake

--- CMake/FindMPI.cmake
+++ CMake/FindMPI.cmake
@@ -1,95 +1,132 @@
-# This module looks for the Message Passing Interface (MPI).
+# - Message Passing Interface (MPI) module.
+#
+# The Message Passing Interface (MPI) is a library used to write
+# high-performance parallel applications that use message passing, and
+# is typically deployed on a cluster. MPI is a standard interface
+# (defined by the MPI forum) for which many implementations are
+# available. All of these implementations have somewhat different
+# compilation approaches (different include paths, libraries to link
+# against, etc.), and this module tries to smooth out those differences.
 #
 # This module will set the following variables:
 #   MPI_FOUND                  TRUE if we have found MPI
 #   MPI_COMPILE_FLAGS          Compilation flags for MPI programs
-#   MPI_INCLUDE_PATH           Include path for MPI header
+#   MPI_INCLUDE_PATH           Include path(s) for MPI header
 #   MPI_LINK_FLAGS             Linking flags for MPI programs
-#   MPI_LIBRARIES              Libraries to link MPI programs against
-#   MPI_LIBRARY                Deprecated; first MPI library to link against
-#   MPI_EXTRA_LIBRARY          Deprecated; second MPI library to link against
+#   MPI_LIBRARY                First MPI library to link against (cached)
+#   MPI_EXTRA_LIBRARY          Extra MPI libraries to link against (cached)
+#   MPI_LIBRARIES              All libraries to link MPI programs against
 #   MPIEXEC                    Executable for running MPI programs
+#   MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC before giving it the
+#                              number of processors to run on
+#   MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC directly before the
+#                              executable to run.
+#   MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC after all other flags.
 #
 # This module will attempt to auto-detect these settings, first by
-# looking for a C++ MPI driver (e.g., mpic++, mpiCC, or mpicxx; set by
-# MPICXX) and later by checking common MPI paths and library names.
+# looking for a MPI compiler, which many MPI implementations provide
+# as a pass-through to the native compiler to simplify the compilation
+# of MPI programs. The MPI compiler is stored in the cache variable
+# MPI_COMPILER, and will attempt to look for commonly-named drivers
+# mpic++, mpicxx, mpiCC, or mpicc. If the compiler driver is found and
+# recognized, it will be used to set all of the module variables. To
+# skip this auto-detection, set MPI_LIBRARY and MPI_INCLUDE_PATH in
+# the CMake cache.
+#
+# If no compiler driver is found or the compiler driver is not
+# recognized, this module will then search for common include paths
+# and library names to try to detect MPI.
+#
+# If CMake initially finds a different MPI than was intended, and you
+# want to use the MPI compiler auto-detection for a different MPI
+# implementation, set MPI_COMPILER to the MPI compiler driver you want
+# to use (e.g., mpicxx) and then set MPI_LIBRARY to the string
+# MPI_LIBRARY-NOTFOUND. When you re-configure, auto-detection of MPI
+# will run again with the newly-specified MPI_COMPILER.
+#
+# When using MPIEXEC to execute MPI applications, you should typically
+# use all of the MPIEXEC flags as follows:
+#   ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE
+#     ${MPIEXEC_POSTFLAGS} ARGS
+# where PROCS is the number of processors on which to execute the program,
+# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the
+# MPI program.

 # Try to find the MPI driver program
-find_program(MPICXX
-  NAMES mpic++ mpicxx mpiCC
-  DOC "MPI C++ compiler. Used only to detect MPI compilation flags.")
-mark_as_advanced(MPICXX)
+find_program(MPI_COMPILER
+  NAMES mpic++ mpicxx mpiCC mpicc
+  DOC "MPI compiler. Used only to detect MPI compilation flags.")
+mark_as_advanced(MPI_COMPILER)

 find_program(MPIEXEC
-  NAMES mpiexec mpirun
+  NAMES mpiexec mpirun lamexec
   DOC "Executable for running MPI programs.")
-mark_as_advanced(MPIEXEC)
-
-if (NOT OLD_MPICXX STREQUAL MPICXX)
-  set(MPI_FORCE_RECONFIGURE TRUE)
-  set(OLD_MPICXX ${MPICXX} CACHE INTERNAL "Previous value of MPICXX" FORCE)
-endif (NOT OLD_MPICXX STREQUAL MPICXX)
-
-if (NOT MPICXX)
-  # If there is no MPI C++ compiler, we force ourselves to configure
-  # MPI the old way.
-  set(MPI_FORCE_RECONFIGURE TRUE)
-endif (NOT MPICXX)
-
-if (MPICXX)
+
+set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
+set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
+set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.")
+set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.")
+mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS
+  MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)
+
+if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
+  # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
+  # the cache, and we don't want to override those settings.
+elseif (MPI_COMPILER)
   # Check whether the -showme:compile option works. This indicates
   # that we have either Open MPI or a newer version of LAM-MPI, and
   # implies that -showme:link will also work.
-  exec_program(${MPICXX}
+  exec_program(${MPI_COMPILER}
     ARGS -showme:compile
     OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
-    RETURN_VALUE MPICXX_RETURN)
-
-  if (MPICXX_RETURN EQUAL 0)
+    RETURN_VALUE MPI_COMPILER_RETURN)
+
+  if (MPI_COMPILER_RETURN EQUAL 0)
     # If we appear to have -showme:compile, then we should also have
     # -showme:link. Try it.
-    exec_program(${MPICXX}
+    exec_program(${MPI_COMPILER}
       ARGS -showme:link
       OUTPUT_VARIABLE MPI_LINK_CMDLINE
-      RETURN_VALUE MPICXX_RETURN)
-  endif (MPICXX_RETURN EQUAL 0)
-
-  if (MPICXX_RETURN EQUAL 0)
+      RETURN_VALUE MPI_COMPILER_RETURN)
+  endif (MPI_COMPILER_RETURN EQUAL 0)
+
+  if (MPI_COMPILER_RETURN EQUAL 0)
     # Do nothing: we have our command lines now
-  else (MPICXX_RETURN EQUAL 0)
+  else (MPI_COMPILER_RETURN EQUAL 0)
     # Older versions of LAM-MPI have "-showme". Try it.
-    exec_program(${MPICXX}
+    exec_program(${MPI_COMPILER}
       ARGS -showme
       OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
-      RETURN_VALUE MPICXX_RETURN)
-  endif (MPICXX_RETURN EQUAL 0)
-
-  if (MPICXX_RETURN EQUAL 0)
+      RETURN_VALUE MPI_COMPILER_RETURN)
+  endif (MPI_COMPILER_RETURN EQUAL 0)
+
+  if (MPI_COMPILER_RETURN EQUAL 0)
     # Do nothing: we have our command lines now
-  else (MPICXX_RETURN EQUAL 0)
+  else (MPI_COMPILER_RETURN EQUAL 0)
     # MPICH uses "-show". Try it.
-    exec_program(${MPICXX}
+    exec_program(${MPI_COMPILER}
       ARGS -show
       OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
-      RETURN_VALUE MPICXX_RETURN)
-  endif (MPICXX_RETURN EQUAL 0)
-
-  if (MPICXX_RETURN EQUAL 0)
+      RETURN_VALUE MPI_COMPILER_RETURN)
+  endif (MPI_COMPILER_RETURN EQUAL 0)
+
+  if (MPI_COMPILER_RETURN EQUAL 0)
     # We have our command lines, but we might need to copy
     # MPI_COMPILE_CMDLINE into MPI_LINK_CMDLINE, if the underlying
     if (NOT MPI_LINK_CMDLINE)
       SET(MPI_LINK_CMDLINE ${MPI_COMPILE_CMDLINE})
     endif (NOT MPI_LINK_CMDLINE)
-  else (MPICXX_RETURN EQUAL 0)
-    message(STATUS "Unable to determine MPI from MPI driver ${MPICXX}")
-  endif (MPICXX_RETURN EQUAL 0)
-endif (MPICXX)
-
-if (NOT MPI_FORCE_RECONFIGURE)
-  # We don't actually have to reconfigure anything
+  else (MPI_COMPILER_RETURN EQUAL 0)
+    message(STATUS "Unable to determine MPI from MPI driver ${MPI_COMPILER}")
+  endif (MPI_COMPILER_RETURN EQUAL 0)
+endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
+
+if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
+  # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
+  # the cache, and we don't want to override those settings.
 elseif (MPI_COMPILE_CMDLINE)
   # Extract compile flags from the compile command line.
-  string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS ${MPI_COMPILE_CMDLINE})
+  string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
   set(MPI_COMPILE_FLAGS_WORK)
   foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
     if (MPI_COMPILE_FLAGS_WORK)
@@ -100,22 +137,25 @@
   endforeach(FLAG)

   # Extract include paths from compile command line
-  string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS ${MPI_COMPILE_CMDLINE})
-  set(MPI_INCLUDE_PATH)
+  string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
+  set(MPI_INCLUDE_PATH_WORK)
   foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
     string(REGEX REPLACE "^-I" "" IPATH ${IPATH})
     string(REGEX REPLACE "//" "/" IPATH ${IPATH})
-    list(APPEND MPI_INCLUDE_PATH ${IPATH})
+    list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
   endforeach(IPATH)
-
-
+
   # Extract linker paths from the link command line
-  string(REGEX MATCH "-L([^\" ]+|\"[^\"]+\")" MPI_LINK_PATH ${MPI_LINK_CMDLINE})
-  string(REGEX REPLACE "^-L" "" MPI_LINK_PATH ${MPI_LINK_PATH})
-  string(REGEX REPLACE "//" "/" MPI_LINK_PATH ${MPI_LINK_PATH})
+  string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
+  set(MPI_LINK_PATH)
+  foreach(LPATH ${MPI_ALL_LINK_PATHS})
+    string(REGEX REPLACE "^-L" "" LPATH ${LPATH})
+    string(REGEX REPLACE "//" "/" LPATH ${LPATH})
+    list(APPEND MPI_LINK_PATH ${LPATH})
+  endforeach(LPATH)

   # Extract linker flags from the link command line
-  string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS ${MPI_LINK_CMDLINE})
+  string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
   set(MPI_LINK_FLAGS_WORK)
   foreach(FLAG ${MPI_ALL_LINK_FLAGS})
     if (MPI_LINK_FLAGS_WORK)
@@ -127,7 +167,7 @@

   # Extract the set of libraries to link against from the link command
   # line
-  string(REGEX MATCHALL "-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES ${MPI_LINK_CMDLINE})
+  string(REGEX MATCHALL "-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")

   # Determine full path names for all of the libraries that one needs
   # to link against in an MPI program
@@ -148,31 +188,23 @@
   # MPI_EXTRA_LIBRARY.
   list(LENGTH MPI_LIBRARIES MPI_NUMLIBS)
   if (MPI_NUMLIBS GREATER 0)
-    list(GET MPI_LIBRARIES 0 MPI_LIBRARY)
+    list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK)
+    set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE)
   else (MPI_NUMLIBS GREATER 0)
-    set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND")
+    set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE STRING "MPI library to link against" FORCE)
   endif (MPI_NUMLIBS GREATER 0)
   if (MPI_NUMLIBS GREATER 1)
-    set(MPI_EXTRA_LIBRARY ${MPI_LIBRARIES})
-    list(REMOVE_AT MPI_EXTRA_LIBRARY 1)
+    set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES})
+    list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0)
+    set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY_WORK} CACHE STRING "Extra MPI libraries to link against" FORCE)
   else (MPI_NUMLIBS GREATER 1)
-    set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND")
+    set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE)
   endif (MPI_NUMLIBS GREATER 1)

   # Set up all of the appropriate cache entries
-  set(MPI_FOUND TRUE CACHE INTERNAL "Whether MPI was found" FORCE)
-
-  if (NOT MPI_FORCE_RECONFIGURE)
-    set(MPI_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI compilation flags")
-    set(MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH} CACHE STRING "MPI include path")
-    set(MPI_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI linking flags")
-    set(MPI_LIBRARIES ${MPI_LIBRARIES} CACHE STRING "MPI libraries to link against, separated by semicolons")
-  else (NOT MPI_FORCE_RECONFIGURE)
-    set(MPI_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI compilation flags" FORCE)
-    set(MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH} CACHE STRING "MPI include path" FORCE)
-    set(MPI_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI linking flags" FORCE)
-    set(MPI_LIBRARIES ${MPI_LIBRARIES} CACHE STRING "MPI libraries to link against, separated by semicolons" FORCE)
-  endif (NOT MPI_FORCE_RECONFIGURE)
+  set(MPI_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI compilation flags" FORCE)
+  set(MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH_WORK} CACHE STRING "MPI include path" FORCE)
+  set(MPI_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI linking flags" FORCE)
 else (MPI_COMPILE_CMDLINE)
   find_path(MPI_INCLUDE_PATH mpi.h
     /usr/local/include
@@ -180,41 +212,51 @@
     /usr/include/mpi
     /usr/local/mpi/include
     "C:/Program Files/MPICH/SDK/Include"
-    "C:/Program Files/Microsoft Compute Cluster Pack/Include"
+    "$ENV{SystemDrive}/Program Files/MPICH2/include"
+    "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Include"
     )

-  # TODO: How do we know whether we're building 32-bit vs. 64-bit?
+  # TODO: How do we know whether we're building 32-bit vs. 64-bit for MS-MPI?
   find_library(MPI_LIBRARY
     NAMES mpi mpich
     PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
     "C:/Program Files/MPICH/SDK/Lib"
-    "C:/Program Files/Microsoft Compute Cluster Pack/Lib/i386"
+    "$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib"
+    "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/i386"
     )
-
+  find_library(MPI_LIBRARY
+    NAMES mpich2
+    PATHS
+    "$ENV{SystemDrive}/Program Files/MPICH2/Lib")
+
   find_library(MPI_EXTRA_LIBRARY
     NAMES mpi++
     PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
     "C:/Program Files/MPICH/SDK/Lib"
-    "C:/Program Files/Microsoft Compute Cluster Pack/Lib/i386"
-    DOC "If a second MPI library is necessary, specify it here.")
+    DOC "Extra MPI libraries to link against.")

   set(MPI_COMPILE_FLAGS "" CACHE STRING "MPI compilation flags")
   set(MPI_LINK_FLAGS "" CACHE STRING "MPI linking flags")
-
-  if (MPI_EXTRA_LIBRARY)
-    set(MPI_LIBRARIES "${MPI_LIBRARY};${MPI_EXTRA_LIBRARY}" CACHE STRING "MPI libraries to link against, separated by semicolons")
-  else (MPI_EXTRA_LIBRARY)
-    set(MPI_LIBRARIES ${MPI_LIBRARY} CACHE STRING "MPI libraries to link against, separated by semicolons")
-  endif (MPI_EXTRA_LIBRARY)
-
-  if (MPI_LIBRARY)
-    set(MPI_FOUND TRUE CACHE INTERNAL "Whether MPI was found" FORCE)
-  else (MPI_LIBRARY)
-    set(MPI_FOUND FALSE CACHE INTERNAL "Whether MPI was found" FORCE)
-  endif (MPI_LIBRARY)
-endif (NOT MPI_FORCE_RECONFIGURE)
-
-set(MPI_LIBRARY ${MPI_LIBRARY} CACHE INTERNAL "MPI library to link against. Deprecated: use MPI_LIBRARIES instead" FORCE)
-set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY} CACHE INTERNAL "Second MPI library to link against. Deprecated: use MPI_LIBRARIES instead" FORCE)
-
-mark_as_advanced(MPI_INCLUDE_PATH MPI_COMPILE_FLAGS MPI_LINK_FLAGS MPI_LIBRARIES)
+endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
+
+# on BlueGene/L the MPI lib is named libmpich.rts.a, there also these additional libs are required
+if("${MPI_LIBRARY}" MATCHES "mpich.rts")
+   set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY} msglayer.rts devices.rts rts.rts devices.rts)
+   set(MPI_LIBRARY ${MPI_LIBRARY}  msglayer.rts devices.rts rts.rts devices.rts)
+endif("${MPI_LIBRARY}" MATCHES "mpich.rts")
+
+# Set up extra variables to conform to
+if (MPI_EXTRA_LIBRARY)
+  set(MPI_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
+else (MPI_EXTRA_LIBRARY)
+  set(MPI_LIBRARIES ${MPI_LIBRARY})
+endif (MPI_EXTRA_LIBRARY)
+
+if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
+  set(MPI_FOUND TRUE)
+else (MPI_INCLUDE_PATH AND MPI_LIBRARY)
+  set(MPI_FOUND FALSE)
+endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
+
+mark_as_advanced(MPI_INCLUDE_PATH MPI_COMPILE_FLAGS MPI_LINK_FLAGS MPI_LIBRARY
+  MPI_EXTRA_LIBRARY)


CMake project version detection made more robust (#7473)

This fixes two problems:
1. The project could be build when using own tags which does not follow the pattern v<major>.<minor>.<patch>.
2. The case "tag points to the commit" will be handled correctly by setting VERSION_COMMIT to 0.

This commit resolves https://github.com/google/flatbuffers/issues/7472

Co-authored-by: Axel Sommerfeldt <8cccd0c4902e524a5f12de098fe5e96aa9b129cb@gmail.com>

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -14,10 +14,19 @@
   )

   if(GIT_DESCRIBE_RESULT EQUAL 0)
-    string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
-    string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")
-    string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_DESCRIBE_DIRTY}")
-    string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+).*" "\\1" VERSION_COMMIT "${GIT_DESCRIBE_DIRTY}")
+    # Test if the most recent Git tag matches the pattern "v<major>.<minor>.<patch>*"
+    if(GIT_DESCRIBE_DIRTY MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+.*")
+      string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
+      string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")
+      string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_DESCRIBE_DIRTY}")
+      string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+).*" "\\1" VERSION_COMMIT "${GIT_DESCRIBE_DIRTY}")
+      # If the tag points to the commit, then only the tag is shown in "git describe"
+      if(VERSION_COMMIT STREQUAL GIT_DESCRIBE_DIRTY)
+        set(VERSION_COMMIT 0)
+      endif()
+    else()
+      message(WARNING "\"${GIT_DESCRIBE_DIRTY}\" does not match pattern v<major>.<minor>.<patch>-<commit>")
+    endif()
   else()
     message(WARNING "git describe failed with exit code: ${GIT_DESCRIBE_RESULT}")
   endif()


cmake: Simplify passing of RPATH options

Since all project are statically built, these options only make sense
in the context of the inner project.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -95,8 +95,6 @@
 #-----------------------------------------------------------------------------
 list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS
   MAKECOMMAND:STRING
-  CMAKE_SKIP_RPATH:BOOL
-  CMAKE_MACOSX_RPATH:BOOL
   BUILD_SHARED_LIBS:BOOL
   CMAKE_GENERATOR:STRING
   CMAKE_EXTRA_GENERATOR:STRING
@@ -135,6 +133,8 @@
 list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS
   # build-system
   LOCAL_PROJECT_NAME:STRING
+  CMAKE_SKIP_RPATH:BOOL
+  CMAKE_MACOSX_RPATH:BOOL
   # Testing
   CTEST_NEW_FORMAT:BOOL
   MEMORYCHECK_COMMAND_OPTIONS:STRING


Cannot use external Eigen library with Mitk 2016-03

Summary:
A CMake variable export is missing in SuperBuild.cmake, which prevent Mitk to compile with the use of a external (ie system) Eigen library.
{T22603}

Test Plan: Manual testing.

Reviewers: goch

Reviewed By: goch

Subscribers: aurelien

Tags: #mitk

Maniphest Tasks: T22603

Differential Revision: https://phabricator.mitk.org/D38

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -387,6 +387,7 @@
     -DBOOST_ROOT:PATH=${BOOST_ROOT}
     -DBOOST_LIBRARYDIR:PATH=${BOOST_LIBRARYDIR}
     -DMITK_USE_Boost_LIBRARIES:STRING=${MITK_USE_Boost_LIBRARIES}
+    -DEigen_INCLUDE_DIR:PATH=${Eigen_INCLUDE_DIR}
   CMAKE_ARGS
     ${mitk_initial_cache_arg}
     ${MAC_OSX_ARCHITECTURE_ARGS}


testing: build qs extension

testing: build qs extension

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -55,7 +55,7 @@

-option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" USE_SYSTEM_LIBS)
+option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" ON)
 option(USE_SYSTEM_SlicerExecutionModel "Build using an externally defined version of SlicerExecutionModel"  USE_SYSTEM_LIBS)
 option(BUILD_SHARED_LIBS "Build shared libraries" USE_SYSTEM_LIBS)

@@ -63,7 +63,7 @@
 if(NOT ( DEFINED "USE_SYSTEM_ITK") )
   message("--------------------------------FAIL--------------------------------")
 else()
-  message("--------------------------------PASS--------------------------------")
+  message("--------------------------------PASS--------------------------------")          #OK
 endif()

 if(NOT (  "${USE_SYSTEM_ITK}" ) )


CMake: minor: marking HDF5_DIR as advanced variable

--- salome_adm/cmake_files/FindSalomeHDF5.cmake
+++ salome_adm/cmake_files/FindSalomeHDF5.cmake
@@ -28,7 +28,7 @@
 #

 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1)
-MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB)
+MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB HDF5_DIR)

 # Stupidly enough, CONFIG mode and MODULE mode for HDF5 do not return the same thing ...!
 SET(HDF5_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS};${HDF5_INCLUDE_DIR}")


Fix bug in SequoiaEngine configuration

Fix bug in SequoiaEngine configuration

--- cmake/External_SequoiaEngine.cmake
+++ cmake/External_SequoiaEngine.cmake
@@ -34,8 +34,7 @@

 ExternalProject_Add(
   SequoiaEngine
-  SOURCE_DIR "/home/thfabian/Desktop/sequoia/sequoia-engine"
-  BINARY_DIR "${sequoia_engine_build}"
+  SOURCE_DIR "${sequoia_engine_build}"
   INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
   CMAKE_ARGS
     ${sequoia_engine_cmake_args}


- Add extra const to match extern definitions for License symbol

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -81,7 +81,7 @@

     file ( WRITE "${LICENSE_FILE}"
         "namespace Coffee{\n"
-        "  const char* CoffeeLicenseString = \"${LICENSE_DATA}\";\n"
+        "  const char* const CoffeeLicenseString = \"${LICENSE_DATA}\";\n"
         "}" )

     set ( SOURCES_MOD "${LICENSE_FILE};${SOURCES}" )
@@ -194,7 +194,7 @@

     file ( WRITE "${LICENSE_FILE}"
         "namespace Coffee{\n"
-        "  const char* CoffeeLicenseString = \"${LICENSE_DATA}\";\n"
+        "  const char* const CoffeeLicenseString = \"${LICENSE_DATA}\";\n"
         "}" )

     set ( SOURCES_MOD "${LICENSE_FILE};${SOURCES}" )


Allow ITK 4.5.

Allow ITK 4.5.

--- add_dependencies.cmake
+++ add_dependencies.cmake
@@ -30,12 +30,13 @@
 find_package(Boost 1.57.0 COMPONENTS date_time filesystem system serialization REQUIRED)
 include_directories(${Boost_INCLUDE_DIR})

-FIND_PACKAGE (ITK 4.7 REQUIRED)
+FIND_PACKAGE (ITK 4.5 REQUIRED)
 include(${ITK_USE_FILE})
 add_definitions("-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0")
 add_definitions("-DVCL_NEEDS_INLINE_INSTANTIATION=0")

-set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -g -fPIC")
+#  -Wno-unused-local-typedefs is just because of ITK 4.5 with 4.7 it is not necessary any more
+set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -g -fPIC  -Wno-unused-local-typedefs")

 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 #set(CMAKE_AUTORCC ON) needs cmake 3.2.1


BUG: Check for modified headers not needed

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -30,6 +30,7 @@
 # clear the include files
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.h "" )
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.i "" )
+
 foreach ( filter ${GENERATED_FILTER_LIST} )
   file ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.h "#include \"sitk${filter}ImageFilter.h\"\n" )
   file ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.i "%include \"sitk${filter}ImageFilter.h\"\n" )


ARROW-4616: [C++] Log message in BuildUtils as STATUS

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #3691 from xhochy/ARROW-4616 and squashes the following commits:

1a00ab3ff <Uwe L. Korn> ARROW-4616:  Log message in BuildUtils as STATUS

--- cpp/cmake_modules/BuildUtils.cmake
+++ cpp/cmake_modules/BuildUtils.cmake
@@ -37,7 +37,7 @@
       set_target_properties(${AUG_LIB_NAME}
         PROPERTIES INTERFACE_LINK_LIBRARIES "${ARG_DEPS}")
     endif()
-    message("Added static library dependency ${AUG_LIB_NAME}: ${ARG_STATIC_LIB}")
+    message(STATUS "Added static library dependency ${AUG_LIB_NAME}: ${ARG_STATIC_LIB}")

     SET(AUG_LIB_NAME "${LIB_NAME}_shared")
     add_library(${AUG_LIB_NAME} SHARED IMPORTED)
@@ -54,7 +54,7 @@
       set_target_properties(${AUG_LIB_NAME}
         PROPERTIES INTERFACE_LINK_LIBRARIES "${ARG_DEPS}")
     endif()
-    message("Added shared library dependency ${AUG_LIB_NAME}: ${ARG_SHARED_LIB}")
+    message(STATUS "Added shared library dependency ${AUG_LIB_NAME}: ${ARG_SHARED_LIB}")
   elseif(ARG_STATIC_LIB)
     SET(AUG_LIB_NAME "${LIB_NAME}_static")
     add_library(${AUG_LIB_NAME} STATIC IMPORTED)
@@ -64,7 +64,7 @@
       set_target_properties(${AUG_LIB_NAME}
         PROPERTIES INTERFACE_LINK_LIBRARIES "${ARG_DEPS}")
     endif()
-    message("Added static library dependency ${AUG_LIB_NAME}: ${ARG_STATIC_LIB}")
+    message(STATUS "Added static library dependency ${AUG_LIB_NAME}: ${ARG_STATIC_LIB}")
   elseif(ARG_SHARED_LIB)
     SET(AUG_LIB_NAME "${LIB_NAME}_shared")
     add_library(${AUG_LIB_NAME} SHARED IMPORTED)
@@ -77,7 +77,7 @@
         set_target_properties(${AUG_LIB_NAME}
             PROPERTIES IMPORTED_LOCATION "${ARG_SHARED_LIB}")
     endif()
-    message("Added shared library dependency ${AUG_LIB_NAME}: ${ARG_SHARED_LIB}")
+    message(STATUS "Added shared library dependency ${AUG_LIB_NAME}: ${ARG_SHARED_LIB}")
     if(ARG_DEPS)
       set_target_properties(${AUG_LIB_NAME}
         PROPERTIES INTERFACE_LINK_LIBRARIES "${ARG_DEPS}")


Fix typo in check of default template arguments

Call to cxx11_check_feature for default template arguments contains
a typo, resulting in wrong CMake variable getting set. Resolve typo
so that call uses correctly spelt and documentated variable name.

--- CheckCXX11Support/CMake/cmake-cxx11/Modules/CheckCXX11Features.cmake
+++ CheckCXX11Support/CMake/cmake-cxx11/Modules/CheckCXX11Features.cmake
@@ -172,7 +172,7 @@
 cxx11_check_feature("cstdint" HAS_CXX11_CSTDINT_H)
 cxx11_check_feature("cstddef_nullptr_t" HAS_CXX11_CSTDDEF_NULLPTR_T)
 cxx11_check_feature("decltype" HAS_CXX11_DECLTYPE)
-cxx11_check_feature("default_template_arguments" HAS_CXX11_DEFAULT_TEMPLATE_ARGUMETS)
+cxx11_check_feature("default_template_arguments" HAS_CXX11_DEFAULT_TEMPLATE_ARGUMENTS)
 cxx11_check_feature("initializer_list" HAS_CXX11_INITIALIZER_LIST)
 cxx11_check_feature("lambda" HAS_CXX11_LAMBDA)
 cxx11_check_feature("lib_regex" HAS_CXX11_LIB_REGEX)


ENH: improving ASan dashboard

ENH: improving ASan dashboard

--- src/Testing/Dashboard/elxDashboard_LKEB_linux64_clang_Debug.cmake
+++ src/Testing/Dashboard/elxDashboard_LKEB_linux64_clang_Debug.cmake
@@ -25,6 +25,7 @@
 set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
 set( CTEST_DASHBOARD_ROOT "/home/marius/nightly-builds/elastix" )
 set( CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}/bin_debug_clang )
+set( CTEST_MEMORYCHECK_TYPE "AddressSanitizer" )

 # Specify the kind of dashboard to submit
 # default: Nightly


Cmake: when building for Max on the Mac, don't include the version number in the binary/install_name. Additionally, now copy the binaries for the core into a common location that can be easily copied/linked.

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -10,6 +10,8 @@
     	if(APPLE)
         	set_property(TARGET ${PROJECT_NAME}
                      	PROPERTY INSTALL_RPATH "@loader_path/../../../../support;@loader_path")
+			set_property(TARGET ${PROJECT_NAME}
+						 PROPERTY BUILD_WITH_INSTALL_RPATH TRUE)
     	else()
         	set_property(TARGET ${PROJECT_NAME}
                      	PROPERTY INSTALL_RPATH "\$ORIGIN/../support;\$ORIGIN")
@@ -27,12 +29,14 @@
 	endif()

 	# Version
-	set_property(TARGET ${LIBNAME}
-				 PROPERTY VERSION ${Jamoma_VERSION})
-	set_property(TARGET ${LIBNAME}
-				 PROPERTY SOVERSION ${Jamoma_SOVERSION})
-	set_property(TARGET ${LIBNAME} APPEND
-				 PROPERTY COMPATIBLE_INTERFACE_STRING Jamoma_MAJOR_VERSION)
+	if(!BUILD_JAMOMAMAX)
+		set_property(TARGET ${LIBNAME}
+					 PROPERTY VERSION ${Jamoma_VERSION})
+		set_property(TARGET ${LIBNAME}
+					 PROPERTY SOVERSION ${Jamoma_SOVERSION})
+		set_property(TARGET ${LIBNAME} APPEND
+					 PROPERTY COMPATIBLE_INTERFACE_STRING Jamoma_MAJOR_VERSION)
+	endif()

 	# TODO replace with target_include_directories
 	if(APPLE)
@@ -40,6 +44,27 @@
 					 PROPERTY INTERFACE_INCLUDE_DIRECTORIES
 						$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/includes>
 						$<INSTALL_INTERFACE:include>)
+
+
+	if(APPLE)
+		if(BUILD_JAMOMAMAX)
+			ADD_CUSTOM_COMMAND(
+			  TARGET ${LIBNAME}
+			  POST_BUILD
+			  COMMAND ${CMAKE_COMMAND} -E make_directory
+			   ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/support
+			)
+			ADD_CUSTOM_COMMAND(
+			  TARGET ${LIBNAME} #Jamoma::Foundation # for instance
+			  POST_BUILD
+			  COMMAND ${CMAKE_COMMAND} -E copy
+			      ${CMAKE_BINARY_DIR}/JamomaCore/${LIBNAME}/library/${CMAKE_BUILD_TYPE}/libJamoma${LIBNAME}.dylib #* # we have to be careful with .so / .dll
+			      ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/support #/libJamomaFoundation.dylib
+			)
+		endif() # BUILD_JAMOMAMAX
+	endif() # APPLE
+
+
 	else()
 		set_property(TARGET ${LIBNAME} APPEND
 					 PROPERTY INTERFACE_INCLUDE_DIRECTORIES
@@ -99,6 +124,7 @@
 	endif()

   if(BUILD_JAMOMAMAX)
+
     install(TARGETS ${PROJECT_NAME}
         DESTINATION "${JAMOMAMAX_INSTALL_FOLDER}/Jamoma/support/${SUPPORT_FOLDER}"
         COMPONENT JamomaMax)
@@ -154,6 +180,28 @@
 			set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".ttdll")
 		endif()
 	endif()
+
+
+
+	if(APPLE)
+		if(BUILD_JAMOMAMAX)
+			ADD_CUSTOM_COMMAND(
+			  TARGET ${PROJECT_NAME}
+			  POST_BUILD
+			  COMMAND ${CMAKE_COMMAND} -E make_directory
+			   ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/support
+			)
+			ADD_CUSTOM_COMMAND(
+			  TARGET ${PROJECT_NAME} #Jamoma::Foundation # for instance
+			  POST_BUILD
+			  COMMAND ${CMAKE_COMMAND} -E copy
+			      ${CMAKE_BINARY_DIR}/JamomaCore/${JAMOMA_CURRENT_LIBRARY_NAME}/extensions/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/${PROJECT_NAME}.ttdylib #* # we have to be careful with .so / .dll
+			      ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/support #/libJamomaFoundation.dylib
+			)
+		endif() # BUILD_JAMOMAMAX
+	endif() # APPLE
+
+

 	### Tests ###
 	addTestTarget()


Remove debug output from find script

Remove debug output from find script

--- gloperate-config.cmake
+++ gloperate-config.cmake
@@ -91,10 +91,10 @@
     endif()

     # DEBUG
-    message("${LIB_NAME_UPPER}_INCLUDE_DIR     = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
-    message("${LIB_NAME_UPPER}_LIBRARY_RELEASE = ${${LIB_NAME_UPPER}_LIBRARY_RELEASE}")
-    message("${LIB_NAME_UPPER}_LIBRARY_DEBUG   = ${${LIB_NAME_UPPER}_LIBRARY_DEBUG}")
-    message("${LIB_NAME_UPPER}_LIBRARY         = ${${LIB_NAME_UPPER}_LIBRARY}")
+    # message("${LIB_NAME_UPPER}_INCLUDE_DIR     = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
+    # message("${LIB_NAME_UPPER}_LIBRARY_RELEASE = ${${LIB_NAME_UPPER}_LIBRARY_RELEASE}")
+    # message("${LIB_NAME_UPPER}_LIBRARY_DEBUG   = ${${LIB_NAME_UPPER}_LIBRARY_DEBUG}")
+    # message("${LIB_NAME_UPPER}_LIBRARY         = ${${LIB_NAME_UPPER}_LIBRARY}")

     list(APPEND GLOPERATE_INCLUDES ${${LIB_NAME_UPPER}_INCLUDE_DIR})
     list(APPEND GLOPERATE_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})
@@ -111,8 +111,8 @@
 list(APPEND GLOPERATE_LIBRARIES ${GLOBJECTS_LIBRARIES})

 # DEBUG
-message("GLOPERATE_INCLUDES  = ${GLOPERATE_INCLUDES}")
-message("GLOPERATE_LIBRARIES = ${GLOPERATE_LIBRARIES}")
+# message("GLOPERATE_INCLUDES  = ${GLOPERATE_INCLUDES}")
+# message("GLOPERATE_LIBRARIES = ${GLOPERATE_LIBRARIES}")

 find_package_handle_standard_args(GLOPERATE DEFAULT_MSG GLOPERATE_LIBRARIES GLOPERATE_INCLUDES)
 mark_as_advanced(GLOPERATE_FOUND)


Fix linking errors on OSX

Fix linking errors on OSX

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -119,6 +119,7 @@

 IF(APPLE)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
+  SET(CMAKE_CXX_SHLIB_LINK_FLAGS "${CMAKE_CXX_SHLIB_LINK_FLAGS} -multiply_defined suppress")
   IF (VTK_USE_CARBON)
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpascal-strings")
   ENDIF (VTK_USE_CARBON)


linux: install qt plugins and their dependencies

This is actually several interdependent pieces.  First the plugins are
installed to the plugins directory under the install location.  They
have to be there since Qt assumes that ../lib from the plugins directory
is where the libraries are.  Then it installs a qt.conf in bin telling
Qt that its libraries live in ../plugins.  Finally each plugin must be
parsed for dependencies that need to be installed to make sure the
plugins don't have unsatisfied dependencies which will cause tomviz to
crash when trying to load.

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -32,33 +32,74 @@
       -P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)"
   COMPONENT superbuild)

-if (qt_ENABLED AND NOT USE_SYSTEM_qt)
-  install(DIRECTORY
-    # install all qt plugins (including sqllite).
-    # FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
-    # avoid the need for plugins.
-    "${install_location}/plugins/"
-    DESTINATION "lib/tomviz"
-    COMPONENT superbuild
-    PATTERN "*.a" EXCLUDE
-    PATTERN "tomviz-${tomviz_version}" EXCLUDE
-    PATTERN "fontconfig" EXCLUDE
-    PATTERN "*.jar" EXCLUDE
-    PATTERN "*.debug.*" EXCLUDE
-    PATTERN "libboost*" EXCLUDE)
-  install(DIRECTORY "${install_location}/share/appdata"
-    DESTINATION "share"
-    USE_SOURCE_PERMISSIONS
-    COMPONENT superbuild)
-  install(DIRECTORY "${install_location}/share/applications"
-    DESTINATION "share"
-    USE_SOURCE_PERMISSIONS
-    COMPONENT superbuild)
-  install(DIRECTORY "${install_location}/share/icons"
-    DESTINATION "share"
-    USE_SOURCE_PERMISSIONS
-    COMPONENT superbuild)
+if (qt_ENABLED)
+  set(qt_plugins)
+  if (NOT USE_SYSTEM_qt)
+    file(GLOB qt_plugins ${install_location}/plugins/*)
+  else()
+    file(GLOB qt_plugins ${Qt5_DIR}/../../../plugins/*)
+  endif()
+  foreach(plugin ${qt_plugins})
+    if(IS_DIRECTORY ${plugin})
+      install(DIRECTORY ${plugin}
+        DESTINATION "plugins"
+        COMPONENT superbuild
+        PATTERN "*.a" EXCLUDE
+        PATTERN "tomviz-${tomviz_version}" EXCLUDE
+        PATTERN "fontconfig" EXCLUDE
+        PATTERN "*.jar" EXCLUDE
+        PATTERN "*.debug.*" EXCLUDE
+        PATTERN "libboost*" EXCLUDE)
+    endif()
+  endforeach()
+  if (NOT USE_SYSTEM_qt)
+    install(DIRECTORY
+      # install all qt plugins (including sqllite).
+      "${install_location}/plugins/"
+      DESTINATION ""
+      COMPONENT superbuild
+      PATTERN "*.a" EXCLUDE
+      PATTERN "tomviz-${tomviz_version}" EXCLUDE
+      PATTERN "fontconfig" EXCLUDE
+      PATTERN "*.jar" EXCLUDE
+      PATTERN "*.debug.*" EXCLUDE
+      PATTERN "libboost*" EXCLUDE)
+    install(DIRECTORY "${install_location}/share/appdata"
+      DESTINATION "share"
+      USE_SOURCE_PERMISSIONS
+      COMPONENT superbuild)
+    install(DIRECTORY "${install_location}/share/applications"
+      DESTINATION "share"
+      USE_SOURCE_PERMISSIONS
+      COMPONENT superbuild)
+    install(DIRECTORY "${install_location}/share/icons"
+      DESTINATION "share"
+      USE_SOURCE_PERMISSIONS
+      COMPONENT superbuild)
+  endif()
+  install(CODE
+"
+file(WRITE \"\${CMAKE_INSTALL_PREFIX}/bin/qt.conf\"
+\"[Paths]
+Prefix = .
+Plugins = ../plugins
+\")" COMPONENT superbuild)
 endif()
+
+# install dependencies of Qt plugins
+install(CODE
+  "file(GLOB qt_plugins \"\${CMAKE_INSTALL_PREFIX}/plugins/*/*.so\")
+  set(qt_libraries_dir \"${Qt5_DIR}/../../..\")
+  foreach(plugin \${qt_plugins})
+    execute_process(COMMAND
+      ${CMAKE_COMMAND}
+        -Dexecutable:PATH=\${plugin}
+        -Ddependencies_root:PATH=\${qt_libraries_dir}
+        -Dtarget_root:PATH=\${CMAKE_INSTALL_PREFIX}/lib
+        -Dpv_version:STRING=${tomviz_version}
+        -P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)
+  endforeach()"
+  COMPONENT superbuild)

 if(itk_ENABLED)
 install(DIRECTORY "${install_location}/lib/itk"


CMake: Bugfix: Print out the component selection as well

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

--- deal.II/cmake/setup_finalize.cmake
+++ deal.II/cmake/setup_finalize.cmake
@@ -118,6 +118,8 @@
 FOREACH(_var ${_variables})
   IF(_var MATCHES "DEAL_II_WITH")
     LIST(APPEND _features "${_var}")
+  ELSEIF(_var MATCHES "DEAL_II_COMPONENT")
+    LIST(APPEND _components "${_var}")
   ELSEIF(_var MATCHES "(COMPILER|COMPILE_FLAGS|LINK_FLAGS|LIBRARIES|INCLUDE_PATH|INCLUDE_DIRS|LINKER_FLAGS)")
     LIST(APPEND _features_config ${_var})
   ENDIF()
@@ -164,7 +166,7 @@
 FILE(APPEND ${_log}
   "#\n#  Component configuration:\n"
   )
-FOREACH(_var ${_res})
+FOREACH(_var ${_components})
   IF(_var MATCHES "DEAL_II_COMPONENT")
     IF(${${_var}})
       FILE(APPEND ${_log} "#        ${_var}\n")


Check valgrind

Check valgrind

--- cmake/AddTestRunner.cmake
+++ cmake/AddTestRunner.cmake
@@ -50,7 +50,7 @@
         set(TEST_RUNNER ${VALGRIND_COMMAND}
             --tool=memcheck
             --leak-check=full
-            --show-leak-kinds=all
+            --show-reachable=yes
             --errors-for-leak-kinds=all
             --error-exitcode=1
         )


Fix/link to mkl build (#13268)

Fix/link to mkl build (#13268)

* include mkl headers

* add include to mac build

--- cmake/DownloadMKLML.cmake
+++ cmake/DownloadMKLML.cmake
@@ -54,6 +54,7 @@
   set(MKLROOT "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}")

   message(STATUS "Setting MKLROOT path to ${MKLROOT}")
+  include_directories(${MKLROOT}/include)

 elseif(UNIX)
   set(MKL_NAME "mklml_lnx_${MKLML_RELEASE_FILE_SUFFIX}")
@@ -65,8 +66,8 @@
                   "-C" "${CMAKE_CURRENT_BINARY_DIR}/mklml/")

   set(MKLROOT "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}")
-
   message(STATUS "Setting MKLROOT path to ${MKLROOT}")
+  include_directories(${MKLROOT}/include)

 else()
   message(FATAL_ERROR "Wrong platform")


build: gstreamer detection

build: gstreamer detection

fixed build problem on mac

--- cmake/FindGstreamer.cmake
+++ cmake/FindGstreamer.cmake
@@ -1,16 +1,12 @@
-
 include(FindPkgConfig)

 pkg_check_modules(PC_GSTREAMER_0_10 gstreamer-0.10)
 pkg_check_modules(PC_GSTREAMER_PLUGINS_BASE_0_10 gstreamer-plugins-base-0.10)

 if(PC_GSTREAMER_0_10_FOUND AND PC_GSTREAMER_PLUGINS_BASE_0_10_FOUND)
-	set(GSTREAMER_FOUND TRUE)
-endif()
-
-if(GSTREAMER_FOUND)
 	set(GSTREAMER_INCLUDE_DIRS ${PC_GSTREAMER_0_10_INCLUDE_DIRS} ${PC_GSTREAMER_PLUGINS_BASE_0_10_INCLUDE_DIRS})
 	set(GSTREAMER_LIBRARIES ${PC_GSTREAMER_0_10_LIBRARIES} ${PC_GSTREAMER_PLUGINS_BASE_0_10_LIBRARIES})
 endif()

-mark_as_advanced(GSTREAMER_FOUND GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES)
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSTREAMER DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIRS)


Remove deprecated MAC_OS definition

Remove deprecated MAC_OS definition

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -27,7 +27,7 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -g -Wall")

-set(MACOS_COMPILE_DEFS MAC_OS)
+set(MACOS_COMPILE_DEFS)
 set(DEFAULT_COMPILE_DEFS_DEBUG   ${MACOS_COMPILE_DEFS} _DEBUG) # Debug build
 set(DEFAULT_COMPILE_DEFS_RELEASE ${MACOS_COMPILE_DEFS} NDEBUG) # Release build


updated path to gitrev.pl

updated path to gitrev.pl

--- cmake/VersionHelper.cmake
+++ cmake/VersionHelper.cmake
@@ -1,5 +1,5 @@
 execute_process(
-    COMMAND ${CMAKE_SOURCE_DIR}/cmake/gitrev.pl
+    COMMAND ${CMAKE_SOURCE_DIR}/build-common/bin/gitrev.pl
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
     OUTPUT_VARIABLE VERSION_DATA
     ERROR_VARIABLE VERSION_ERR


cmake: qibuild: qi_add_gtest is not like qi_add_test, it create a gtest, so let's call it qi_create_gtest

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -47,7 +47,7 @@
 # \group:SRC sources
 # \group:DEPENDS dependencies to pass to use_lib
 # \group:ARGUMENTS arguments to pass to add_test (to your test program)
-function(qi_add_gtest name)
+function(qi_create_gtest name)
   # Using upstream GtestConfig.cmake is a good idea here:
   # create tests_results folder if it does not exist
   file(MAKE_DIRECTORY "${_TESTS_RESULTS_FOLDER}")


Linker not working. Output files end up pretty much empty, though libraries look good. Checking map output, symbols exist but are all listed at address zero. Missing entry point so being GC'd?

--- lib/nrf52-base.cmake
+++ lib/nrf52-base.cmake
@@ -32,7 +32,8 @@

 # Set compiler flags
 # Common arguments
-set(COMMON_DEFINITIONS "-D${DEVICE} ${OPTIONAL_DEBUG_SYMBOLS}")
+set(COMMON_DEFINITIONS "-D${DEVICE} ${OPTIONAL_DEBUG_SYMBOLS} -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -mfloat-abi=hard -mfpu=fpv4-sp-d16")
+set(COMMON_DEFINITIONS "${COMMON_DEFINITIONS} -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums --specs=nano.specs")
 set(COMMON_DEFINITIONS "${COMMON_DEFINITIONS} -DSWI_DISABLE0 -DSOFTDEVICE_PRESENT -DNRF52 -DBOARD_PCA10036")
 set(COMMON_DEFINITIONS "${COMMON_DEFINITIONS}  -DCONFIG_GPIO_AS_PINRESET -DS132 -DBLE_STACK_SUPPORT_REQD")
 set(DEPFLAGS "-MMD -MP")
@@ -51,16 +52,16 @@
 set(LINKER_SCRIPT ${SOFTDEVICE_LD})

 # Build flags
-set(CMAKE_C_FLAGS "-std=gnu99 ${COMMON_DEFINITIONS} -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums --specs=nano.specs ${DEPFLAGS}")
-set(CMAKE_CXX_FLAGS "${COMMON_DEFINITIONS} ${CPU_FIX} ${DEPFLAGS}")
+set(CMAKE_C_FLAGS "-std=gnu99 ${COMMON_DEFINITIONS} ${DEPFLAGS}")
+set(CMAKE_CXX_FLAGS "${COMMON_DEFINITIONS} ${DEPFLAGS}")
 set(CMAKE_ASM_FLAGS "${COMMON_DEFINITIONS} -x assembler-with-cpp")
-set(CMAKE_EXE_LINKER_FLAGS "${COMMON_DEFINITIONS} -Xlinker -T${LINKER_SCRIPT} -mthumb -mabi=aapcs -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -lc -lnosys -Wl,-Map=${CMAKE_PROJECT_NAME}.map -Wl,--gc-sections")
+set(CMAKE_EXE_LINKER_FLAGS "-Xlinker -T${LINKER_SCRIPT} -lc -lnosys -Wl,-Map=${CMAKE_PROJECT_NAME}.map -Wl,--gc-sections")

 # Set default inclusions
 set(LIBS -lgcc -lc -lnosys ${LIBS})

 # Debug Flags
-set(COMMON_DEBUG_FLAGS "-O0 -g -gdwarf-2")
+set(COMMON_DEBUG_FLAGS "-O0 -g -gdwarf-2 -DDEBUG=1")
 set(CMAKE_C_FLAGS_DEBUG   "${COMMON_DEBUG_FLAGS}")
 set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_DEBUG_FLAGS}")
 set(CMAKE_ASM_FLAGS_DEBUG "${COMMON_DEBUG_FLAGS}")


Bugfix

Bugfix

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

--- tests/cmake/macros/macro_pickup_tests.cmake
+++ tests/cmake/macros/macro_pickup_tests.cmake
@@ -40,7 +40,7 @@
     # Respect TEST_PICKUP_REGEX:
     #
     IF( "${TEST_PICKUP_REGEX}" STREQUAL "" OR
-        _test MATCHES "${TEST_PICKUP_REGEX}" )
+        "${_category}/${_test}" MATCHES "${TEST_PICKUP_REGEX}" )
       SET(_define_test TRUE)
     ELSE()
       SET(_define_test FALSE)


Revert "Updated boost compute version tags"

This reverts commit b6d8e2d85c358f9d2be69bd09fb8b64bda9fcc04.

This commit was causing performance drops on certain hardware

--- CMakeModules/build_boost_compute.cmake
+++ CMakeModules/build_boost_compute.cmake
@@ -1,6 +1,6 @@
-SET(VER cf5e40ee265f005b144c4e0dda945734188e8542)
+SET(VER 79aa8f9086fdf6ef6db78e889de0273b0eb7bd19)
 SET(URL https://github.com/boostorg/compute/archive/${VER}.tar.gz)
-SET(MD5 a8d0bc4d70f3b7d65fea78327a4e067e)
+SET(MD5 dba3318cbdac912dddce71f2a38ffa43)

 SET(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 SET(srcDir "${thirdPartyDir}/compute-${VER}")


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

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


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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2012)

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

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


Add option to install python package with different name

Name of python package differs when installing through pip and when actually using.

--- scripts/PythonPackageLookup.cmake
+++ scripts/PythonPackageLookup.cmake
@@ -29,16 +29,19 @@
 endfunction()

 function(lookup_python_package package)
-    cmake_parse_arguments(lpp "QUIET;REQUIRED" "VERSION;PATH" "" ${ARGN})
+    cmake_parse_arguments(lpp "QUIET;REQUIRED" "VERSION;PATH;PIPNAME" "" ${ARGN})
     _python_executable(LOCALPYTHON ${lpp_UNPARSED_ARGUMENTS})
     if(NOT lpp_PATH)
         set(lpp_PATH "${EXTERNAL_ROOT}/python")
     endif()
     set(arguments "")
+    if(NOT lpp_PIPNAME)
+      set(lpp_PIPNAME ${package})
+    endif()
     set(package_install_name "${package}")
     if(lpp_VERSION)
         list(APPEND arguments VERSION ${lpp_VERSION})
-        set(package_install_name "${package}==${lpp_VERSION}")
+        set(package_install_name "${lpp_PACKAGE}==${lpp_VERSION}")
     endif()
     if(lpp_QUIET)
         list(APPEND arguments QUIET)
@@ -67,7 +70,7 @@
         file(MAKE_DIRECTORY "${lpp_PATH}")
     endif()
     _lpp_check_is_syspath("${LOCALPYTHON}" "${lpp_PATH}")
-    file(WRITE "${EXTERNAL_ROOT}/install_${package}.py"
+    file(WRITE "${EXTERNAL_ROOT}/install_${lpp_PIPNAME}.py"
         "from os import environ\n"
         "if 'PYTHONPATH' not in environ:\n"
         "    environ['PYTHONPATH'] = '${lpp_PATH}'\n"


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -762,6 +762,35 @@
 ENDMACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT)

 #########################################################################
+# SALOME_GENERATE_TESTS_ENVIRONMENT()
+#
+# USAGE: SALOME_GENERATE_TESTS_ENVIRONMENT(output)
+#
+# ARGUMENTS:
+#   output [out] output environement variable.
+#
+# This macro generates <output> variable to use given environment to run some tests.
+# Macro generates environement variable using previously created variables
+# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and
+# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);
+# and puts this variable into <output> argument.
+#
+MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output)
+  SET(_env)
+  FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
+    FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
+      IF(WIN32)
+        SET(_env "${_val};${_env}")
+      ELSE()
+        SET(_env "${_val}:${_env}")
+      ENDIF()
+    ENDFOREACH()
+    SET(_env " ${_item}=${_env}")
+  ENDFOREACH()
+  SET(${output} ${_env})
+ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT)
+
+#########################################################################
 # SALOME_APPEND_LIST_OF_LIST()
 #
 # USAGE: SALOME_APPEND_LIST_OF_LIST(result element_list)


CMake: Improve error message

CMake: Improve error message

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

--- deal.II/cmake/macros/macro_configure_feature.cmake
+++ deal.II/cmake/macros/macro_configure_feature.cmake
@@ -100,14 +100,15 @@
       )
   ELSE()
     SET(_hint_snippet
-      "or set the relevant variables by hand in ccmake."
+      " or set the relevant variables by hand in ccmake."
       )
   ENDIF()

   IF(FEATURE_${_feature}_HAVE_BUNDLED)
     SET(_bundled_snippet
-      "\n\nAlternatively you may choose to compile the bundled library of
-${_feature_lowercase} by setting DEAL_II_ALLOW_BUNDLED=on or\nDEAL_II_FORCE_BUNDLED_${_feature}=on.\n"
+      "\nAlternatively you may choose to compile the bundled library of "
+      "${_feature_lowercase} by setting DEAL_II_ALLOW_BUNDLED=on or "
+      "DEAL_II_FORCE_BUNDLED_${_feature}=on.\n"
       )
   ELSE()
     SET(_bundled_snippet "\n")
@@ -117,7 +118,7 @@
     "Could not find the ${_feature_lowercase} library!\n"
     ${${_feature}_ADDITIONAL_ERROR_STRING}
     "Please ensure that a suitable ${_feature_lowercase} library is installed on your computer.\n"
-    "If the library is not at a default location, either provide some hints\n"
+    "If the library is not at a default location, either provide some hints "
     "for autodetection,${_hint_snippet}${_bundled_snippet}"
     )
 ENDMACRO()
@@ -156,8 +157,8 @@
     STRING(REGEX REPLACE "^DEAL_II_WITH_" "" _dependency ${_dependency})
     IF(NOT FEATURE_${_dependency}_PROCESSED)
       MESSAGE(FATAL_ERROR "\n"
-        "Internal build system error:\nDEAL_II_WITH_${_feature} depends on "
-        "DEAL_II_WITH_${_dependency},\nbut CONFIGURE_FEATURE(${_feature}) "
+        "Internal build system error: DEAL_II_WITH_${_feature} depends on "
+        "DEAL_II_WITH_${_dependency}, but CONFIGURE_FEATURE(${_feature}) "
         "was called before CONFIGURE_FEATURE(${_dependency}).\n\n"
         )
     ENDIF()


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -25,6 +25,7 @@
 Name[nb]=Lynmelding
 Name[nds]=Kortnarichten
 Name[nl]=Instant Messaging
+Name[nn]=Lynmeldingar
 Name[pl]=Komunikator internetowy
 Name[pt]=Mensagens Instantâneas
 Name[pt_BR]=Mensagens instantâneas
@@ -68,6 +69,7 @@
 Comment[nb]=Start en prat med en av dine LM-kontakter eller endre din LM-status
 Comment[nds]=En Klöönsnack mit een vun Dien KM-Kontakten starten oder Dien KN-Status ännern
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
+Comment[nn]=Start ein prat med ein lynmeldingskontaktane dine eller endra din lynmeldingsstatus
 Comment[pl]=Rozpocznij rozmowę z którymkolwiek z twoich kontaktów lub zmień swoja dostępność
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI ou mudar o seu estado
 Comment[pt_BR]=Inicia uma conversa com um dos seus contatos de MI ou altera o seu status


Split off 7.10.8

Split off 7.10.8

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 10 )
-set ( HPCC_POINT 7 )
+set ( HPCC_POINT 9 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.14

Split off 7.12.14

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 13 )
+set ( HPCC_POINT 15 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


build: inform the build of what generates version.h

Without this, Ninja requires a two-step process because it doesn't know
what generates version.h it sees from its depfile support and when it
changes in one run, it has already pruned the dependent nodes from its
internal graph and requires a second run to catch it.

--- version.cmake
+++ version.cmake
@@ -11,12 +11,22 @@
   write_static_version_header("release")
 elseif (GIT_FOUND OR Git_FOUND)
   message(STATUS "Found Git: ${GIT_EXECUTABLE}")
-  add_custom_target(version ALL
+  set(extra_output)
+  if (CMAKE_GENERATOR MATCHES "Ninja")
+    # Ninja will not rerun the command every time if the file doesn't change,
+    # so inject this bogus output so that it always runs.
+    set(extra_output "${CMAKE_SOURCE_DIR}/.force-git-version-check")
+  endif ()
+  add_custom_command(
+    OUTPUT            "${CMAKE_BINARY_DIR}/version/version.h"
+                      ${extra_output}
     COMMAND           "${CMAKE_COMMAND}"
                       "-D" "GIT=${GIT_EXECUTABLE}"
                       "-D" "TO=${CMAKE_BINARY_DIR}/version/version.h"
                       "-P" "src/version.cmake"
     WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
+  add_custom_target(version ALL
+    DEPENDS "${CMAKE_BINARY_DIR}/version/version.h")
 else()
   message(STATUS "WARNING: Git was not found!")
   write_static_version_header("unknown")


Split off 7.6.36

Split off 7.6.36

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 6 )
-set ( HPCC_POINT 35 )
+set ( HPCC_POINT 37 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.6.20

Split off 7.6.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 7 )
 set ( HPCC_MINOR 6 )
-set ( HPCC_POINT 19 )
+set ( HPCC_POINT 21 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Fix typos.

svn path=/trunk/; revision=6850

--- cmake/modules/TestBrokenIsnanCXX.cmake
+++ cmake/modules/TestBrokenIsnanCXX.cmake
@@ -29,16 +29,16 @@
   IF (CMAKE_BROKEN_ISNAN_CXX)
     MESSAGE(STATUS "Check for isnan in <cmath> - found")
     SET (BROKEN_ISNAN_CXX 0 CACHE INTERNAL
-      "Does <cmake> contain isnan")
+      "Does <cmath> contain isnan")
       FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
       "Determining if <cmake> contains isnan with "
       "the following output:\n${OUTPUT}\n\n")
   ELSE (CMAKE_BROKEN_ISNAN_CXX)
     MESSAGE(STATUS "Check for isnan in <cmath> - not found")
     SET (BROKEN_ISNAN_CXX 1 CACHE INTERNAL
-      "Does <cmake> contain isnan")
+      "Does <cmath> contain isnan")
       FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
-      "Determining if <cmake> contains isnan with "
+      "Determining if <cmath> contains isnan with "
       "the following output:\n${OUTPUT}\n\n")
   ENDIF (CMAKE_BROKEN_ISNAN_CXX)
 ENDIF("CMAKE_BROKEN_ISNAN_CXX" MATCHES "^CMAKE_BROKEN_ISNAN_CXX$")


added debug options

added debug options

--- cmake/DefaultConfigTypes.cmake
+++ cmake/DefaultConfigTypes.cmake
@@ -4,10 +4,10 @@
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release)
 endif()

-set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -pedantic -O2")
-set(CMAKE_C_FLAGS_RELEASE "-O2")
-set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -pedantic -g")
-set(CMAKE_C_FLAGS_DEBUG "-g")
+set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -pedantic -O2 -DNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -pedantic -g  -O0 -DDEBUG -D_DEBUG")
+set(CMAKE_C_FLAGS_DEBUG "-g -O0 -DDEBUG -D_DEBUG")
 # Handle some compile flag options
 option(DEBUG_FLAG_GLIBCXX_DEBUG "use gcc flag -D_GLIBCXX_DEBUG when CMAKE_BUILD_TYPE is Debug" OFF)
 if(DEBUG_FLAG_GLIBCXX_DEBUG)
@@ -17,3 +17,4 @@
 message(STATUS "C++ flags (Debug):${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
 message(STATUS "C flags (Release):${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
 message(STATUS "C flags (Debug):${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
+


cmake/FindWaffle: Fix it on Linux

cmake/FindWaffle: Fix it on Linux

The FindWaffle module never worked on Linux. For WAFFLE_INCLUDE_DIR, it
incorrectly searched for PREFIX/include/waffle.h rather than
PREFIX/include/waffle-1/waffle.h. For WAFFLE_LIBRARY_DIR, it incorrectly
searched for LIBDIR/libwaffle.so rather than LIBDIR/libwaffle-1.so.

Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- cmake/Modules/FindWaffle.cmake
+++ cmake/Modules/FindWaffle.cmake
@@ -34,12 +34,18 @@
 #    WAFFLE_VERSION_STRING  Waffle Version: Major.Minor.Patch
 #

-find_path(WAFFLE_INCLUDE_DIR
-    NAMES waffle.h
+if(NOT DEFINED WAFFLE_FIND_VERSION_MAJOR)
+    set(WAFFLE_FIND_VERSION_MAJOR 1)
+endif()
+
+find_path(WAFFLE_PREFIX_INCLUDE_DIR
+    NAMES "waffle-${WAFFLE_FIND_VERSION_MAJOR}/waffle.h"
 )

+set(WAFFLE_INCLUDE_DIR "${WAFFLE_PREFIX_INCLUDE_DIR}/waffle-${WAFFLE_FIND_VERSION_MAJOR}")
+
 find_library(WAFFLE_LIBRARY
-    NAMES waffle
+    NAMES "waffle-${WAFFLE_FIND_VERSION_MAJOR}"
 )

 if(WAFFLE_INCLUDE_DIR AND EXISTS "${WAFFLE_INCLUDE_DIR}/waffle_version.h")
@@ -56,3 +62,7 @@
 find_package_handle_standard_args(Waffle REQUIRED_VARS WAFFLE_LIBRARY WAFFLE_INCLUDE_DIR VERSION_VAR WAFFLE_VERSION_STRING)

 mark_as_advanced(WAFFLE_LIBRARY WAFFLE_INCLUDE_DIR)
+
+# Don't expose these variables.
+unset(WAFFLE_FIND_VERSION_MAJOR CACHE)
+unset(WAFFLE_PREFIX_INCLUDE_DIR CACHE)


Got gettext working on osx with homebrew

--- cmake/Modules/Gettextize.cmake
+++ cmake/Modules/Gettextize.cmake
@@ -1,19 +1,35 @@
 include(CMakeParseArguments)
+
+###############################################################################
+# homebrew hackery
+###############################################################################
+# homebrew's gettext is keyonly, so we need to append it's path
+if(APPLE)
+	find_program(BREW brew)
+	if(BREW)
+		execute_process(COMMAND ${BREW} --prefix gettext
+		                OUTPUT_VARIABLE GETTEXT_PREFIX
+		                OUTPUT_STRIP_TRAILING_WHITESPACE)
+		if(GETTEXT_PREFIX)
+			set(GETTEXT_PATH "${GETTEXT_PREFIX}/bin")
+		endif(GETTEXT_PREFIX)
+	endif(BREW)
+endif(APPLE)

 ###############################################################################
 # Dependencies
 ###############################################################################
-find_program(XGETTEXT_EXECUTABLE xgettext)
+find_program(XGETTEXT_EXECUTABLE xgettext ${GETTEXT_PATH})
 if(NOT XGETTEXT_EXECUTABLE)
 	message(FATAL_ERROR "Failed to find xgettext")
 endif(NOT XGETTEXT_EXECUTABLE)

-find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
+find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt ${GETTEXT_PATH})
 if(NOT GETTEXT_MSGFMT_EXECUTABLE)
 	message(FATAL_ERROR "Failed to find msgfmt")
 endif(NOT GETTEXT_MSGFMT_EXECUTABLE)

-find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
+find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge ${GETTEXT_PATH})
 if(NOT GETTEXT_MSGMERGE_EXECUTABLE)
 	message(FATAL_ERROR "Failed to find msgmerge")
 endif(NOT GETTEXT_MSGMERGE_EXECUTABLE)


Set empty DLL prefix in SampPlugin.cmake regardless of OS/compiler

--- cmake/Modules/SampPlugin.cmake
+++ cmake/Modules/SampPlugin.cmake
@@ -42,9 +42,7 @@

 add_library(${PLUGIN_TARGET} MODULE ${PLUGIN_SOURCES})

-if(UNIX)
-	set_target_properties(${PLUGIN_TARGET} PROPERTIES PREFIX "")
-endif()
+set_target_properties(${PLUGIN_TARGET} PROPERTIES PREFIX "")

 if(NOT PLUGIN_DEF STREQUAL "")
 	if(MSVC)


cmake: Remove obsolete UseDoxygen.cmake

cmake: Remove obsolete UseDoxygen.cmake

--- cmake/Modules/UseDoxygen.cmake
+++ cmake/Modules/UseDoxygen.cmake
@@ -1,140 +0,0 @@
-# - Run Doxygen
-#
-# Adds a doxygen target that runs doxygen to generate the html
-# and optionally the LaTeX API documentation.
-# The doxygen target is added to the doc target as a dependency.
-# i.e.: the API documentation is built with:
-#  make doc
-#
-# USAGE: GLOBAL INSTALL
-#
-# Install it with:
-#  cmake ./ && sudo make install
-# Add the following to the CMakeLists.txt of your project:
-#  include(UseDoxygen OPTIONAL)
-# Optionally copy Doxyfile.in in the directory of CMakeLists.txt and edit it.
-#
-# USAGE: INCLUDE IN PROJECT
-#
-#  set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
-#  include(UseDoxygen)
-# Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory.
-#
-#
-# CONFIGURATION
-#
-# To configure Doxygen you can edit Doxyfile.in and set some variables in cmake.
-# Variables you may define are:
-#  DOXYFILE_SOURCE_DIR - Path where the Doxygen input files are.
-#  	Defaults to the current source directory.
-#  DOXYFILE_EXTRA_SOURCES - Additional source diretories/files for Doxygen to scan.
-#  	The Paths should be in double quotes and separated by space. e.g.:
-#  	 "${CMAKE_CURRENT_BINARY_DIR}/foo.c" "${CMAKE_CURRENT_BINARY_DIR}/bar/"
-#
-#  DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored.
-#  	Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doc".
-#
-#  DOXYFILE_LATEX - ON/OFF; Set to "ON" if you want the LaTeX documentation
-#  	to be built.
-#  DOXYFILE_LATEX_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
-#  	the Doxygen LaTeX output is stored. Defaults to "latex".
-#
-#  DOXYFILE_HTML_DIR - Directory relative to DOXYFILE_OUTPUT_DIR where
-#  	the Doxygen html output is stored. Defaults to "html".
-#
-
-#
-#  Copyright (c) 2009, 2010, 2011 Tobias Rautenkranz <tobias@rautenkranz.ch>
-#
-#  Redistribution and use is allowed according to the terms of the New
-#  BSD license.
-#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-
-macro(usedoxygen_set_default name value type docstring)
-	if(NOT DEFINED "${name}")
-		set("${name}" "${value}" CACHE "${type}" "${docstring}")
-	endif()
-endmacro()
-
-find_package(Doxygen)
-
-if(DOXYGEN_FOUND)
-	find_file(DOXYFILE_IN "Doxyfile.in"
-			PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/"
-			NO_DEFAULT_PATH
-			DOC "Path to the doxygen configuration template file")
-	set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-	include(FindPackageHandleStandardArgs)
-	find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN")
-endif()
-
-if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND)
-	usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc"
-		PATH "Doxygen output directory")
-	usedoxygen_set_default(DOXYFILE_HTML_DIR "html"
-		STRING "Doxygen HTML output directory")
-	usedoxygen_set_default(DOXYFILE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
-		PATH "Input files source directory")
-	usedoxygen_set_default(DOXYFILE_EXTRA_SOURCE_DIRS ""
-		STRING "Additional source files/directories separated by space")
-	set(DOXYFILE_SOURCE_DIRS "\"${DOXYFILE_SOURCE_DIR}\" ${DOXYFILE_EXTRA_SOURCES}")
-
-	usedoxygen_set_default(DOXYFILE_LATEX YES BOOL "Generate LaTeX API documentation" OFF)
-	usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex" STRING "LaTex output directory")
-
-	mark_as_advanced(DOXYFILE_OUTPUT_DIR DOXYFILE_HTML_DIR DOXYFILE_LATEX_DIR
-		DOXYFILE_SOURCE_DIR DOXYFILE_EXTRA_SOURCE_DIRS DOXYFILE_IN)
-
-
-	set_property(DIRECTORY
-		APPEND PROPERTY
-		ADDITIONAL_MAKE_CLEAN_FILES
-		"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")
-
-	add_custom_target(doxygen
-		COMMAND "${DOXYGEN_EXECUTABLE}"
-			"${DOXYFILE}"
-		COMMENT "Writing documentation to ${DOXYFILE_OUTPUT_DIR}..."
-		WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
-
-	set(DOXYFILE_DOT "NO")
-	if(DOXYGEN_DOT_EXECUTABLE)
-		set(DOXYFILE_DOT "YES")
-	endif()
-
-	## LaTeX
-	set(DOXYFILE_PDFLATEX "NO")
-
-	set_property(DIRECTORY APPEND PROPERTY
-		ADDITIONAL_MAKE_CLEAN_FILES
-		"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
-
-	if(DOXYFILE_LATEX STREQUAL "ON")
-		set(DOXYFILE_GENERATE_LATEX "YES")
-		find_package(LATEX)
-		find_program(DOXYFILE_MAKE make)
-		mark_as_advanced(DOXYFILE_MAKE)
-		if(LATEX_COMPILER AND MAKEINDEX_COMPILER AND DOXYFILE_MAKE)
-			if(PDFLATEX_COMPILER)
-				set(DOXYFILE_PDFLATEX "YES")
-			endif()
-
-			add_custom_command(TARGET doxygen
-				POST_BUILD
-				COMMAND "${DOXYFILE_MAKE}"
-				COMMENT	"Running LaTeX for Doxygen documentation in ${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}..."
-				WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
-		else()
-			set(DOXYGEN_LATEX "NO")
-		endif()
-	else()
-		set(DOXYFILE_GENERATE_LATEX "NO")
-	endif()
-
-
-	configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)
-
-	add_custom_target(doc)
-	add_dependencies(doc doxygen)
-endif()


Fix checking whether 'doc' target exists

-- Generating Doxygen configuration ...
CMake Error at cmake/Modules/UseDoxygen.cmake:139 (get_target_property):
  get_target_property() called with non-existent target "doc".
Call Stack (most recent call first):
  CMakeLists.txt:515 (include)

--- cmake/Modules/UseDoxygen.cmake
+++ cmake/Modules/UseDoxygen.cmake
@@ -136,8 +136,7 @@

 	configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)

-	get_target_property(DOC_TARGET doc TYPE)
-	if(NOT DOC_TARGET)
+	if(NOT TARGET doc)
 		add_custom_target(doc)
 	endif()


Potential fix for ROOT-5745 again (CMake)

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -85,8 +85,8 @@
   execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v
                   ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE)

-  string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ]([0-9]+)\\.[0-9]+.*" "\\2" ICC_MAJOR "${_icc_version_info}")
-  string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ][0-9]+\\.([0-9]+).*" "\\2" ICC_MINOR "${_icc_version_info}")
+  string(REGEX REPLACE "(^V|^icc[ ]v|^icpc[ ]v)ersion[ ]([0-9]+)\\.[0-9]+.*" "\\2" ICC_MAJOR "${_icc_version_info}")
+  string(REGEX REPLACE "(^V|^icc[ ]v|^icpc[ ]v)ersion[ ][0-9]+\\.([0-9]+).*" "\\2" ICC_MINOR "${_icc_version_info}")

   message(STATUS "Found ICC major version ${ICC_MAJOR}")
   message(STATUS "Found ICC minor version ${ICC_MINOR}")


find zmq debug lib

find zmq debug lib

--- cmake_modules/FindZeroMQ.cmake
+++ cmake_modules/FindZeroMQ.cmake
@@ -3,7 +3,9 @@
 #
 #  ZeroMQ_FOUND - system has libzmq
 #  ZeroMQ_INCLUDE_DIRS - the libzmq include directories
-#  ZeroMQ_LIBRARIES - link these to use libzmq
+#  ZeroMQ_LIBRARIES - Libraries to link (may include
+#                     target_link_libraries debug/optimized keywords).
+#                     Link these to use libzmq.

 include(LibFindMacros)

@@ -28,10 +30,19 @@
 	  PATHS ${ZEROMQ_ROOT}/include ${CMAKE_INCLUDE_PATH}
 	)
 	# Finally the library itself
-	find_library(ZeroMQ_LIBRARY
+	find_library(ZeroMQ_LIBRARY_RELEASE
 	  NAMES libzmq
 	  PATHS ${ZEROMQ_ROOT}/lib ${CMAKE_LIB_PATH}
 	)
+	find_library(ZeroMQ_LIBRARY_DEBUG
+	  NAMES libzmq_d
+	  PATHS ${ZEROMQ_ROOT}/lib ${CMAKE_LIB_PATH}
+	)
+	if (ZeroMQ_LIBRARY_RELEASE AND ZeroMQ_LIBRARY_DEBUG)
+	  set(ZeroMQ_LIBRARY optimized ${ZeroMQ_LIBRARY_RELEASE} debug ${ZeroMQ_LIBRARY_DEBUG})
+	else()
+	  set(ZeroMQ_LIBRARY ${ZeroMQ_LIBRARY_RELEASE})
+	endif()
 ENDIF()

 # Set the include dir variables and the libraries and let libfind_process do the rest.


[Build] Fixed a check/test issue with CMake 2.6.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -977,7 +977,8 @@
     endforeach (_module_name)

     # Register all the module (CMake/CTest) test targets at once
-    add_custom_target (check DEPENDS ${_check_target_list})
+    add_custom_target (check)
+    add_dependencies (check ${_check_target_list})

     # Register, for reporting purpose, the list of modules to be tested
     set (PROJ_ALL_MOD_FOR_TST ${_test_suite_dir_list})


[Build] Added support to read the version from the CMake cache.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -139,6 +139,8 @@
 macro (store_in_cache)
   # Force some variables that could be defined in the command line to be
   # written to cache
+  set (PACKAGE_VERSION "${PACKAGE_VERSION}" CACHE STRING
+  "Version of the project/package")
   set (BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}" CACHE BOOL
 	"Set to OFF to build static libraries" FORCE)
   set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH


[Config] Added other versions of Boost.Python

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -606,7 +606,7 @@
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system
-	locale python27 python34 regex)
+	locale python python27 python34 pytthon37 regex)
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
   set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
   set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}


fixes #809 Added sysvconfig to Lenny dep list.

Signed-off-by: Philip Schwartz <90179e62a462019a8b170b5c04a4f0541ad92702@lexisnexis.com>

--- cmake_modules/dependencies/lenny.cmake
+++ cmake_modules/dependencies/lenny.cmake
@@ -1 +1 @@
-set ( CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.34.1, libicu38, libxalan110, libxerces-c28, binutils, libldap-2.4-2, openssl, zlib1g, g++, sudo, openssh-client, openssh-server, expect")
+set ( CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.34.1, libicu38, libxalan110, libxerces-c28, binutils, libldap-2.4-2, openssl, zlib1g, g++, sudo, openssh-client, openssh-server, expect, sysvconfig")