CMakeParseArguments is no longer a module

* cmake_parse_arguments() command is now implemented natively by CMake
* command in module from CMake 3.4 and lower
* https://cmake.org/cmake/help/v3.6/module/CMakeParseArguments.html

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -7,7 +7,6 @@
 # functions create a local scope for variables, macros use the global scope

 set(xpThisDir ${CMAKE_CURRENT_LIST_DIR})
-include(CMakeParseArguments)
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)


enhanced xpTargetExtern: multi-library project support

* LIBS multi value keyword - specify a library or list of libraries
* HEADER_ONLY option - specify that no library should be added to link
* LIBS and HEADER_ONLY should be used in a separate xpTargetExtern call
  where the multi-library project is specified as PUBLIC or PRIVATE

examples:
xpTargetExtern(${lib_name} PUBLIC boost HEADER_ONLY)
xpTargetExtern(${lib_name} PUBLIC boost LIBS Boost::thread)
xpTargetExtern(${test_name} PRIVATE boost LIBS Boost::unit_test_framework)

issue https://github.com/smanders/externpro/issues/236

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1125,7 +1125,11 @@
 function(ipAppendPkgVars pkg _lib _inc _def)
   string(TOUPPER ${pkg} PKG)
   if(${PKG}_FOUND)
-    if(DEFINED ${PKG}_LIBRARIES)
+    if(TE_HEADER_ONLY)
+      set(${_lib} ${${_lib}} PARENT_SCOPE)
+    elseif(DEFINED TE_LIBS)
+      set(${_lib} ${${_lib}} "${TE_LIBS}" PARENT_SCOPE)
+    elseif(DEFINED ${PKG}_LIBRARIES)
       set(${_lib} ${${_lib}} "${${PKG}_LIBRARIES}" PARENT_SCOPE)
     endif()
     if(DEFINED ${PKG}_INCLUDE_DIR)
@@ -1167,8 +1171,8 @@
 endfunction()

 function(xpTargetExtern tgt)
-  set(multiValueArgs PUBLIC PRIVATE)
-  cmake_parse_arguments(TE "" "" "${multiValueArgs}" ${ARGN})
+  set(multiValueArgs PUBLIC PRIVATE LIBS)
+  cmake_parse_arguments(TE HEADER_ONLY "" "${multiValueArgs}" ${ARGN})
   xpFindPkg(PKGS ${TE_PUBLIC} ${TE_PRIVATE})
   foreach(pkg ${TE_PUBLIC})
     ipAppendPkgVars(${pkg} publib pubinc pubdef)


added missing file core/stl/hash-combine.h in cmake

--- src/yuni/cmake/core.cmake
+++ src/yuni/cmake/core.cmake
@@ -287,6 +287,7 @@
 		core/static/typedef.h
 		core/static/types.h
 		core/stl/algorithm.h
+		core/stl/hash-combine.h
 		core/string/escape.h
 		core/string/escape.hxx
 		core/string/iterator.hxx


Fix CMake setup with Octave 5 or later.

Fix CMake setup with Octave 5 or later.

OCTAVE_ROOT_DIR isn't required by TinySpline. Thus, I deleted it from
FindOctave.cmake.

--- src/cmake/FindOctave.cmake
+++ src/cmake/FindOctave.cmake
@@ -1,6 +1,6 @@
 # - Find Octave
-# GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
-# available at http://www.gnu.org/software/octave/
+# GNU Octave is a high-level interpreted language, primarily intended for
+# numerical computations. Available at http://www.gnu.org/software/octave
 #
 # This module defines:
 #  OCTAVE_EXECUTABLE           - octave interpreter
@@ -14,7 +14,6 @@
 #  OCTAVE_PATCH_VERSION        - patch version
 #  OCTAVE_OCT_FILE_DIR         - object files that will be dynamically loaded
 #  OCTAVE_OCT_LIB_DIR          - oct libraries
-#  OCTAVE_ROOT_DIR             - octave prefix
 #

 #=============================================================================
@@ -50,13 +49,6 @@
 )

 if(OCTAVE_CONFIG_EXECUTABLE)
-	execute_process(
-		COMMAND
-			${OCTAVE_CONFIG_EXECUTABLE} -p PREFIX
-			OUTPUT_VARIABLE OCTAVE_ROOT_DIR
-			OUTPUT_STRIP_TRAILING_WHITESPACE
-	)
-
 	execute_process(
 		COMMAND
 			${OCTAVE_CONFIG_EXECUTABLE} -p BINDIR
@@ -170,7 +162,6 @@
 	OCTAVE_LIBRARIES
 	OCTAVE_INCLUDE_DIR
 	OCTAVE_INCLUDE_DIRS
-	OCTAVE_ROOT_DIR
 	OCTAVE_VERSION_STRING
 	OCTAVE_MAJOR_VERSION
 	OCTAVE_MINOR_VERSION
@@ -181,7 +172,6 @@
 find_package_handle_standard_args(Octave
 	REQUIRED_VARS
 		OCTAVE_EXECUTABLE
-		OCTAVE_ROOT_DIR
 		OCTAVE_INCLUDE_DIRS
 		OCTAVE_LIBRARIES
 	VERSION_VAR


Adjust find script to new project structure

--- template-config.cmake
+++ template-config.cmake
@@ -2,77 +2,102 @@
 # TEMPLATE_FOUND
 # TEMPLATE_INCLUDE_DIR

-# TEMPLATE_LIBRARY
-# TEMPLATE_LIBRARY_DEBUG
 # TEMPLATE_LIBRARIES
+# TEMPLATE_INCLUDES
+
+# TEMPLATE_FIBLIB_INCLUDE_DIR
+# TEMPLATE_FIBLIB_LIBRARY
+# TEMPLATE_FIBLIB_LIBRARY_DEBUG
+# TEMPLATE_FIBLIB_LIBRARIES
+
+
+include(FindPackageHandleStandardArgs)

 if(CMAKE_CURRENT_LIST_FILE)
-	get_filename_component(TEMPLATE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+    get_filename_component(TEMPLATE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
 endif()

 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ENVPROGRAMFILES)
 file(TO_CMAKE_PATH "$ENV{TEMPLATE_DIR}" ENVTEMPLATE_DIR)

-find_path(TEMPLATE_INCLUDE_DIR template/template.h
-	${ENVTEMPLATE_DIR}/include
-	${TEMPLATE_DIR}/include
-	${ENVPROGRAMFILES}/template/include
-	/usr/include
-	/usr/local/include
-	/sw/include
-	/opt/local/include
-	DOC "The directory where fiblib/fiblib-api.h resides")
-
-set(LIB_PATHS
-	${TEMPLATE_DIR}/build
-	${TEMPLATE_DIR}/build/Release
-	${TEMPLATE_DIR}/build/Debug
-	${TEMPLATE_DIR}/build-release
-	${TEMPLATE_DIR}/build-debug
-	${ENVTEMPLATE_DIR}/lib
-	${TEMPLATE_DIR}/lib
-	${ENVPROGRAMFILES}/glow/lib
-	/usr/lib
-	/usr/local/lib
-	/sw/lib
-	/opt/local/lib
-	/usr/lib64
-	/usr/local/lib64
-	/sw/lib64
-	/opt/local/lib64
+set(LIB_PATHS
+    ${TEMPLATE_DIR}/build
+    ${TEMPLATE_DIR}/build/Release
+    ${TEMPLATE_DIR}/build/Debug
+    ${TEMPLATE_DIR}/build-release
+    ${TEMPLATE_DIR}/build-debug
+    ${ENVTEMPLATE_DIR}/lib
+    ${TEMPLATE_DIR}/lib
+    ${ENVPROGRAMFILES}/glow/lib
+    /usr/lib
+    /usr/local/lib
+    /sw/lib
+    /opt/local/lib
+    /usr/lib64
+    /usr/local/lib64
+    /sw/lib64
+    /opt/local/lib64
 )

-macro (find LIB_NAME)
-	set(HINT_PATHS ${ARGN})
+macro (find LIB_NAME HEADER)
+    set(HINT_PATHS ${ARGN})

-	if (${LIB_NAME} STREQUAL "template")
-		set(LIB_NAME_UPPER TEMPLATE)
-		set(LIBNAME template)
-	else()
-		string(TOUPPER TEMPLATE_${LIB_NAME} LIB_NAME_UPPER)
-		set(LIBNAME template${LIB_NAME})
-	endif()
+    if (${LIB_NAME} STREQUAL "template")
+        set(LIB_NAME_UPPER TEMPLATE)
+        set(LIBNAME template)
+    else()
+        string(TOUPPER TEMPLATE_${LIB_NAME} LIB_NAME_UPPER)
+        set(LIBNAME ${LIB_NAME})
+    endif()

-	find_library(${LIB_NAME_UPPER}_LIBRARY
-		NAMES ${LIBNAME}
-		PATHS ${HINT_PATHS}
-		DOC "The ${LIB_NAME} library")
-	find_library(${LIB_NAME_UPPER}_LIBRARY_DEBUG
-		NAMES ${LIBNAME}d
-		PATHS ${HINT_PATHS}
-		DOC "The ${LIB_NAME} debug library")
-
-	if(${LIB_NAME_UPPER}_LIBRARY AND ${LIB_NAME_UPPER}_LIBRARY_DEBUG)
-		set(${LIB_NAME_UPPER}_LIBRARIES "optimized" ${${LIB_NAME_UPPER}_LIBRARY} "debug" ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
-	elseif(${LIB_NAME_UPPER}_LIBRARY)
-		set(${LIB_NAME_UPPER}_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})
-	elseif(${LIB_NAME_UPPER}_LIBRARY_DEBUG)
-		set(${LIB_NAME_UPPER}_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
-	endif()
+    find_path(${LIB_NAME_UPPER}_INCLUDE_DIR ${HEADER}
+        ${ENVTEMPLATE_DIR}/include
+        ${ENVTEMPLATE_DIR}/source/${LIB_NAME}/include
+        ${TEMPLATE_DIR}/include
+        ${TEMPLATE_DIR}/source/${LIB_NAME}/include
+        ${ENVPROGRAMFILES}/template/include
+        /usr/include
+        /usr/local/include
+        /sw/include
+        /opt/local/include
+        DOC "The directory where fiblib/fiblib-api.h resides")
+
+    find_library(${LIB_NAME_UPPER}_LIBRARY
+        NAMES ${LIBNAME}
+        PATHS ${HINT_PATHS}
+        DOC "The ${LIB_NAME} library")
+    find_library(${LIB_NAME_UPPER}_LIBRARY_DEBUG
+        NAMES ${LIBNAME}d
+        PATHS ${HINT_PATHS}
+        DOC "The ${LIB_NAME} debug library")
+
+    if(${LIB_NAME_UPPER}_LIBRARY AND ${LIB_NAME_UPPER}_LIBRARY_DEBUG)
+        set(${LIB_NAME_UPPER}_LIBRARIES "optimized" ${${LIB_NAME_UPPER}_LIBRARY} "debug" ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+    elseif(${LIB_NAME_UPPER}_LIBRARY)
+        set(${LIB_NAME_UPPER}_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})
+    elseif(${LIB_NAME_UPPER}_LIBRARY_DEBUG)
+        set(${LIB_NAME_UPPER}_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+    endif()
+
+    set(TEMPLATE_INCLUDES  ${TEMPLATE_INCLUDES}  ${${LIB_NAME_UPPER}_INCLUDE_DIR})
+    set(TEMPLATE_LIBRARIES ${TEMPLATE_LIBRARIES} ${${LIB_NAME_UPPER}_LIBRARIES})
+
+    # DEBUG
+    #message("${LIB_NAME_UPPER}_INCLUDE_DIR   = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
+    #message("${LIB_NAME_UPPER}_LIBRARY       = ${${LIB_NAME_UPPER}_LIBRARY}")
+    #message("${LIB_NAME_UPPER}_LIBRARY_DEBUG = ${${LIB_NAME_UPPER}_LIBRARY_DEBUG}")
+    #message("${LIB_NAME_UPPER}_LIBRARIES     = ${${LIB_NAME_UPPER}_LIBRARIES}")
+
 endmacro()

-find(template ${LIB_PATHS})
-# find(...  ${LIB_PATHS})

-find_package_handle_standard_args(TEMPLATE DEFAULT_MSG TEMPLATE_LIBRARIES TEMPLATE_INCLUDE_DIR)
+# Find libraries
+find(fiblib fiblib/fiblib_api.h ${LIB_PATHS})
+
+
+# DEBUG
+#message("TEMPLATE_INCLUDES  = ${TEMPLATE_INCLUDES}")
+#message("TEMPLATE_LIBRARIES = ${TEMPLATE_LIBRARIES}")
+
+find_package_handle_standard_args(TEMPLATE DEFAULT_MSG TEMPLATE_LIBRARIES TEMPLATE_INCLUDES)
 mark_as_advanced(TEMPLATE_FOUND)


Testing a forced build from a Tomviz tag

--- versions.cmake
+++ versions.cmake
@@ -94,6 +94,8 @@
   "Enable to use existing tomviz source."
   "NOT tomviz_FROM_GIT" OFF)

+# Force to build from a git tag for releases.
+set(tomviz_FROM_GIT ON)
 if (tomviz_FROM_GIT)
   # Download tomviz from GIT
   add_customizable_revision(tomviz


match version config of master

match version config of master

--- version_config.cmake
+++ version_config.cmake
@@ -143,12 +143,6 @@
   set(DEFAULT_CCPi-RGL_TAG origin/master)
   set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
   set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)
-  # For OSX, Gadgetron v3.17.0 doesn't work. So even in devel build, use same version
-  # as for non-devel build
-  if (APPLE)
-    set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed)
-    set(DEFAULT_ISMRMRD_TAG 42d93137cc16c270c8ba065edd2496483161bd21)
-  endif(APPLE)

 else()
   set(DEFAULT_SIRF_TAG origin/add_to_sirf_classes)
@@ -157,21 +151,9 @@
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
   set(DEFAULT_STIR_TAG fd3a7576a11930856d6af50d217f17d4848c2bff)

-  ## Gadgetron
-  set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )
-  #https://github.com/CCPPETMR/gadgetron)
-  set (DEFAULT_Gadgetron_TAG v3.17.0)
-  #set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed )
-  #set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d )
-
   ## siemens_to_ismrmrd
   set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd)
   set(DEFAULT_siemens_to_ismrmrd_TAG ba4773f9cf4bba5f3ccd19930e3548d8273fee01)
-
-  ## ISMRMRD
-  set(DEFAULT_ISMRMRD_URL https://github.com/ismrmrd/ismrmrd )
-  #set(DEFAULT_ISMRMRD_TAG 42d93137cc16c270c8ba065edd2496483161bd21)
-  set (DEFAULT_ISMRMRD_TAG v1.4.0)

   ## petmr-rd-tools
   set(DEFAULT_petmr_rd_tools_URL https://github.com/UCL/petmr-rd-tools )


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -56,6 +56,7 @@
 Comment[el]=Σύστημα υποστήριξης DirectShow9 του Phonon
 Comment[es]=Motor DirectShow9 para Phonon
 Comment[et]=Phononi DirectShow9 taustaprogramm
+Comment[ga]=Inneall DirectShow9 Phonon
 Comment[gl]=Infraestrutura de DirectShow9 para Phonon
 Comment[hu]=Phonon DirectShow9-modul
 Comment[it]=Motore DirectShow9 di Phonon


Split off 7.6.24

Split off 7.6.24

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


Split off 8.6.58

Split off 8.6.58

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

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


[ioninja] release 3.3.1

[ioninja] release 3.3.1

[axl] release 5.3.4
[jancy] release 1.5.1

important bugfixes re automaton functions

--- version.cmake
+++ version.cmake
@@ -1,6 +1,6 @@
 set (VERSION_MAJOR     5)
 set (VERSION_MINOR     3)
-set (VERSION_REVISION  3)
+set (VERSION_REVISION  4)
 set (VERSION_TAG)

 set (VERSION_FILE_SUFFIX "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")


Split off 7.12.46

Split off 7.12.46

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


fix hashbang check test

fix hashbang check test

--- kitchen/kitchen.cmake
+++ kitchen/kitchen.cmake
@@ -37,7 +37,7 @@
   file(GLOB_RECURSE _python_scripts ${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPTDIR}/*.py)
   foreach(file ${_python_scripts})
     add_custom_command(TARGET check_hashbangs
-      COMMAND ${ecto_kitchen_SOURCE_DIR}/util/check_python_script_hashbang.sh ${file}
+      COMMAND ${ecto_kitchen_SOURCE_DIR}/ecto/kitchen/util/check_python_script_hashbang.sh ${file}
       )
   endforeach()
 endmacro()


cmake: Account for IDF_PATH case mismatches on case insensitive filesystems

--- tools/cmake/idf.cmake
+++ tools/cmake/idf.cmake
@@ -1,19 +1,24 @@
 get_property(__idf_env_set GLOBAL PROPERTY __IDF_ENV_SET)
 if(NOT __idf_env_set)
     # Infer an IDF_PATH relative to the tools/cmake directory
-    get_filename_component(_idf_path "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
+    get_filename_component(_idf_path "${CMAKE_CURRENT_LIST_DIR}/../.." REALPATH)
     file(TO_CMAKE_PATH "${_idf_path}" _idf_path)

     # Get the path set in environment
     set(idf_path $ENV{IDF_PATH})
-    file(TO_CMAKE_PATH "${idf_path}" idf_path)

     # Environment IDF_PATH should match the inferred IDF_PATH. If not, warn the user.
+    # (Note: REALPATH is needed in both above steps to account for case on case
+    # insensitive filesystems, or relative paths)
     if(idf_path)
+        get_filename_component(idf_path "${idf_path}" REALPATH)
+        file(TO_CMAKE_PATH "${idf_path}" idf_path)
+
         if(NOT idf_path STREQUAL _idf_path)
             message(WARNING "IDF_PATH environment variable is different from inferred IDF_PATH.
                             Check if your project's top-level CMakeLists.txt includes the right
-                            CMake files. Environment IDF_PATH will be used for the build.")
+                            CMake files. Environment IDF_PATH will be used for the build:
+                            ${idf_path}")
         endif()
     else()
         message(WARNING "IDF_PATH environment variable not found. Setting IDF_PATH to '${_idf_path}'.")
@@ -43,4 +48,4 @@
     __build_init("${idf_path}")

     set_property(GLOBAL PROPERTY __IDF_ENV_SET 1)
-endif()+endif()


From Visual Studio 2017, _MSC_VER is incremented monotonically at every Visual C++ toolset update.

--- modules/SetProgramEnv.cmake
+++ modules/SetProgramEnv.cmake
@@ -59,8 +59,20 @@

 	if(MSVC)
 		#Source: https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-toolset-toolsversion
-		if(MSVC_VERSION GREATER_EQUAL 1910)
-			# VS 2017 or greater
+		if(MSVC_VERSION GREATER_EQUAL 1914)
+			# VS 2017.7 or greater
+			set(MSBUILD_TOOLS_VERSION 15.7)
+		elseif(MSVC_VERSION EQUAL 1913)
+			# VS 2017.6
+			set(MSBUILD_TOOLS_VERSION 15.6)
+		elseif(MSVC_VERSION EQUAL 1912)
+			# VS 2017.5
+			set(MSBUILD_TOOLS_VERSION 15.5)
+		elseif(MSVC_VERSION EQUAL 1911)
+			# VS 2017.3
+			set(MSBUILD_TOOLS_VERSION 15.3)
+		elseif(MSVC_VERSION EQUAL 1910)
+			# VS 2017.0
 			set(MSBUILD_TOOLS_VERSION 15.0)
 		elseif(MSVC_VERSION EQUAL 1900)
 			# VS 2015


Fix synchronization of version in spec and VERSION.cmake

It fixes fail when cmake command is used.

if given arguments:
"DEFINED" "LIBDNF_MAJOR_VERSION" "AND" "NOT" "0" "STREQUAL"
Unknown arguments specified

--- VERSION.cmake
+++ VERSION.cmake
@@ -2,20 +2,26 @@
 set (DEFAULT_LIBDNF_MINOR_VERSION 43)
 set (DEFAULT_LIBDNF_MICRO_VERSION 1)

-if(DEFINED LIBDNF_MAJOR_VERSION AND NOT ${DEFAULT_LIBDNF_MAJOR_VERSION} STREQUAL ${LIBDNF_MAJOR_VERSION})
-  message(FATAL_ERROR "Variable DEFAULT_LIBDNF_MAJOR_VERSION=" ${DEFAULT_LIBDNF_MAJOR_VERSION} " in VERSION.cmake differs from LIBDNF_MAJOR_VERSION=" ${LIBDNF_MAJOR_VERSION} " in spec")
+if(DEFINED LIBDNF_MAJOR_VERSION)
+  if(NOT ${DEFAULT_LIBDNF_MAJOR_VERSION} STREQUAL ${LIBDNF_MAJOR_VERSION})
+    message(FATAL_ERROR "Variable DEFAULT_LIBDNF_MAJOR_VERSION=" ${DEFAULT_LIBDNF_MAJOR_VERSION} " in VERSION.cmake differs from LIBDNF_MAJOR_VERSION=" ${LIBDNF_MAJOR_VERSION} " in spec")
+  endif()
 else()
   set (LIBDNF_MAJOR_VERSION ${DEFAULT_LIBDNF_MAJOR_VERSION})
 endif()

-if(DEFINED LIBDNF_MINOR_VERSION AND NOT ${DEFAULT_LIBDNF_MINOR_VERSION} STREQUAL ${LIBDNF_MINOR_VERSION})
-  message(FATAL_ERROR "Variable DEFAULT_LIBDNF_MINOR_VERSION=" ${DEFAULT_LIBDNF_MINOR_VERSION} " in VERSION.cmake differs from LIBDNF_MINOR_VERSION=" ${LIBDNF_MINOR_VERSION} " in spec")
+if(DEFINED LIBDNF_MINOR_VERSION)
+  if(NOT ${DEFAULT_LIBDNF_MINOR_VERSION} STREQUAL ${LIBDNF_MINOR_VERSION})
+    message(FATAL_ERROR "Variable DEFAULT_LIBDNF_MINOR_VERSION=" ${DEFAULT_LIBDNF_MINOR_VERSION} " in VERSION.cmake differs from LIBDNF_MINOR_VERSION=" ${LIBDNF_MINOR_VERSION} " in spec")
+  endif()
 else()
   set (LIBDNF_MINOR_VERSION ${DEFAULT_LIBDNF_MINOR_VERSION})
 endif()

-if(DEFINED LIBDNF_MICRO_VERSION AND NOT ${DEFAULT_LIBDNF_MICRO_VERSION} STREQUAL ${LIBDNF_MICRO_VERSION})
-  message(FATAL_ERROR "Variable DEFAULT_LIBDNF_MICRO_VERSION=" ${DEFAULT_LIBDNF_MICRO_VERSION} " in VERSION.cmake differs from LIBDNF_MICRO_VERSION=" ${LIBDNF_MICRO_VERSION} " in spec")
+if(DEFINED LIBDNF_MICRO_VERSION)
+  if(NOT ${DEFAULT_LIBDNF_MICRO_VERSION} STREQUAL ${LIBDNF_MICRO_VERSION})
+    message(FATAL_ERROR "Variable DEFAULT_LIBDNF_MICRO_VERSION=" ${DEFAULT_LIBDNF_MICRO_VERSION} " in VERSION.cmake differs from LIBDNF_MICRO_VERSION=" ${LIBDNF_MICRO_VERSION} " in spec")
+  endif()
 else()
   set (LIBDNF_MICRO_VERSION ${DEFAULT_LIBDNF_MICRO_VERSION})
 endif()


trailing whitespace

trailing whitespace

Patch by Matthias Kretz

--- cmake/FindPulseAudio.cmake
+++ cmake/FindPulseAudio.cmake
@@ -34,7 +34,7 @@
    ${PC_PULSEAUDIO_INCLUDE_DIRS}
    )

-FIND_LIBRARY(PULSEAUDIO_LIBRARY NAMES pulse libpulse
+FIND_LIBRARY(PULSEAUDIO_LIBRARY NAMES pulse libpulse
    HINTS
    ${PC_PULSEAUDIO_LIBDIR}
    ${PC_PULSEAUDIO_LIBRARY_DIRS}


Added missing GET_DIRECTORY_PROPERTY

Added missing GET_DIRECTORY_PROPERTY

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -114,6 +114,7 @@
   #
   # Regardless of compiler, we always set the following historical macros
   #
+  GET_DIRECTORY_PROPERTY (_DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
   FOREACH (_definition _REENTRANT _THREAD_SAFE)
     LIST (FIND _DirDefs ${_definition} _index)
     IF (${_index} GREATER -1)


cleanup + sanity checks

cleanup + sanity checks

--- cmake/SetupFunctions.cmake
+++ cmake/SetupFunctions.cmake
@@ -120,6 +120,11 @@
   SET(MARGS SOURCES DEPENDENCIES)
   CMAKE_PARSE_ARGUMENTS(LIB "${OARGS}" "${SARGS}" "${MARGS}" ${ARGN})

+  IF(NOT LIB_SOURCES)
+    MESSAGE(SEND_ERROR "Error: LIBRARY_SETUP() called without any source files")
+    RETURN()
+  ENDIF()
+
   FILE(GLOB_RECURSE PUBHDRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_SOURCE_DIR}/inc/${LIB_NAME}/*.hpp)
   LIST(APPEND LIB_SOURCES ${PUBHDRS})
@@ -143,13 +148,18 @@
   ADD_LIBRARY(${LIB_NAME} ${CMAKE_LIBRARY_TYPE} ${LIB_SOURCES})

   SET_PROPERTY(TARGET ${LIB} PROPERTY FOLDER "Libraries")
+
   SOURCE_GROUP(Source          REGULAR_EXPRESSION ".+\\.cpp")
+  SOURCE_GROUP(Source FILES ${SRC})
   SOURCE_GROUP(Header\\Public  REGULAR_EXPRESSION ".+/inc/${LIB_NAME}/.+\\.(hpp|inl)")
   SOURCE_GROUP(Header\\Private REGULAR_EXPRESSION ".+\\.hpp")

   TARGET_LINK_LIBRARIES(${LIB_NAME} ${LIB_DEPENDENCIES})

-  # INSTALL(TARGETS ${LIB_NAME} DESTINATION ${DCSC08961_LIBRARY_DIRECTORY} COMPONENT runtime)
+  INSTALL(CODE
+    "INSTALL(TARGETS ${LIB_NAME} DESTINATION ${DCSC08961_LIBRARY_DIRECTORY} COMPONENT runtime)")
+  INSTALL(CODE
+    "INSTALL(TARGETS ${PUBHDRS} ${PUBINLS} DESTINATION ${DCSC08961_HEADER_DIRECTORY} COMPONENT development)")
 ENDFUNCTION()

 # TEST_SETUP(PREFIX SOURCES ... [DEPENDENCIES ..] [DEBUG])
@@ -159,6 +169,11 @@
   SET(SARGS)
   SET(MARGS SOURCES DEPENDENCIES)
   CMAKE_PARSE_ARGUMENTS(TST "${OARGS}" "${SARGS}" "${MARGS}" ${ARGN})
+
+  IF(NOT TST_SOURCES)
+    MESSAGE(SEND_ERROR "Error: TEST_SETUP() called without any source files")
+    RETURN()
+  ENDIF()

   IF(TST_DEBUG OR VERBOSE)
     MESSAGE(STATUS "TEST_SETUP(${TST_PREFIX}) variable setup:\n"
@@ -209,10 +224,14 @@
   SET(SARGS)
   SET(MARGS SOURCES DEPENDENCIES)
   CMAKE_PARSE_ARGUMENTS(APP "${OARGS}" "${SARGS}" "${MARGS}" ${ARGN})
-
+
+  IF(NOT APP_SOURCES)
+    MESSAGE(SEND_ERROR "Error: APPLICATION_SETUP() called without any source files")
+    RETURN()
+  ENDIF()
+
   FILE(GLOB_RECURSE PRVHDRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
-
   LIST(APPEND APP_SOURCES ${PRVHDRS})

   SET(APP_NAME "app_${APP_NAME}")
@@ -232,5 +251,6 @@

   TARGET_LINK_LIBRARIES(${APP_NAME} ${APP_DEPENDENCIES})

-  # INSTALL(TARGETS ${APP_NAME} DESTINATION ${DCSC08961_APPLICATION_DIRECTORY} COMPONENT runtime)
-ENDFUNCTION()
+  INSTALL(CODE
+    "INSTALL(TARGETS ${APP_NAME} DESTINATION ${DCSC08961_RUNTIME_DIRECTORY} COMPONENT runtime)")
+ENDFUNCTION()


Add ROS_PACKAGE_NAME define

Add ROS_PACKAGE_NAME define

--- cmake/catkin_project.cmake
+++ cmake/catkin_project.cmake
@@ -37,6 +37,9 @@
   # Default executable output location to "private".
   #
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin PARENT_SCOPE)
+
+  # Add ROS_PACKAGE_NAME define
+  add_definitions(-DROS_PACKAGE_NAME=\"${PROJECT_NAME}\")

   #
   # Versions find_packageable from the buildspace


Determine OCTAVE_M_DIR with string(REPLACE) rather than string(REGEX
REPLACE) which was overkill.

svn path=/trunk/; revision=7311

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -227,7 +227,7 @@
    "${NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION}"
    )
   # Replace the OCTAVE_PREFIX with the PLplot prefix in OCTAVE_M_DIR
-  string(REGEX REPLACE
+  string(REPLACE
   "${OCTAVE_PREFIX}"
   "${CMAKE_INSTALL_PREFIX}"
   OCTAVE_M_DIR


Find MATH_LIB rather than assuming it is available.  This also has the added
benefit of using the full pathname for MATH_LIB which the cvs version of
CMake prefers.

svn path=/trunk/; revision=8303

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -299,7 +299,10 @@
 # On windows systems the math library is not separated so do not specify
 # it unless you are on a non-windows system.
 if(NOT WIN32)
-  set(MATH_LIB m)
+  find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib)
+  if(NOT MATH_LIB)
+    message(FATAL_ERROR "Cannot find required math library")
+  endif(NOT MATH_LIB)
 endif(NOT WIN32)

 # =======================================================================


Scripts: WARN_MODE off by default

Scripts: WARN_MODE off by default

--- cmake/print_warnings.cmake
+++ cmake/print_warnings.cmake
@@ -1,37 +1,31 @@
-IF(NOT DEFINED WARN_MODE)
-  IF(CMAKE_BUILD_TYPE MATCHES "Debug")
-    SET(WARN_MODE "late")
-  ELSE()
-    SET(WARN_MODE "early")
+IF(DEFINED WARN_MODE)
+  IF(NOT WARN_MODE STREQUAL "early" AND
+      NOT WARN_MODE STREQUAL "late" AND
+      NOT WARN_MODE STREQUAL "both")
+    MESSAGE(FATAL_ERROR "Unknown WARN_MODE: expected 'early', 'late' or 'both'")
+  ENDIF()
+
+  SET_DIRECTORY_PROPERTIES(PROPERTIES RULE_LAUNCH_COMPILE
+    "bash ${CMAKE_SOURCE_DIR}/BUILD/capture_warnings.sh ${CMAKE_BINARY_DIR} ${WARN_MODE}")
+  SET_DIRECTORY_PROPERTIES(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
+    "${CMAKE_BINARY_DIR}/compile.warnings")
+  ADD_CUSTOM_TARGET(rm_compile.warnings ALL
+    COMMAND rm -f compile.warnings
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+  ADD_CUSTOM_TARGET(print_warnings ALL
+    COMMAND bash -c '[ -f compile.warnings ] && { echo "Warnings found:" \; cat compile.warnings \; echo "" \; } \; true'
+    DEPENDS mysqld rm_compile.warnings
+    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
+
+  IF(TARGET explain_filename-t)
+    ADD_DEPENDENCIES(print_warnings explain_filename-t)
+  ENDIF()
+
+  IF(TARGET mysql_client_test)
+    ADD_DEPENDENCIES(print_warnings mysql_client_test)
+  ENDIF()
+
+  IF(TARGET udf_example)
+    ADD_DEPENDENCIES(print_warnings udf_example)
   ENDIF()
 ENDIF()
-
-IF(NOT WARN_MODE STREQUAL "early" AND
-    NOT WARN_MODE STREQUAL "late" AND
-    NOT WARN_MODE STREQUAL "both")
-  MESSAGE(FATAL_ERROR "Unknown WARN_MODE: expected 'early', 'late' or 'both'")
-ENDIF()
-
-SET_DIRECTORY_PROPERTIES(PROPERTIES RULE_LAUNCH_COMPILE
-  "bash ${CMAKE_SOURCE_DIR}/BUILD/capture_warnings.sh ${CMAKE_BINARY_DIR} ${WARN_MODE}")
-SET_DIRECTORY_PROPERTIES(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
-  "${CMAKE_BINARY_DIR}/compile.warnings")
-ADD_CUSTOM_TARGET(rm_compile.warnings ALL
-  COMMAND rm -f compile.warnings
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-ADD_CUSTOM_TARGET(print_warnings ALL
-  COMMAND bash -c '[ -f compile.warnings ] && { echo "Warnings found:" \; cat compile.warnings \; echo "" \; } \; true'
-  DEPENDS mysqld rm_compile.warnings
-  WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
-
-IF(TARGET explain_filename-t)
-  ADD_DEPENDENCIES(print_warnings explain_filename-t)
-ENDIF()
-
-IF(TARGET mysql_client_test)
-  ADD_DEPENDENCIES(print_warnings mysql_client_test)
-ENDIF()
-
-IF(TARGET udf_example)
-  ADD_DEPENDENCIES(print_warnings udf_example)
-ENDIF()


Fail when we "force inline" and visual studio bypasses us. (#1025)

--- cmake/simdjson-flags.cmake
+++ cmake/simdjson-flags.cmake
@@ -82,7 +82,7 @@
   target_compile_options(simdjson-internal-flags INTERFACE /W0 /sdl)
 else()
   # Recent version of Visual Studio expected (2017, 2019...). Prior versions are unsupported.
-  target_compile_options(simdjson-internal-flags INTERFACE /WX /W3 /sdl)
+  target_compile_options(simdjson-internal-flags INTERFACE /WX /W3 /sdl /w34714) # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4714?view=vs-2019
 endif()
 else()
   target_compile_options(simdjson-internal-flags INTERFACE -fPIC)


Bump to 0.0.4

Bump to 0.0.4

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "0")
 SET(LIBREPO_MINOR "0")
-SET(LIBREPO_PATCH "3")
+SET(LIBREPO_PATCH "4")


Embree installs into Applications/Embree2 under MacOSX

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -37,10 +37,10 @@
   SET(TUTORIALS_INSTALL_DIR bin)
   SET(UTILITIES_INSTALL_DIR bin)
 ELSEIF (APPLE)
-  SET(DOC_INSTALL_DIR ../../Applications/embree-${EMBREE_VERSION}/documentation)
-  SET(APPLICATION_INSTALL_DIR ../../Applications/embree-${EMBREE_VERSION})
-  SET(TUTORIALS_INSTALL_DIR ../../Applications/embree-${EMBREE_VERSION}/tutorials)
-  SET(UTILITIES_INSTALL_DIR ../../Applications/embree-${EMBREE_VERSION}/tutorials)
+  SET(DOC_INSTALL_DIR ../../Applications/Embree2/documentation)
+  SET(APPLICATION_INSTALL_DIR ../../Applications/Embree2)
+  SET(TUTORIALS_INSTALL_DIR ../../Applications/Embree2/tutorials)
+  SET(UTILITIES_INSTALL_DIR ../../Applications/Embree2/tutorials)
 ELSE()
   SET(DOC_INSTALL_DIR share/doc/embree-${EMBREE_VERSION})
   SET(TUTORIALS_INSTALL_DIR bin/embree-${EMBREE_VERSION})


New version: 0.5.3

New version: 0.5.3

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "5")
-SET(HAWKEY_PATCH "2")
+SET(HAWKEY_PATCH "3")


Enhance Android/CMake toolchain file to support NDK r11 new layout.

--- CMake/Toolchains/android.toolchain.cmake
+++ CMake/Toolchains/android.toolchain.cmake
@@ -84,32 +84,43 @@
 #
 #    ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 - the name of compiler
 #      toolchain to be used. The list of possible values depends on the NDK
-#      version. For NDK r10c the possible values are:
+#      version.
+#
+#      For NDK r11c the possible values are:
 #
 #        * aarch64-linux-android-4.9
-#        * aarch64-linux-android-clang3.4
+#        * aarch64-linux-android-clang3.6 (it is actually Clang 3.8)
+#        * arm-linux-androideabi-4.9 (default)
+#        * arm-linux-androideabi-clang3.6 (it is actually Clang 3.8)
+#        * mips64el-linux-android-4.9
+#        * mips64el-linux-android-clang3.6 (it is actually Clang 3.8)
+#        * mipsel-linux-android-4.9
+#        * mipsel-linux-android-clang3.6 (it is actually Clang 3.8)
+#        * x86-4.9
+#        * x86-clang3.6 (it is actually Clang 3.8)
+#        * x86_64-4.9
+#        * x86_64-clang3.6 (it is actually Clang 3.8)
+#
+#      For NDK r10e the possible values are:
+#
+#        * aarch64-linux-android-4.9
 #        * aarch64-linux-android-clang3.5
-#        * arm-linux-androideabi-4.6
-#        * arm-linux-androideabi-4.8
+#        * aarch64-linux-android-clang3.6
 #        * arm-linux-androideabi-4.9 (default)
-#        * arm-linux-androideabi-clang3.4
 #        * arm-linux-androideabi-clang3.5
+#        * arm-linux-androideabi-clang3.6
 #        * mips64el-linux-android-4.9
-#        * mips64el-linux-android-clang3.4
 #        * mips64el-linux-android-clang3.5
-#        * mipsel-linux-android-4.6
-#        * mipsel-linux-android-4.8
+#        * mips64el-linux-android-clang3.6
 #        * mipsel-linux-android-4.9
-#        * mipsel-linux-android-clang3.4
 #        * mipsel-linux-android-clang3.5
-#        * x86-4.6
-#        * x86-4.8
+#        * mipsel-linux-android-clang3.6
 #        * x86-4.9
-#        * x86-clang3.4
 #        * x86-clang3.5
+#        * x86-clang3.6
 #        * x86_64-4.9
-#        * x86_64-clang3.4
 #        * x86_64-clang3.5
+#        * x86_64-clang3.6
 #
 #    ANDROID_FORCE_ARM_BUILD=OFF - set ON to generate 32-bit ARM instructions
 #      instead of Thumb. Is not available for "armeabi-v6 with VFP"
@@ -154,6 +165,10 @@
 #                          Implies -frtti -fno-exceptions.
 #                          Available for NDK r7b and newer.
 #                          Silently degrades to gnustl_static if not available.
+#        c++_static     -> Use the LLVM libc++ runtime as a static library.
+#                          Implies -frtti -fexceptions.
+#        c++_shared     -> Use the LLVM libc++ runtime as a shared library.
+#                          Implies -frtti -fexceptions.
 #
 #    ANDROID_STL_FORCE_FEATURES=ON - turn rtti and exceptions support based on
 #      chosen runtime. If disabled, then the user is responsible for settings
@@ -426,16 +441,19 @@
  get_filename_component( ANDROID_NDK "${ANDROID_NDK}" ABSOLUTE )
  set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE )
  set( BUILD_WITH_ANDROID_NDK True )
- if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" )
-  file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX "r[0-9]+[a-z]?" )
-  string( REGEX MATCH "r([0-9]+)([a-z]?)" ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" )
+ # Urho3D - major refactoring on how the NDK release and version are being captured
+ if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" )  # Prior to r11
+  file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" __line LIMIT_COUNT 1 REGEX "r[0-9]+[a-z]?" )
+  string( REGEX MATCH "r([0-9]+)([a-z]?)" ANDROID_NDK_RELEASE "${__line}" )
+  string( FIND " abcdefghijklmnopqastuvwxyz" ${CMAKE_MATCH_2} __index )
+  set( ANDROID_NDK_VERSION ${CMAKE_MATCH_1}.${__index}.0 )
+ elseif( EXISTS "${ANDROID_NDK}/source.properties" )    # r11 onward
+  file( STRINGS "${ANDROID_NDK}/source.properties" __line LIMIT_COUNT 1 REGEX "[0-9]+\\.[0-9]+\\.[0-9]+" )
+  string( REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" ANDROID_NDK_VERSION "${__line}" )
+  set( ANDROID_NDK_RELEASE r${ANDROID_NDK_VERSION} )
  else()
-  set( ANDROID_NDK_RELEASE "r1x" )
-  set( ANDROID_NDK_RELEASE_FULL "unreleased" )
- endif()
- string( REGEX REPLACE "r([0-9]+)([a-z]?)" "\\1*1000" ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE}" )
- string( FIND " abcdefghijklmnopqastuvwxyz" "${CMAKE_MATCH_2}" __ndkReleaseLetterNum )
- math( EXPR ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE_NUM}+${__ndkReleaseLetterNum}" )
+  message( FATAL_ERROR "Unrecognized Android NDK release" )
+ endif()
 elseif( ANDROID_STANDALONE_TOOLCHAIN )
  get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE )
  # try to detect change
@@ -466,17 +484,20 @@
 if( BUILD_WITH_ANDROID_NDK )
  if( NOT DEFINED ANDROID_NDK_LAYOUT )
   # try to automatically detect the layout
-  if( EXISTS "${ANDROID_NDK}/RELEASE.TXT")
-   set( ANDROID_NDK_LAYOUT "RELEASE" )
+  if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" )
+   set( ANDROID_NDK_LAYOUT RELEASE )
+  # Urho3D - new NDK layout after r11
+  elseif( EXISTS "${ANDROID_NDK}/source.properties" )
+   set( ANDROID_NDK_LAYOUT RELEASE2 )
   elseif( EXISTS "${ANDROID_NDK}/../../linux-x86/toolchain/" )
-   set( ANDROID_NDK_LAYOUT "LINARO" )
+   set( ANDROID_NDK_LAYOUT LINARO )
   elseif( EXISTS "${ANDROID_NDK}/../../gcc/" )
-   set( ANDROID_NDK_LAYOUT "ANDROID" )
+   set( ANDROID_NDK_LAYOUT ANDROID )
   endif()
  endif()
  set( ANDROID_NDK_LAYOUT "${ANDROID_NDK_LAYOUT}" CACHE STRING "The inner layout of NDK" )
  mark_as_advanced( ANDROID_NDK_LAYOUT )
- if( ANDROID_NDK_LAYOUT STREQUAL "LINARO" )
+ if( ANDROID_NDK_LAYOUT STREQUAL LINARO )
   set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment
   set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../${ANDROID_NDK_HOST_SYSTEM_NAME}/toolchain" )
   set( ANDROID_NDK_TOOLCHAINS_SUBPATH  "" )
@@ -491,6 +512,11 @@
   set( ANDROID_NDK_TOOLCHAINS_SUBPATH  "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" )
   set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME2}" )
  endif()
+ if( ANDROID_NDK_LAYOUT STREQUAL RELEASE2 )
+  set( ANDROID_NDK_TOOLCHAINS_CONFIG_PATH ${ANDROID_NDK}/build/core/toolchains )
+ else()
+  set( ANDROID_NDK_TOOLCHAINS_CONFIG_PATH ${ANDROID_NDK_TOOLCHAINS_PATH} )
+ endif()
  get_filename_component( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK_TOOLCHAINS_PATH}" ABSOLUTE )

  # try to detect change of NDK
@@ -544,12 +570,18 @@
  foreach( __toolchain ${${__availableToolchainsLst}} )
   if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
    SET( __toolchainVersionRegex "^TOOLCHAIN_VERSION[\t ]+:=[\t ]+(.*)$" )
-   FILE( STRINGS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}/setup.mk" __toolchainVersionStr REGEX "${__toolchainVersionRegex}" )
+   FILE( STRINGS "${ANDROID_NDK_TOOLCHAINS_CONFIG_PATH}/${__toolchain}/setup.mk" __toolchainVersionStr REGEX "${__toolchainVersionRegex}" )
    if( __toolchainVersionStr )
     string( REGEX REPLACE "${__toolchainVersionRegex}" "\\1" __toolchainVersionStr "${__toolchainVersionStr}" )
     string( REGEX REPLACE "-clang3[.][0-9]$" "-${__toolchainVersionStr}" __gcc_toolchain "${__toolchain}" )
    else()
-    string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
+    # Urho3D - fallback to use the latest GCC toolchain available
+    foreach( __gcc_ver 4.9 4.8 4.6 )
+     string( REGEX REPLACE -clang3[.][0-9]$ -${__gcc_ver} __gcc_toolchain "${__toolchain}" )
+     if( EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}" )
+      break()
+     endif()
+    endforeach()
    endif()
    unset( __toolchainVersionStr )
    unset( __toolchainVersionRegex )
@@ -594,7 +626,7 @@
  set( __availableToolchainMachines "" )
  set( __availableToolchainArchs "" )
  set( __availableToolchainCompilerVersions "" )
- if( ANDROID_TOOLCHAIN_NAME AND EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_TOOLCHAIN_NAME}/" )
+ if( ANDROID_TOOLCHAIN_NAME AND EXISTS "${ANDROID_NDK_TOOLCHAINS_CONFIG_PATH}/${ANDROID_TOOLCHAIN_NAME}/" )
   # do not go through all toolchains if we know the name
   set( __availableToolchainsLst "${ANDROID_TOOLCHAIN_NAME}" )
   __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
@@ -606,7 +638,7 @@
   endif()
  endif()
  if( NOT __availableToolchains )
-  file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK_TOOLCHAINS_PATH}" "${ANDROID_NDK_TOOLCHAINS_PATH}/*" )
+  file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK_TOOLCHAINS_CONFIG_PATH}" "${ANDROID_NDK_TOOLCHAINS_CONFIG_PATH}/*" )
   # Urho3D: bug fix - remove redundant if check which prevented the sort to take place
   list(SORT __availableToolchainsLst) # we need clang to go after gcc
   __LIST_FILTER( __availableToolchainsLst "^[.]" )
@@ -846,7 +878,7 @@
 mark_as_advanced( ANDROID_STL ANDROID_STL_FORCE_FEATURES )

 if( BUILD_WITH_ANDROID_NDK )
- if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared)$")
+ if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared|c\\+\\+_static|c\\+\\+_shared)$")
   message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\".
 The possible values are:
   none           -> Do not configure the runtime.
@@ -858,15 +890,19 @@
   stlport_shared -> Use the STLport runtime as a shared library.
   gnustl_static  -> (default) Use the GNU STL as a static library.
   gnustl_shared  -> Use the GNU STL as a shared library.
+  c++_static     -> Use LLVM libc++ runtime as static library.
+  c++_shared     -> Use LLVM libc++ runtime as shared library.
 " )
  endif()
 elseif( BUILD_WITH_STANDALONE_TOOLCHAIN )
- if( NOT "${ANDROID_STL}" MATCHES "^(none|gnustl_static|gnustl_shared)$")
+ if( NOT "${ANDROID_STL}" MATCHES "^(none|gnustl_static|gnustl_shared|c\\+\\+_static|c\\+\\+_shared)$")
   message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\".
 The possible values are:
   none           -> Do not configure the runtime.
   gnustl_static  -> (default) Use the GNU STL as a static library.
   gnustl_shared  -> Use the GNU STL as a shared library.
+  c++_static     -> Use LLVM libc++ runtime as static library.
+  c++_shared     -> Use LLVM libc++ runtime as shared library.
 " )
  endif()
 endif()
@@ -938,7 +974,7 @@
    set( __libsupcxx "${__libstl}/libsupc++.a" )
    set( __libstl    "${__libstl}/libstdc++.a" )
   endif()
-  if( NOT EXISTS "${__libsupcxx}" )
+  if( NOT EXISTS "${__libsupcxx}" AND NOT ANDROID_STL MACHES "c\\+\\+_(static|shared)" )
    message( FATAL_ERROR "The required libstdsupc++.a is missing in your standalone toolchain.
  Usually it happens because of bug in make-standalone-toolchain.sh script from NDK r7, r7b and r7c.
  You need to either upgrade to newer NDK or manually copy
@@ -967,11 +1003,17 @@
 elseif( "${ANDROID_TOOLCHAIN_NAME}" MATCHES "-clang3[.][0-9]?$" )
  string( REGEX MATCH "3[.][0-9]$" ANDROID_CLANG_VERSION "${ANDROID_TOOLCHAIN_NAME}")
  string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-${ANDROID_COMPILER_VERSION}" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
- if( NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}/bin/clang${TOOL_OS_SUFFIX}" )
+ if( ANDROID_NDK_LAYOUT STREQUAL RELEASE2)
+  set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
+ else()
+  set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
+ endif()
+
+ if( NOT EXISTS "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/clang${TOOL_OS_SUFFIX}" )
+  unset( ANDROID_CLANG_TOOLCHAIN_ROOT )
   message( FATAL_ERROR "Could not find the Clang compiler driver" )
  endif()
  set( ANDROID_COMPILER_IS_CLANG 1 )
- set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
 else()
  set( ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
  unset( ANDROID_COMPILER_IS_CLANG CACHE )
@@ -999,7 +1041,7 @@
   set( ANDROID_EXCEPTIONS       ON )
   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" )
  elseif( ANDROID_STL MATCHES "gabi" )
-  if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
+  if( ANDROID_NDK_VERSION VERSION_LESS 7 ) # before r7
    message( FATAL_ERROR "gabi++ is not available in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.")
   endif()
   set( ANDROID_RTTI             ON )
@@ -1007,12 +1049,12 @@
   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/gabi++/include" )
   set( __libstl                 "${ANDROID_NDK}/sources/cxx-stl/gabi++/libs/${ANDROID_NDK_ABI_NAME}/libgabi++_static.a" )
  elseif( ANDROID_STL MATCHES "stlport" )
-  if( NOT ANDROID_NDK_RELEASE_NUM LESS 8004 ) # before r8d
+  if( NOT ANDROID_NDK_VERSION VERSION_LESS 8.4 ) # before r8d
    set( ANDROID_EXCEPTIONS       ON )
   else()
    set( ANDROID_EXCEPTIONS       OFF )
   endif()
-  if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
+  if( ANDROID_NDK_VERSION VERSION_LESS 7 ) # before r7
    set( ANDROID_RTTI            OFF )
   else()
    set( ANDROID_RTTI            ON )
@@ -1039,6 +1081,22 @@
   else()
    set( __libstl                "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
   endif()
+  # Urho3D - cherry pick from jroger's PR #54
+ elseif( ANDROID_STL MATCHES "c\\+\\+_(shared|static)" )
+  set( ANDROID_EXCEPTIONS       ON )
+  set( ANDROID_RTTI             ON )
+  set( ANDROID_CXX_ROOT         "${ANDROID_NDK}/sources/cxx-stl/" )
+  set( ANDROID_LLVM_ROOT        "${ANDROID_CXX_ROOT}/llvm-libc++" )
+  set( ANDROID_ABI_INCLUDE_DIRS "${ANDROID_CXX_ROOT}/llvm-libc++abi/libcxxabi/include" )
+  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_LLVM_ROOT}/libcxx/include"
+                                "${ANDROID_ABI_INCLUDE_DIRS}" )
+  # android support sfiles
+  include_directories ( SYSTEM ${ANDROID_NDK}/sources/android/support/include )
+  if( EXISTS "${ANDROID_LLVM_ROOT}/libs/${ANDROID_NDK_ABI_NAME}/libc++_shared.so" )
+   set( __libstl               "${ANDROID_LLVM_ROOT}/libs/${ANDROID_NDK_ABI_NAME}/libc++_static.a" )
+  else()
+   message( "c++ library doesn't exist" )
+  endif()
  else()
   message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" )
  endif()
@@ -1062,7 +1120,7 @@
    endif()
   endif()
   if( NOT EXISTS "${__libsupcxx}")
-   message( ERROR "Could not find libsupc++.a for a chosen platform. Either your NDK is not supported or is broken.")
+   message( FATAL_ERROR "Could not find libsupc++.a for a chosen platform. Either your NDK is not supported or is broken.")
   endif()
  endif()
 endif()
@@ -1346,7 +1404,7 @@
 endif()

 # variables controlling optional build flags
-if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
+if( ANDROID_NDK_VERSION VERSION_LESS 7 ) # before r7
  # libGLESv2.so in NDK's prior to r7 refers to missing external symbols.
  # So this flag option is required for all projects using OpenGL from native.
  __INIT_VARIABLE( ANDROID_SO_UNDEFINED                      VALUES ON )
@@ -1397,9 +1455,9 @@
 endif()

 if( ANDROID_COMPILER_VERSION VERSION_EQUAL "4.6" )
- if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE_NUM GREATER 8002) AND (ARMEABI OR ARMEABI_V7A OR X86) )
+ if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_VERSION VERSION_GREATER 8.2) AND (ARMEABI OR ARMEABI_V7A OR X86) )
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=gold" )
- elseif( ANDROID_NDK_RELEASE_NUM GREATER 8002 ) # after r8b
+ elseif( ANDROID_NDK_VERSION VERSION_GREATER 8.2 ) # after r8b
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=bfd" )
  elseif( ANDROID_NDK_RELEASE STREQUAL "r8b" AND ARMEABI AND NOT _CMAKE_IN_TRY_COMPILE )
   message( WARNING "The default bfd linker from arm GCC 4.6 toolchain can fail with 'unresolvable R_ARM_THM_CALL relocation' error message. See https://code.google.com/p/android/issues/detail?id=35342
@@ -1744,7 +1802,7 @@
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86", "mips", "arm64-v8a", "x86_64", "mips64" depending on ANDROID_ABI
 #   ANDROID_NDK_RELEASE : from r5 to r11c; set only for NDK
-#   ANDROID_NDK_RELEASE_NUM : numeric ANDROID_NDK_RELEASE version (1000*major+minor)
+#   ANDROID_NDK_VERSION : major.minor.patch; set only for NDK; e.g. r10e = 10.5.0 but r11c = 11.2.2725575 (as defined in the source.properties)
 #   ANDROID_ARCH_NAME : "arm", "x86", "mips", "arm64", "x86_64", "mips64" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


ENH: GIT is sometimes used by superbuild, added find_package( Git REQUIRED )

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -1,24 +1,24 @@
 ##############################################################################
-#
+#
 # Library:   TubeTK
-#
+#
 # Copyright 2010 Kitware Inc. 28 Corporate Drive,
 # Clifton Park, NY, 12065, USA.
-#
-# All rights reserved.
-#
+#
+# All rights reserved.
+#
 # Licensed under the Apache License, Version 2.0 ( the "License" );
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-#
+#
 #       http://www.apache.org/licenses/LICENSE-2.0
-#
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
+#
 ##############################################################################
 include( ExternalProject )

@@ -30,7 +30,7 @@
 set( build_type "Debug" )
 if( CMAKE_BUILD_TYPE )
   set( build_type "${CMAKE_BUILD_TYPE}" )
-endif()
+endif()

 set( TubeTK_DEPENDS "" )

@@ -40,13 +40,17 @@
 ## Check if sytem ITK or superbuild ITK
 ##
 if( NOT USE_SYSTEM_ITK )
+
+  if( NOT GIT_EXECUTABLE )
+    find_package( Git REQUIRED )
+  endif( NOT GIT_EXECUTABLE )

   ##
   ## Insight
   ##
   set( proj Insight )
   ExternalProject_Add( ${proj}
-    GIT_REPOSITORY "http://github.com/Slicer/ITK.git"
+    GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Slicer/ITK.git"
     GIT_TAG "origin/slicer-4.0"
     SOURCE_DIR "${CMAKE_BINARY_DIR}/Insight"
     BINARY_DIR Insight-Build
@@ -66,7 +70,7 @@
     INSTALL_COMMAND ""
     )
   set( ITK_DIR "${base}/Insight-Build" )
-
+
   set( TubeTK_DEPENDS ${TubeTK_DEPENDS} "Insight" )

 endif( NOT USE_SYSTEM_ITK )
@@ -80,6 +84,10 @@
   ## Check if sytem VTK or superbuild VTK
   ##
   if( NOT USE_SYSTEM_VTK )
+
+    if( NOT GIT_EXECUTABLE )
+      find_package( Git REQUIRED )
+    endif( NOT GIT_EXECUTABLE )

     if( TubeTK_USE_QT )

@@ -88,7 +96,7 @@
       ##
       set( proj VTK )
       ExternalProject_Add( VTK
-        GIT_REPOSITORY "http://github.com/Slicer/VTK.git"
+        GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Slicer/VTK.git"
         GIT_TAG "origin/slicer-4.0"
         SOURCE_DIR "${CMAKE_BINARY_DIR}/VTK"
         BINARY_DIR VTK-Build
@@ -118,7 +126,7 @@
       ##
       set( proj VTK )
       ExternalProject_Add( VTK
-        GIT_REPOSITORY "http://github.com/Slicer/VTK.git"
+        GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Slicer/VTK.git"
         GIT_TAG "origin/slicer-4.0"
         SOURCE_DIR "${CMAKE_BINARY_DIR}/VTK"
         BINARY_DIR VTK-Build
@@ -141,18 +149,18 @@
     endif( TubeTK_USE_QT )

     set( TubeTK_DEPENDS ${TubeTK_DEPENDS} "VTK" )
-
+
   endif( NOT USE_SYSTEM_VTK )

 endif( TubeTK_USE_VTK )
-
-
+
+
 ##
 ## TCLAP
 ##
 set( proj tclap )
 ExternalProject_Add( ${proj}
-  SVN_REPOSITORY
+  SVN_REPOSITORY
     "http://svn.slicer.org/Slicer3/trunk/Libs/SlicerExecutionModel/tclap"
   SOURCE_DIR tclap
   BINARY_DIR tclap-Build
@@ -172,7 +180,7 @@

 ##
-## ModuleDescriptionParser
+## ModuleDescriptionParser
 ##
 set( proj ModuleDescriptionParser )

@@ -184,7 +192,7 @@
 endif( NOT USE_SYSTEM_ITK )

 ExternalProject_Add( ${proj}
-  SVN_REPOSITORY
+  SVN_REPOSITORY
     "http://svn.slicer.org/Slicer3/trunk/Libs/SlicerExecutionModel/ModuleDescriptionParser"
   SOURCE_DIR ModuleDescriptionParser
   BINARY_DIR ModuleDescriptionParser-Build
@@ -206,11 +214,11 @@

 ##
-## GenerateCLP
+## GenerateCLP
 ##
 set( proj GenerateCLP )
 ExternalProject_Add( ${proj}
-  SVN_REPOSITORY
+  SVN_REPOSITORY
     "http://svn.slicer.org/Slicer3/trunk/Libs/SlicerExecutionModel/GenerateCLP"
   SOURCE_DIR GenerateCLP
   BINARY_DIR GenerateCLP-Build
@@ -239,9 +247,13 @@
 if( TubeTK_USE_QT )

   ##
-  ## CTK
+  ## CTK
   ##
   if( TubeTK_USE_CTK )
+
+    if( NOT GIT_EXECUTABLE )
+      find_package( Git REQUIRED )
+    endif( NOT GIT_EXECUTABLE )

     if( TubeTK_USE_VTK )
       if( NOT USE_SYSTEM_VTK )
@@ -253,7 +265,7 @@

     set( proj CTK )
     ExternalProject_Add( CTK
-      GIT_REPOSITORY "http://github.com/commontk/CTK.git"
+      GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/commontk/CTK.git"
       GIT_TAG "origin/master"
       SOURCE_DIR "${CMAKE_BINARY_DIR}/CTK"
       BINARY_DIR CTK-Build


fixed: no info was reported if version could not be determined

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@10693 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/util/cmake/FindSeqAn.cmake
+++ seqan/util/cmake/FindSeqAn.cmake
@@ -83,7 +83,14 @@
           ${CMAKE_BINARY_DIR}/CMakeFiles/SeqAnVersion
           ${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/SeqAnVersion.cpp
           CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${SEQAN_INCLUDE_DIR_FOR_SeqAnCore}
+          COMPILE_OUTPUT_VARIABLE _COMPILE_OUTPUT
           RUN_OUTPUT_VARIABLE _RUN_OUTPUT)
+  if (NOT _RUN_OUTPUT)
+	message("")
+	message("ERROR: Could not determine SeqAn version.")
+	message("COMPILE OUTPUT:")
+	message(${_COMPILE_OUTPUT})
+  endif (NOT _RUN_OUTPUT)
   string(REGEX REPLACE ".*SEQAN_VERSION_MAJOR:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_MAJOR ${_RUN_OUTPUT})
   string(REGEX REPLACE ".*SEQAN_VERSION_MINOR:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_MINOR ${_RUN_OUTPUT})
   string(REGEX REPLACE ".*SEQAN_VERSION_PATCH:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_PATCH ${_RUN_OUTPUT})


Fix GLEW library dependencies

Fix GLEW library dependencies

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -110,7 +110,7 @@
   MESSAGE(STATUS "GLEW library found")
   SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DHAVE_GLEW=1)
   SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} ${GLEW_INCLUDE_DIR})
-  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${GLEW_LIBRARY})
+  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${GLEW_LIBRARIES})
 ELSE(GLEW_FOUND)
   MESSAGE("GLEW library not found, setting HAVE_GLEW=0")
   SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DHAVE_GLEW=0)
@@ -246,4 +246,4 @@

 SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} CACHE STRING "KrisLibrary include directories")
 SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} CACHE  STRING "KrisLibrary link libraries")
-SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} CACHE STRING "KrisLibrary defines")+SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} CACHE STRING "KrisLibrary defines")


cmake: Fixed missing include

cmake: Fixed missing include

--- .cmake/Modules/Capabilities.cmake
+++ .cmake/Modules/Capabilities.cmake
@@ -5,6 +5,7 @@
 include(CheckPrototypeDefinition)
 include(CheckLibraryExists)
 include(CheckFunctionExists)
+include(CheckSymbolExists)
 include(PackageUtils)

 # Check for packages


Fix the LDFLAGS order.

Fix the LDFLAGS order.

--- libtbag/project.cmake
+++ libtbag/project.cmake
@@ -21,16 +21,6 @@
 ## dep/uv
 list (APPEND TBAG_PROJECT_DEPENDENCIES  uv)
 list (APPEND TBAG_PROJECT_INCLUDE_DIRS  ${CMAKE_SOURCE_DIR}/dep/uv/include)
-if (UNIX)
-    list (APPEND TBAG_PROJECT_LDFLAGS -lpthread)
-    if (APPLE)
-        list (APPEND TBAG_PROJECT_LDFLAGS -ldl)
-    else ()
-        list (APPEND TBAG_PROJECT_LDFLAGS -lrt -lnsl -ldl)
-    endif ()
-else (WIN32)
-    list (APPEND TBAG_PROJECT_LDFLAGS ws2_32.lib iphlpapi.lib winmm.lib psapi.lib userenv.lib)
-endif ()

 ## dep/icu
 list (APPEND TBAG_PROJECT_DEPENDENCIES  icuuc icui18n)
@@ -43,5 +33,17 @@
 tbag_project__set_whole_archive ($<TARGET_FILE:icuuc>)
 tbag_project__set_whole_archive ($<TARGET_FILE:icui18n>)

+## external libraries.
+if (UNIX)
+    list (APPEND TBAG_PROJECT_LDFLAGS -lpthread)
+    if (APPLE)
+        list (APPEND TBAG_PROJECT_LDFLAGS -ldl)
+    else ()
+        list (APPEND TBAG_PROJECT_LDFLAGS -lnsl -ldl -lrt)
+    endif ()
+else (WIN32)
+    list (APPEND TBAG_PROJECT_LDFLAGS ws2_32.lib iphlpapi.lib winmm.lib psapi.lib userenv.lib)
+endif ()
+
 #tbag_modules__include_project (PCH ${CMAKE_SOURCE_DIR}/libtbag/config.h)


set default version

set default version

--- cmake/install_cmake_infrastructure.cmake
+++ cmake/install_cmake_infrastructure.cmake
@@ -3,6 +3,8 @@
     message(FATAL_ERROR "install_cmake_infrastructure called for project (PROJECT_NAME=${PROJECT_NAME}) "
       "that does not match package name argument PACKAGE_NAME=${PACKAGE_NAME}\nDid you forget to call project()?\n")
   endif()
+
+  set(PACKAGE_VERSION "0.0.0")

   parse_arguments(PACKAGE
     "INCLUDE_DIRS;LIBRARIES;CFG_EXTRAS;MSG_DIRS;PYTHONPATH"


Indention fixes in VIEW/KERNEL/sources.cmake

--- source/VIEW/KERNEL/sources.cmake
+++ source/VIEW/KERNEL/sources.cmake
@@ -1,19 +1,19 @@
 ### list all filenames of the directory here ###
 SET(SOURCES_LIST
-  clippingPlane.C
+	clippingPlane.C
 	common.C
-  compositeManager.C
-  connectionObject.C
-  geometricObject.C
-  mainControl.C
-  message.C
-  modelInformation.C
-  modularWidget.C
+	compositeManager.C
+	connectionObject.C
+	geometricObject.C
+	mainControl.C
+	message.C
+	modelInformation.C
+	modularWidget.C
 	preferencesEntry.C
-  representationManager.C
-  representation.C
+	representationManager.C
+	representation.C
 	shortcutRegistry.C
-  stage.C
+	stage.C
 	threads.C
 )


The core project links libraries with LINK_PRIVATE property on Windows.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -46,10 +46,10 @@
     endif()

     if((PROJ_TYPE STREQUAL "SHARED") OR (PROJ_TYPE STREQUAL "EXECUTABLE"))
-        if(PROJ_TYPE STREQUAL "SHARED")
-            set(LINK_MODE LINK_PUBLIC)
+		if((PROJ_TYPE STREQUAL "SHARED") AND MSVC)
+			set(LINK_MODE PRIVATE)
         else()
-            set(LINK_MODE LINK_PUBLIC)
+            set(LINK_MODE PUBLIC)
         endif()
         target_link_libraries(${PROJ_NAME} "${LINK_MODE}" ${PROJ_LIBS})
     endif()


revert accidental checkin of FindFreetype

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -44,7 +44,7 @@
 message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")

 find_path(FREETYPE_INCLUDE_DIR NAMES freetype.h freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
-find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h freetype/ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
+find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS})

 find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
 find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)


fbcode_builder: fix install_fb_python_library() to work with old CMake versions

Summary:
Update install_fb_python_library() to work with CMake versions older than 3.7.

Previously the code used a generator expression in the directory argument
supplied to `install(DIRECTORY)`.  Support for generators in this parameter
was only added in CMake 3.5, but it was buggy and did not correctly handle
absolute paths until 3.7.

This updates the code to avoid using a generator expression.  This does
require that the corresponding `add_fb_python_library()` statement appear
before the `install_fb_python_library()` statement, but this seems like a
pretty reasonable restriction.

Reviewed By: chadaustin

Differential Revision: D17103597

fbshipit-source-id: 54d6af93a3f530373cfe3137db99436d8484f308

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -369,10 +369,9 @@

   # Copy the intermediate install directory generated at build time into
   # the desired install location.
-  set(dest_dir "$<TARGET_PROPERTY:${LIB_NAME}.py_lib_install,INSTALL_DIR>")
-  set(
-    build_install_dir
-    "$<TARGET_PROPERTY:${LIB_NAME}.py_lib_install,BUILD_INSTALL_DIR>"
+  get_target_property(dest_dir "${LIB_NAME}.py_lib_install" "INSTALL_DIR")
+  get_target_property(
+    build_install_dir "${LIB_NAME}.py_lib_install" "BUILD_INSTALL_DIR"
   )
   install(
     DIRECTORY "${build_install_dir}/${LIB_NAME}"


ENH: avoid the png dependency in OSSIM

ENH: avoid the png dependency in OSSIM

--- CMake/External_ossim.cmake
+++ CMake/External_ossim.cmake
@@ -84,6 +84,7 @@
       -DCMAKE_BUILD_TYPE:STRING=Release
       -DBUILD_CSMAPI:BOOL=OFF
       -DBUILD_OSSIMCSM_PLUGIN:STRING=OFF
+      -DBUILD_OSSIMLIBRAW_PLUGIN:STRING=OFF
       -DCMAKE_CXX_FLAGS:STRING=-D__STDC_CONSTANT_MACROS
       -DWMS_INCLUDE_DIR:STRING=${OSSIM_SB_SRC}/libwms/include
       ${OSSIM_SB_TIFF_CONFIG}


FindGSL.cmake: minor improvement

FindGSL.cmake: minor improvement

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -24,17 +24,17 @@

 pkg_check_modules(PC_GSL gsl)
 find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${PC_GSL_INCLUDE_DIRS})
+find_library(GSL_LIBRARY NAMES gsl HINTS ${PC_GSL_LIBRARY_DIRS} )

-if (NOT GSL_LIBRARY)
-  #avoid PC_GSL_LIBRARIES being empty
-  list(INSERT PC_GSL_LIBRARIES 0 gsl)
-  list(REMOVE_DUPLICATES PC_GSL_LIBRARIES)
-  #added gls depends
+#added gsl depends
+if (NOT BUILD_SHARED_LIBS)
+  list(REMOVE_ITEM PC_GSL_LIBRARIES gsl)
   foreach (LIB ${PC_GSL_LIBRARIES})
     find_library(GSL_${LIB} NAMES ${LIB} HINTS ${PC_GSL_LIBRARY_DIRS} )
     list(APPEND GSL_LIBRARY ${GSL_${LIB}})
+    unset(${GSL_${LIB}} CACHE)
   endforeach(LIB)
-endif (NOT GSL_LIBRARY)
+endif (NOT BUILD_SHARED_LIBS)

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE


ENH: updating Montage module

ENH: updating Montage module

git shortlog --no-merges 46cad95..d0994e6

Dženan Zukic (2):
      BUG: updating test output path to allow testing as part of ITK
      BUG: removing extraneous comma in documentation

Jon Haitz Legarreta Gorroño (1):
      DOC: Improve Python package information.

--- Modules/Remote/Montage.remote.cmake
+++ Modules/Remote/Montage.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(Montage
 "Reconstruction of 3D volumetric dataset from a collection of 2D slices"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMontage.git
-  GIT_TAG 6e89d6d4cc30d7fa0682218fde407e9f4c04bb6c
+  GIT_TAG d0994e6f3495ba081569fa4270698771ea636c6c
   )


nits.

nits.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -329,9 +329,9 @@
     if(UNIX AND (NOT APPLE))
         set(DSN_SYSTEM_LIBS ${DSN_SYSTEM_LIBS} rt)
     endif()
-    if("${CMAKE_SYSTEM}" MATCHES "Linux")
+	if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
         set(DSN_SYSTEM_LIBS ${DSN_SYSTEM_LIBS} aio)
-    endif()
+    endif()
     set(DSN_SYSTEM_LIBS
         ${DSN_SYSTEM_LIBS}
         ${CMAKE_THREAD_LIBS_INIT}


dart out

dart out

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@2586 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/SiconosProject.cmake
+++ Numerics/cmake/SiconosProject.cmake
@@ -147,9 +147,6 @@
       SET(SITE ${PIPOL_SITE})
     ENDIF(PIPOL_IMAGE)

-    INCLUDE(DartConfig)
-    INCLUDE(Dart)
-
     # Tests coverage (taken from ViSp)

     #


Squashed 'CMake/Basis/' changes from 5f0bec9..68919d8

68919d8 fix: Look for PkgConfig quietly in FindFLANN module

git-subtree-dir: CMake/Basis
git-subtree-split: 68919d8939ec2f6ed268cb2a07d19815141ff4b1

--- FindFLANN.cmake
+++ FindFLANN.cmake
@@ -7,26 +7,34 @@
 # FLANN_LIBRARIES    - Libraries needed to use FLANN.
 # FLANN_DEFINITIONS  - Compiler flags for FLANN.

-find_package(PkgConfig)
-pkg_check_modules(PC_FLANN flann)
-set(FLANN_DEFINITIONS ${PC_FLANN_CFLAGS_OTHER})
+find_package(PkgConfig QUIET)
+if (PkgConfig_FOUND)
+  pkg_check_modules(PC_FLANN flann)
+else ()
+  set(PC_FLANN_INCLUDEDIR)
+  set(PC_FLANN_INCLUDE_DIRS)
+  set(PC_FLANN_LIBDIR)
+  set(PC_FLANN_LIBRARY_DIRS)
+  set(PC_FLANN_CFLAGS_OTHER)
+endif ()

 find_path(FLANN_INCLUDE_DIR flann/flann.hpp
-    HINTS ${PC_FLANN_INCLUDEDIR} ${PC_FLANN_INCLUDE_DIRS}
-    PATHS $ENV{FLANN_DIR} ${FLANN_DIR}
-    PATH_SUFFIXES include)
+  HINTS ${PC_FLANN_INCLUDEDIR} ${PC_FLANN_INCLUDE_DIRS}
+  PATHS $ENV{FLANN_DIR} ${FLANN_DIR}
+  PATH_SUFFIXES include
+)

 find_library(FLANN_LIBRARY flann
-    HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS}
-    PATHS $ENV{FLANN_DIR} ${FLANN_DIR}
-    PATH_SUFFIXES lib)
+  HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS}
+  PATHS $ENV{FLANN_DIR} ${FLANN_DIR}
+  PATH_SUFFIXES lib
+)

 set(FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIR})
-set(FLANN_LIBRARIES ${FLANN_LIBRARY})
+set(FLANN_LIBRARIES    ${FLANN_LIBRARY})
+set(FLANN_DEFINITIONS  ${PC_FLANN_CFLAGS_OTHER})

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Flann DEFAULT_MSG
-    FLANN_LIBRARY FLANN_INCLUDE_DIR)
+find_package_handle_standard_args(FLANN DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIR)

 mark_as_advanced(FLANN_LIBRARY FLANN_INCLUDE_DIR)
-


preventing gtest from downloading after make clean

--- cmake/gtest.cmake
+++ cmake/gtest.cmake
@@ -10,6 +10,7 @@
                -Dgtest_force_shared_crt=ON
                -DBUILD_GTEST=ON
      PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
+     URL_MD5 "ecd1fa65e7de707cd5c00bdac56022cd"
 # Disable install step
     INSTALL_COMMAND ""
 )


Tidy up the initialization step, and add a pre-test step of deleting old result files.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -1,10 +1,45 @@
-if(NOT TARGET tests)
-  add_custom_target(tests)
-endif()
-if(NOT TARGET test)
-  add_custom_target(test)
-  add_dependencies(test tests)
-endif()
+macro(initialize_tests)
+  if(NOT TARGET tests)
+    add_custom_target(tests)
+  endif()
+  if(NOT TARGET test)
+    add_custom_target(test)
+    add_dependencies(test tests)
+  endif()
+
+  # We set the path variables both locally and in the parent scope so that
+  # we can use them here and below in the add_* functions.
+  # TODO: find catkin somehow
+  set(catkin_path ${CMAKE_SOURCE_DIR}/catkin PARENT_SCOPE)
+  set(catkin_path ${CMAKE_SOURCE_DIR}/catkin)
+  # TODO: find rosunit somehow
+  set(rosunit_path ${CMAKE_SOURCE_DIR}/ros/tools/rosunit PARENT_SCOPE)
+  set(rosunit_path ${CMAKE_SOURCE_DIR}/ros/tools/rosunit)
+
+  # Record where we're going to put test results (#2003)
+  execute_process(COMMAND ${rosunit_path}/scripts/test_results_dir.py
+                  OUTPUT_VARIABLE rosbuild_test_results_dir
+                  RESULT_VARIABLE _test_results_dir_failed
+                  OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if(_test_results_dir_failed)
+    message(FATAL_ERROR "Failed to invoke ${rosunit_path}/scripts/test_results_dir.py")
+  endif(_test_results_dir_failed)
+
+  if(NOT TARGET clean-test-results)
+    # Clean out previous test results before running tests.  Use bash
+    # conditional to ignore failures (most often happens when a stale NFS
+    # handle lingers in the test results directory), because CMake doesn't
+    # seem to be able to do it.
+    add_custom_target(clean-test-results
+                      COMMAND if ! rm -rf ${rosbuild_test_results_dir}\; then echo "WARNING: failed to remove test-results directory"\; fi)
+    # Make the tests target depend on clean-test-results, which will ensure
+    # that test results are deleted before we try to build tests, and thus
+    # before we try to run tests.
+    add_dependencies(tests clean-test-results)
+  endif()
+endmacro()
+
+initialize_tests()

 # This is a macro to ensure that ${PROJECT_NAME}_CACHE gets set in a higher
 # scope where we can check it later.
@@ -16,15 +51,12 @@
     # tests
     file(APPEND ${cachefile} "${PROJECT_SOURCE_DIR}\n")
     set(${PROJECT_NAME}_CACHE TRUE PARENT_SCOPE)
-    # TODO: find catkin somehow
-    set(catkin_path ${CMAKE_SOURCE_DIR}/catkin)
-    # TODO: find rosunit somehow
-    set(rosunit_path ${CMAKE_SOURCE_DIR}/ros/tools/rosunit)
     # One test target per project
     add_custom_target(${PROJECT_NAME}_run_tests
                       COMMAND ${catkin_path}/scripts/runtests.py ${cachefile}
                       COMMAND ${rosunit_path}/scripts/summarize_results.py --nodeps ${PROJECT_NAME})
     add_dependencies(test ${PROJECT_NAME}_run_tests)
+    add_dependencies(${PROJECT_NAME}_run_tests tests)
   endif()

   # gotcha:  you need a newline or the message doesn't appear
@@ -54,8 +86,6 @@
     set(_covarg)
   endif("$ENV{ROS_TEST_COVERAGE}" STREQUAL "1")

-  # TODO: find rosunit somehow
-  set(rosunit_path ${CMAKE_SOURCE_DIR}/ros/tools/rosunit)
   # Create a legal test name, in case the target name has slashes in it
   string(REPLACE "/" "_" _testname ${file})
   # We use rostest to call the executable to get process control, #1629
@@ -73,13 +103,11 @@
   find_package(GTest REQUIRED)
   include_directories(${GTEST_INCLUDE_DIRS})
   add_executable(${exe} EXCLUDE_FROM_ALL ${_gtest_DEFAULT_ARGS})
-  target_link_libraries(roslib_utest ${GTEST_LIBRARIES})
+  target_link_libraries(${exe} ${GTEST_LIBRARIES})

   # Make sure the executable is built before running tests
   add_dependencies(tests ${exe})

-  # TODO: find rosunit somehow
-  set(rosunit_path ${CMAKE_SOURCE_DIR}/ros/tools/rosunit)
   # Create a legal test name, in case the target name has slashes in it
   string(REPLACE "/" "_" _testname ${exe})
   get_target_property(_exe_path ${exe} RUNTIME_OUTPUT_DIRECTORY)


pdbs for develop

pdbs for develop


Commit of update in FindTudatCore.cmake to use new lib/ location (K. Kumar).

git-svn-id: 60ddfbf3b7bd063597e1f20951a6d27e5e6c4dc0@284 ac7aa084-b6da-11df-bf42-7fac39f0224f

--- Tudat/External/CMake/FindTudatCore.cmake
+++ Tudat/External/CMake/FindTudatCore.cmake
@@ -59,7 +59,7 @@
       PATH_SUFFIXES TudatCore
     )
   set(TUDAT_CORE_INCLUDE_DIR ${TUDAT_CORE_BASE_PATH}/..)
-  set(TUDAT_CORE_LIBRARIES_DIR ${TUDAT_CORE_BASE_PATH}/lib)
+  set(TUDAT_CORE_LIBRARIES_DIR ${TUDAT_CORE_BASE_PATH}/../lib)

   if(TUDAT_CORE_INCLUDE_DIR)
     _tudat_core_check_version( )


[exotica_core] Update minimum CMake version for add_initializer.cmake

--- exotica_core/cmake/add_initializer.cmake
+++ exotica_core/cmake/add_initializer.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.0.2)

 find_package(PythonInterp REQUIRED)


cache the cblas library and include_dir variables on OSX

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -57,6 +57,9 @@
   # BLAS
   find_package(BLAS)
   if (APPLE AND NOT (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR))
+	# if the variables don't exist, let the user set them.
+	SET(CBLAS_LIBRARY "" CACHE FILEPATH "CBAS library")
+	SET(CBLAS_INCLUDE_DIR "" CACHE PATH "CBAS include directory")
     message(FATAL_ERROR "Gadgetron needs CBLAS_LIBRARY and CBLAS_INCLUDE_DIR. If
       these variables do not exist in your CMake, create them manually. CBLAS_LIBRARY
       and CBLAS_INCLUDE_DIR should be FILEPATH and PATH, respectively, and live in


cmake: added forgot hgid in version string

--- CMakeModules/hgscript.cmake
+++ CMakeModules/hgscript.cmake
@@ -3,7 +3,7 @@
 if (MERCURIAL_FOUND)
   MERCURIAL_HG_INFO(${TOP_SOURCE_DIR} THIS)
   MESSAGE("Current revision is ${THIS_HG_ID}")
-  set (THIS_HG_ID "${THIS_HG_ID}")
+  set (THIS_HG_ID "hgid: ${THIS_HG_ID}")
 else(MERCURIAL_FOUND)
   set (THIS_HG_ID)
 endif(MERCURIAL_FOUND)


ImportedProjectUtils: Minor formatting fixes

--- ImportedProjectUtils.cmake
+++ ImportedProjectUtils.cmake
@@ -422,10 +422,9 @@

     endif ()

-    string (REPLACE ";"
-                    ""
-                    METAPROJECT_CMAKELISTS
-                    "${METAPROJECT_CMAKELISTS}")
+    string (REPLACE ";" ""
+            METAPROJECT_CMAKELISTS
+            "${METAPROJECT_CMAKELISTS}")

     file (MAKE_DIRECTORY ${METAPROJECT})
     file (MAKE_DIRECTORY ${METAPROJECT_BUILD})
@@ -535,7 +534,7 @@
 # For instance:
 #
 # psq_import_external_project (Project project-exports
-#                                     NAMESPACES POLYSQUARE)
+#                              NAMESPACES POLYSQUARE)
 #
 # PROJECT_NAME : The name of the external project.
 # EXPORTS : The basename of the project's exports file.


CMake test works

CMake test works

--- Embedded/cmake/msp430.cmake
+++ Embedded/cmake/msp430.cmake
@@ -45,12 +45,19 @@
   message(STATUS "MCU defined as '${MCU}'")
 endif()

-set(CMAKE_CXX_FLAGS "-std=c++11 -mmcu=${MCU} -Os -g -ffunction-sections -fdata-sections" CACHE STRING "C++ Flags")
-set(CMAKE_CXX_LINK_FLAGS "-Wl,-gc-sections" CACHE STRING "Linker Flags")
+#-c  -MMD
+set(CMAKE_CXX_FLAGS " -Wall -c -mmcu=${MCU} -Os -g -ffunction-sections -fdata-sections" CACHE STRING "C++ Flags")
+set(CMAKE_CXX_LINK_FLAGS "-0s, -Wl,-gc-sections" CACHE STRING "Linker Flags")

-set(CMAKE_C_FLAGS "-mmcu=${MCU} -Os -g -ffunction-sections -fdata-sections" CACHE STRING "C Flags")
+set(CMAKE_C_FLAGS " -Wall -c -mmcu=${MCU} -Os -g -ffunction-sections -fdata-sections" CACHE STRING "C Flags")
 set(CMAKE_C_LINK_FLAGS "-Wl,-gc-sections" CACHE STRING "Linker Flags")

 # Use GCC for linking executables to avoid linking to stdlibc++ _BUT_ get all the math libraries etc.
 set(CMAKE_CXX_LINK_EXECUTABLE
   "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
+
+ # Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/bin/msp430-objcopy -O ihex -R .eeprom main main.hex
+# /Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/mspdebug/mspdebug rf2500 --force-reset prog main.hex
+
+
+


COMP (#4745): deactivate the buggy ITK check for shared libraries

--- CMake/MITK_ITK_Config.cmake
+++ CMake/MITK_ITK_Config.cmake
@@ -1,7 +1,11 @@
 FIND_PACKAGE(ITK)
-IF(ITK_FOUND AND NOT ITK_BUILD_SHARED)
-  MESSAGE(FATAL_ERROR "MITK only supports a ITK which was built with shared libraries. Turn on BUILD_SHARED_LIBS in your ITK config.")
-ENDIF(ITK_FOUND AND NOT ITK_BUILD_SHARED)
+#
+# for some reason this does not work on windows, probably an ITK bug
+# ITK_BUILD_SHARED is OFF even in shared library builds
+#
+#IF(ITK_FOUND AND NOT ITK_BUILD_SHARED)
+#  MESSAGE(FATAL_ERROR "MITK only supports a ITK which was built with shared libraries. Turn on BUILD_SHARED_LIBS in your ITK config.")
+#ENDIF(ITK_FOUND AND NOT ITK_BUILD_SHARED)
 LIST(APPEND ALL_INCLUDE_DIRECTORIES ${ITK_INCLUDE_DIRS})
 LIST(APPEND ALL_LIBRARIES ${ITK_LIBRARIES})
 link_directories(${ITK_LIBRARY_DIRS})


Update Coverage.cmake

Update Coverage.cmake

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


Verbose is set to 'false' when running a test set or the whole FOTS. Verbose is set to 'true' when running a single test case.

--- test/fots/ImportFOTS.cmake
+++ test/fots/ImportFOTS.cmake
@@ -76,7 +76,7 @@
     "-e fotsPath:=${_outdir}/2011/QT3-test-suite/catalog.xml "
     "-e mode:=run-test-set -e testSetName:=${_testset} "
     "-e expectedFailuresPath:=${BUILDDIR}/FOTSExpectedFailures.xml "
-    "-e verbose:=true "
+    "-e verbose:=false "
     "--disable-http-resolution --indent "
     "-z \"cdata-section-elements=${FOTS_CDATA_ELEMENTS}\")\n"
     "ZORBA_SET_TEST_PROPERTY (FOTS/${_testset} "


Prepend compiler flags to let users disable compiler warnings

--- Compiler.cmake
+++ Compiler.cmake
@@ -192,11 +192,11 @@
 endif()

 macro(common_compiler_flags)
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_C_FLAGS}")
-  set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMMON_C_FLAGS_RELWITHDEBINFO}")
-  set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${COMMON_C_FLAGS_RELEASE}")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_CXX_FLAGS}")
-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS_RELWITHDEBINFO}")
-  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS_RELEASE}")
+  set(CMAKE_C_FLAGS "${COMMON_C_FLAGS} ${CMAKE_C_FLAGS}")
+  set(CMAKE_C_FLAGS_RELWITHDEBINFO "${COMMON_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+  set(CMAKE_C_FLAGS_RELEASE "${COMMON_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}")
+  set(CMAKE_CXX_FLAGS "${COMMON_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${COMMON_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+  set(CMAKE_CXX_FLAGS_RELEASE "${COMMON_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}")
 endmacro()


COMP: restructuring

COMP: restructuring

--- Modules/MitkExt/files.cmake
+++ Modules/MitkExt/files.cmake
@@ -132,7 +132,7 @@
   Interactions/mitkCorrectorTool2D.cpp
   Interactions/mitkCreateSurfaceTool.cpp
   #Interactions/mitkDisplayCoordinateOperation.cpp
-  Interactions/mitkDisplayInteractor.cpp
+  #Interactions/mitkDisplayInteractor.cpp
   Interactions/mitkDisplayPointSetInteractor.cpp
   #Interactions/mitkDisplayVectorInteractor.cpp
   Interactions/mitkDrawPaintbrushTool.cpp


draft 2

draft 2

--- project/cmake/ProjectBuildOption.cmake
+++ project/cmake/ProjectBuildOption.cmake
@@ -114,7 +114,7 @@
     list(APPEND ATFRAME_UTILS_BIN_CRYPT_LINK_NAME ${OPENSSL_CRYPTO_LIBRARY})
 elseif (MBEDTLS_FOUND)
     list(APPEND ATFRAME_UTILS_BIN_CRYPT_LINK_NAME ${MbedTLS_CRYPTO_LIBRARIES})
-else()
+endif()

 if (NOT CRYPTO_DISABLED)
     find_package(Libsodium)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


fix post-build target name

fix post-build target name


Change min c++ std to c++14

Change min c++ std to c++14

--- projects/CMake/shared.cmake
+++ projects/CMake/shared.cmake
@@ -51,20 +51,7 @@
     endif()
 endif()

-set(RX_COMPILE_FEATURES
-    cxx_auto_type
-    cxx_nullptr
-    cxx_decltype
-    cxx_lambdas
-    cxx_range_for
-    cxx_right_angle_brackets
-    cxx_rvalue_references
-    cxx_static_assert
-    cxx_trailing_return_types
-    cxx_alias_templates
-    cxx_variadic_templates
-    cxx_template_template_parameters
-    )
+set(RX_COMPILE_FEATURES cxx_std_14)

 set(IX_SRC_DIR ${RXCPP_DIR}/Ix/CPP/src)
 set(RX_SRC_DIR ${RXCPP_DIR}/Rx/v2/src)


update: coverage processing

update: coverage processing

--- cmake/HUGH_PLATFORM_SetupVariables.cmake
+++ cmake/HUGH_PLATFORM_SetupVariables.cmake
@@ -11,5 +11,3 @@
 endif()

 include(CMakeAddons_SetupVariables)
-
-set(${PROJECT_NAME}_COVERAGE_EXCLUDE "${${PROJECT_NAME}_COVERAGE_EXCLUDE} 'install/*'")


Always define the QML modules as runtime dependencies

CCMAIL: 09e9118865a828c29e7267b33f01721293291c88@kde.org

--- src/plugins/youtube/cmake/FindQMLModule.cmake
+++ src/plugins/youtube/cmake/FindQMLModule.cmake
@@ -53,6 +53,11 @@
 include(FindPackageHandleStandardArgs)
 include(FeatureSummary)

+string (REPLACE ";" ", " THE_COMPONENTS "${QMLModule_FIND_COMPONENTS}")
+
+set_package_properties(QMLModule PROPERTIES DESCRIPTION "QML Modules: ${THE_REQUIRED_COMPONENTS}"
+                       TYPE RUNTIME)
+
 set(QMLModule_VERSION "${QMLModule_FIND_VERSION}")
 foreach(_module ${QMLModule_FIND_COMPONENTS})
     execute_process(COMMAND qmlplugindump "${_module}" "${QMLModule_FIND_VERSION}" OUTPUT_VARIABLE FUUUUU RESULT_VARIABLE ExitCode)


Pass through python version strings

Pass through python version strings

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -269,6 +269,9 @@
     "-DBUILD_HEADLESS:BOOL=${BUILD_HEADLESS}"
     "-DSCIRUN_TEST_RESOURCE_DIR:PATH=${SCIRUN_TEST_RESOURCE_DIR}"
     "-DBUILD_WITH_PYTHON:BOOL=${BUILD_WITH_PYTHON}"
+    "-DUSER_PYTHON_VERSION:STRING=${USER_PYTHON_VERSION}"
+    "-DUSER_PYTHON_VERSION_MAJOR:STRING=${USER_PYTHON_VERSION_MAJOR}"
+    "-DUSER_PYTHON_VERSION_MINOR:STRING=${USER_PYTHON_VERSION_MINOR}"
     "-DWITH_TETGEN:BOOL=${WITH_TETGEN}"
     "-DWITH_OSPRAY:BOOL=${WITH_OSPRAY}"
     "-DQT5_BUILD:BOOL=${QT5_BUILD}"


fix alphabetical ordering

fix alphabetical ordering

--- ament_cmake_environment/ament_cmake_environment-extras.cmake
+++ ament_cmake_environment/ament_cmake_environment-extras.cmake
@@ -6,7 +6,7 @@
   "Generate marker file containing the parent prefix path" ON)

 # set supported extensions based on platform
-set(_non_windows_extensions "zsh" "bash" "sh")
+set(_non_windows_extensions "bash" "sh" "zsh")
 set(_windows_extensions "bat")
 if(NOT WIN32)
   # non-windows


Make valgrind options use the option function

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -28,9 +28,9 @@
 find_program(VALGRIND_EXECUTABLE valgrind)

 if (VALGRIND_EXECUTABLE)
-  set(VISTK_VALGRIND_GENERATE_SUPPRESSIONS OFF CACHE BOOL "Output suppression rules for valgrind leak detections")
-  set(VISTK_VALGRIND_VERBOSE OFF CACHE BOOL "Make valgrind verbose")
-  set(VISTK_VALGRIND_USE_SUPPRESSIONS ON CACHE BOOL "Suppress known leaks in valgrind")
+  option(VISTK_VALGRIND_GENERATE_SUPPRESSIONS "Output suppression rules for valgrind leak detections" OFF)
+  option(VISTK_VALGRIND_VERBOSE "Make valgrind verbose" OFF)
+  option(VISTK_VALGRIND_USE_SUPPRESSIONS "Suppress known leaks in valgrind" ON)

   set(vistk_valgrind_arguments)
   if (VISTK_VALGRIND_GENERATE_SUPPRESSIONS)


[FIX] Really suppressing warnings about unsafe STL functions in MSVC.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13358 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -225,7 +225,7 @@
   add_definitions (/W2)

   # Disable warnings about unsecure (although standard) functions.
-  add_definitions (-D_SCL_SECURE_NO_WARNING)
+  add_definitions (-D_SCL_SECURE_NO_WARNINGS)
 endif (MSVC)

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


cmake: updated hash for new patched bundle

--- cmake/cross_compiled_libraries.cmake
+++ cmake/cross_compiled_libraries.cmake
@@ -19,7 +19,7 @@
 	ExternalProject_Add(PrecompiledLibraries
 			    PREFIX precompiled
 			    URL https://github.com/hioa-cs/IncludeOS/releases/download/v0.12.0-rc.2/IncludeOS_dependencies_v0-12-0_musl_libunwind_threaded.tar.gz
-			    URL_HASH SHA1=4ab139536295321866ebe4136de25879450eb58b
+			    URL_HASH SHA1=9f3f8da09c1f15bdc2a7d3feea665a31cb9fe889
 			    CONFIGURE_COMMAND ""
 			    BUILD_COMMAND ""
 			    UPDATE_COMMAND ""


Move special build option gcctoolchain to the end

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -118,7 +118,6 @@
 ROOT_BUILD_OPTION(fftw3 ON "Fast Fourier Transform support, requires libfftw3")
 ROOT_BUILD_OPTION(fitsio ON "Read images and data from FITS files, requires cfitsio")
 ROOT_BUILD_OPTION(fortran OFF "Enable the Fortran components of ROOT")
-set(gcctoolchain "" CACHE PATH "Path for the gcctoolchain in case not the system gcc is used to build clang/LLVM")
 ROOT_BUILD_OPTION(gdml ON "GDML writer and reader")
 ROOT_BUILD_OPTION(geocad OFF "ROOT-CAD Interface")
 ROOT_BUILD_OPTION(gfal ON "GFAL support, requires libgfal")
@@ -193,6 +192,8 @@
 option(rootbench "Include rootbench, if rootbench exists in root or if it is a sibling directory." OFF)
 option(clingtest "Include cling tests. NOTE that this makes llvm/clang symbols visible in libCling." OFF)

+set(gcctoolchain "" CACHE PATH "Path for the gcctoolchain in case not the system gcc is used to build clang/LLVM")
+
 if (runtime_cxxmodules)
   set(pch_defvalue OFF)
 endif(runtime_cxxmodules)


[update]

[update]

--- mk/linux.cmake
+++ mk/linux.cmake
@@ -11,6 +11,7 @@
     set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/linux)
     set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/linux)
     set (LIBRARY_DIR_PATH ${PROJECT_SOURCE_DIR}/lib/linux/)
+
 endmacro()

 macro (display_linux_platform_configs)


COMP: fix otb_module_target for executables

--- CMake/OTBModuleMacros.cmake
+++ CMake/OTBModuleMacros.cmake
@@ -240,14 +240,17 @@
 endmacro()

 macro(otb_module_target_name _name)
-  set_property(TARGET ${_name} PROPERTY VERSION 1)
-  set_property(TARGET ${_name} PROPERTY SOVERSION 1)
-  if("${_name}" MATCHES "^[Oo][Tt][Bb]")
-    set(_otb "")
-  else()
-    set(_otb "otb")
-  endif()
-  set_property(TARGET ${_name} PROPERTY OUTPUT_NAME ${_otb}${_name}-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR})
+  get_property(_target_type TARGET ${_name} PROPERTY TYPE)
+  if (NOT ${_target_type} STREQUAL "EXECUTABLE")
+    set_property(TARGET ${_name} PROPERTY VERSION 1)
+    set_property(TARGET ${_name} PROPERTY SOVERSION 1)
+    if("${_name}" MATCHES "^[Oo][Tt][Bb]")
+      set(_otb "")
+    else()
+      set(_otb "otb")
+    endif()
+    set_property(TARGET ${_name} PROPERTY OUTPUT_NAME ${_otb}${_name}-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR})
+  endif()
 endmacro()

 macro(otb_module_target_export _name)


cmake: use functions instead of macros

cmake: use functions instead of macros

Change-Id: I7f3cf8d3a2713f021e1c712f97f52851bcb3d996

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -143,11 +143,11 @@
 # vtk_module_check_name(<name>)
 #
 # Check if the proposed module name is compliant.
-macro(vtk_module_check_name _name)
+function(vtk_module_check_name _name)
   if(NOT "${_name}" MATCHES "^[a-zA-Z][a-zA-Z0-9]*$")
     message(FATAL_ERROR "Invalid module name: ${_name}")
   endif()
-endmacro()
+endfunction()

 # vtk_module_impl()
 #
@@ -370,8 +370,8 @@
   endif()
 endmacro()

-macro(vtk_module_warnings_disable)
-  foreach(lang ${ARGN})
+function(vtk_module_warnings_disable)
+  foreach(lang IN LISTS ARGN)
     if(MSVC)
       string(REGEX REPLACE "(^| )[/-]W[0-4]( |$)" " "
         CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -w")
@@ -380,24 +380,25 @@
     else()
       set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -w")
     endif()
-  endforeach()
-endmacro()
-
-macro(vtk_target_label _target_name)
+    set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}" PARENT_SCOPE)
+  endforeach()
+endfunction()
+
+function(vtk_target_label _target_name)
   if(vtk-module)
     set(_label ${vtk-module})
   else()
     set(_label ${_VTKModuleMacros_DEFAULT_LABEL})
   endif()
   set_property(TARGET ${_target_name} PROPERTY LABELS ${_label})
-endmacro()
+endfunction()

 # vtk_target_name(<name>)
 #
 # This macro does some basic checking for library naming, and also adds a suffix
 # to the output name with the VTK version by default. Setting the variable
 # VTK_CUSTOM_LIBRARY_SUFFIX will override the suffix.
-macro(vtk_target_name _name)
+function(vtk_target_name _name)
   get_property(_type TARGET ${_name} PROPERTY TYPE)
   if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL)
     set_property(TARGET ${_name} PROPERTY VERSION 1)
@@ -417,11 +418,11 @@
     set(_lib_suffix "-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
   endif()
   set_property(TARGET ${_name} PROPERTY OUTPUT_NAME ${_vtk}${_name}${_lib_suffix})
-endmacro()
-
-macro(vtk_target_export _name)
+endfunction()
+
+function(vtk_target_export _name)
   set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${_name})
-endmacro()
+endfunction()

 function(vtk_target_install _name)
   if(NOT VTK_INSTALL_NO_LIBRARIES)
@@ -450,9 +451,9 @@
   endif()
 endfunction()

-macro(vtk_target _name)
+function(vtk_target _name)
   set(_install 1)
-  foreach(arg ${ARGN})
+  foreach(arg IN LISTS ARGN)
     if(arg STREQUAL "NO_INSTALL")
       set(_install 0)
     else()
@@ -465,17 +466,17 @@
   if(_install)
     vtk_target_install(${_name})
   endif()
-endmacro()
+endfunction()

 #------------------------------------------------------------------------------
 # Export a target for a tool that used during the compilation process.
 # This is called by vtk_compile_tools_target().
-macro(vtk_compile_tools_target_export _name)
+function(vtk_compile_tools_target_export _name)
   set_property(GLOBAL APPEND PROPERTY VTK_COMPILETOOLS_TARGETS ${_name})
-endmacro()
+endfunction()

 #------------------------------------------------------------------------------
-macro(vtk_compile_tools_target_install _name)
+function(vtk_compile_tools_target_install _name)
   if(NOT VTK_INSTALL_NO_DEVELOPMENT)
     install(TARGETS ${_name}
       EXPORT ${VTK_INSTALL_EXPORT_NAME}
@@ -484,7 +485,7 @@
       ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development
       )
   endif()
-endmacro()
+endfunction()

 #------------------------------------------------------------------------------
 # vtk_compile_tools_target() is used to declare a target that builds a tool that
@@ -492,7 +493,7 @@
 # added to VTK_COMPILETOOLS_TARGETS global property. This also adds install
 # rules for the target unless NO_INSTALL argument is specified or
 # VTK_INSTALL_NO_DEVELOPMENT variable is set.
-macro(vtk_compile_tools_target _name)
+function(vtk_compile_tools_target _name)
   if (CMAKE_CROSSCOMPILING)
     message(AUTHOR_WARNING
       "vtk_compile_tools_target is being called when CMAKE_CROSSCOMPILING is true. "
@@ -500,7 +501,7 @@
       "to built, but rather imported when CMAKE_CROSSCOMPILING is ON")
   endif (CMAKE_CROSSCOMPILING)
  set(_install 1)
-  foreach(arg ${ARGN})
+  foreach(arg IN LISTS ARGN)
     if(arg STREQUAL "NO_INSTALL")
       set(_install 0)
     else()
@@ -513,7 +514,7 @@
   if(_install)
     vtk_compile_tools_target_install(${_name})
   endif()
-endmacro()
+endfunction()
 #------------------------------------------------------------------------------

 function(vtk_add_library name)


COMP: recorrected md5sum for opencv

COMP: recorrected md5sum for opencv

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -51,7 +51,7 @@
     endif()

     set(opencv_url ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/opencv-2.4.6.1.tar.gz)
-    set(opencv_url_md5 d41d8cd98f00b204e9800998ecf8427e)
+    set(opencv_url_md5 d756bfa460891697571d5c90050e1cfe)

     ExternalProject_Add(${proj}
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src


Add boost/python as dependency before thrift build.  Assume we want at least C++ and python bindings

--- thrift.cmake
+++ thrift.cmake
@@ -9,6 +9,10 @@
 include (ExternalProject)
 include (ExternalSource)
 include (BuildSupport)
+
+# We assume we want boost, C++, and python support
+include (boost)
+include (python)

 set (thrift_EXE             ${BUILDEM_BIN_DIR}/thrift)
 set (thrift_INCLUDE_DIR     ${BUILDEM_INCLUDE_DIR}/thrift)
@@ -24,6 +28,7 @@

 message ("Installing ${thrift_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${thrift_NAME}
+    DEPENDS             ${boost_NAME} ${python_NAME}
     PREFIX              ${BUILDEM_DIR}
     URL                 ${thrift_URL}
     URL_MD5             ${thrift_MD5}
@@ -37,7 +42,7 @@
         CPPFLAGS=-I${BUILDEM_DIR}/include
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     BUILD_IN_SOURCE     1
-    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
+    INSTALL_COMMAND     ""
 )

 set (thrift_STATIC_LIBRARIES ${BUILDEM_LIB_DIR}/libthrift.a)


install dir update

install dir update

--- CMake/UseCyclus.cmake
+++ CMake/UseCyclus.cmake
@@ -117,7 +117,7 @@
   # install library
   install(
     TARGETS ${lib_root}
-    LIBRARY DESTINATION lib${lib_root}
+    LIBRARY DESTINATION cyclus/lib${lib_root}
     COMPONENT ${lib_root}
     )
   SET(


Switch to CMAKE_CURRENT_SOURCE_DIR

Switch to CMAKE_CURRENT_SOURCE_DIR

Resolves #389

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -40,7 +40,7 @@

   # build library
   configure_file(
-    ${CMAKE_SOURCE_DIR}/CMake/Dependencies/lib${lib_name}-CMakeLists.txt
+    ${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/lib${lib_name}-CMakeLists.txt
     ${KINESIS_VIDEO_OPEN_SOURCE_SRC}/lib${lib_name}/CMakeLists.txt COPYONLY)
   execute_process(
     COMMAND ${CMAKE_COMMAND} ${build_args}


ENH: Add the compilation date in xml file for it to appear in --version

--- DTIAtlasBuilder.cmake
+++ DTIAtlasBuilder.cmake
@@ -33,10 +33,20 @@
   set(SlicerExtCXXVar "false")
 endif(DTIAtlasBuilder_BUILD_SLICER_EXTENSION)

+# Add the compilation date in xml file for it to appear in --help
+if(WIN32)
+  execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE TODAY)
+  string(REGEX REPLACE "....(..)/(..)/(....).*" "\\1/\\2/\\3" TODAY ${TODAY}) # to remove the end of line and the name of day at the beginning
+else() # Unix
+  execute_process(COMMAND "date" "+%m/%d/%Y" OUTPUT_VARIABLE TODAY)
+  string(REGEX REPLACE "(..)/(..)/(....).*" "\\1/\\2/\\3" TODAY ${TODAY}) # to remove the end of line
+endif()
+configure_file(DTIAtlasBuilder.xml.in ${CMAKE_CURRENT_BINARY_DIR}/DTIAtlasBuilder.xml)
+
 QT4_WRAP_CPP(QtProject_HEADERS_MOC GUI.h)
 QT4_WRAP_UI(UI_FILES GUIwindow.ui)
 set(DTIABsources DTIAtlasBuilder.cxx GUI.h GUI.cxx ScriptWriter.h ScriptWriter.cxx ${QtProject_HEADERS_MOC} ${UI_FILES})
-GENERATECLP(DTIABsources DTIAtlasBuilder.xml) # include the GCLP file to the project
+GENERATECLP(DTIABsources ${CMAKE_CURRENT_BINARY_DIR}/DTIAtlasBuilder.xml) # include the GCLP file to the project
 add_executable(DTIAtlasBuilder ${DTIABsources})  # add the files contained by "DTIABsources" to the project
 set_target_properties(DTIAtlasBuilder PROPERTIES COMPILE_FLAGS "-DDTIAtlasBuilder_BUILD_SLICER_EXTENSION=${SlicerExtCXXVar}") # Add preprocessor definitions
 target_link_libraries(DTIAtlasBuilder ${QT_LIBRARIES} ${ITK_LIBRARIES})


BUG: #1580: update tag for FFSforGMM

BUG: #1580: update tag for FFSforGMM

--- Modules/Remote/otbFFSforGMM.remote.cmake
+++ Modules/Remote/otbFFSforGMM.remote.cmake
@@ -25,5 +25,5 @@
 https://github.com/Laadr/otbFFSforGMM
 "
   GIT_REPOSITORY https://github.com/Laadr/otbFFSforGMM.git
-  GIT_TAG f9aa7988fc399d8713f9e28fac15e637a783be6e
+  GIT_TAG 3ad529b9c5c81b7dd17fe83d4802ad5a3c4eb62b
   )


Avoid some "unknown compiler options" warnings in MSVC builds

Former-commit-id: 08bbfbe35aca8f7e1cc7e2540ec4a6d47de9f945

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -177,7 +177,12 @@
   add_library("${OBJLIB}" OBJECT ${args_SRCS})
   add_dependencies("${OBJLIB}" Halide)
   target_include_directories("${OBJLIB}" PRIVATE "${CMAKE_BINARY_DIR}/include")
-  target_compile_options("${OBJLIB}" PRIVATE "-std=c++11" "-fno-rtti")
+  if (NOT MSVC)
+    target_compile_options("${OBJLIB}" PRIVATE "-std=c++11") # Halide clients need C++11
+    if(NOT HALIDE_ENABLE_RTTI)
+      target_compile_options("${OBJLIB}" PRIVATE "-fno-rtti")
+    endif()
+  endif()
   foreach(STUB ${args_STUB_DEPS})
     halide_add_generator_stub_dependency(TARGET ${OBJLIB} STUB_GENERATOR_TARGET ${STUB})
   endforeach()


pthread: edit finder for 64 bit support

pthread: edit finder for 64 bit support

pthreadVCE2 isn't released by sourceware on their x64 pre-built binaries

Change-Id: I9d83cb46361816a674913b7a8b318a952929a4ae
Reviewed-on: http://gerrit.aldebaran.lan/59402
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/pthread-config.cmake
+++ cmake/qibuild/modules/pthread-config.cmake
@@ -16,6 +16,10 @@
 if(CMAKE_THREAD_LIBS_INIT)
   qi_persistent_set(PTHREAD_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
 else()
-  flib(PTHREAD pthread pthreadVCE2)
+  if(CMAKE_CL_64)
+    flib(PTHREAD pthread pthreadVC2)
+  else()
+    flib(PTHREAD pthread pthreadVCE2)
+   endif()
 endif()
 export_lib(PTHREAD)


Ticket #2062: Update scratch location per issues that greg had.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -421,12 +421,13 @@
 if (WINDOWS)
 	set (EXTERNAL_STAGE C:/temp/condor)
 else()
-	# special CS ASF check
-	if ( EXISTS /p/condor/workspaces/externals  )
-		set (EXTERNAL_STAGE /p/condor/workspaces/externals/cmake)
-	else()
-		set (EXTERNAL_STAGE /scratch/condor/externals)
-	endif()
+	# temporarily disable AFS cache.
+	#if ( EXISTS /p/condor/workspaces/externals  )
+	#	set (EXTERNAL_STAGE /p/condor/workspaces/externals/cmake/${OS_NAME}/${SYS_ARCH})
+	#else()
+		# just in case someone tries something funky still insert OS & ARCH in path
+		set (EXTERNAL_STAGE /scratch/condor/externals/${OS_NAME}/${SYS_ARCH})
+	#endif()
 endif(WINDOWS)

 dprint("EXTERNAL_STAGE=${EXTERNAL_STAGE}")


Fix cmake ethtool detection.

Fix cmake ethtool detection.

Signed-off-by: Timothy St. Clair <29ae796e4f5492d73061ff429bb678dbe89fef6d@redhat.com>

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -310,12 +310,12 @@
 	set(DOES_SAVE_SIGSTATE ON)
 	check_symbol_exists(SIOCETHTOOL "linux/sockios.h" HAVE_DECL_SIOCETHTOOL)
 	check_symbol_exists(SIOCGIFCONF "linux/sockios.h" HAVE_DECL_SIOCGIFCONF)
-	check_include_files("linux/ethtool.h" HAVE_LINUX_ETHTOOL_H)
+	check_include_files("linux/types.h" HAVE_LINUX_TYPES_H)
+	check_include_files("linux/types.h;linux/ethtool.h" HAVE_LINUX_ETHTOOL_H)
 	check_include_files("linux/magic.h" HAVE_LINUX_MAGIC_H)
 	check_include_files("linux/nfsd/const.h" HAVE_LINUX_NFSD_CONST_H)
 	check_include_files("linux/personality.h" HAVE_LINUX_PERSONALITY_H)
 	check_include_files("linux/sockios.h" HAVE_LINUX_SOCKIOS_H)
-	check_include_files("linux/types.h" HAVE_LINUX_TYPES_H)

 	find_library(HAVE_X11 X11)
 	dprint("Threaded functionality only enable in Linux and Windows")


[noetic][Windows] Adding .lib into the symlink install file list (#1110)

* Adding .lib into the symlink install file list

* reduce scope of target type to windows-only

Co-authored-by: Dirk Thomas <19795c8185177e940eedd30ceb2b716a54a3d5dc@users.noreply.github.com>

--- cmake/symlink_install/catkin_symlink_install_targets.cmake
+++ cmake/symlink_install/catkin_symlink_install_targets.cmake
@@ -73,6 +73,12 @@
           "'${target}' is an imported target")
       endif()
       list(APPEND target_files "$<TARGET_FILE:${target}>")
+      if(WIN32)
+        get_target_property(target_type "${target}" TYPE)
+        if("${target_type}" STREQUAL "SHARED_LIBRARY")
+          list(APPEND target_files "$<TARGET_LINKER_FILE:${target}>")
+        endif()
+      endif()
     endforeach()

     string(REPLACE ";" "\" \"" target_files_quoted