~ changes for cmake-extensions function to not provide installation

--- contrib/cmake/PyExtensions.cmake
+++ contrib/cmake/PyExtensions.cmake
@@ -31,7 +31,8 @@
 # goo_py_extensions( INTERFACES <iface1> <iface2> ...
 #                    [PKG_NAME <package name>]
 #                    [LINK_LIBS <lib1> <lib2> ...]
-#                    [WRAPPER_SOUCES <lstvariable_name>]
+#                    [WRAPPER_SOUCES <lstvariable_name>]
+#                    [SETUP_TEMPLATE <setup.py.in-path>]
 #                    [NO_INIT_FILE] )
 # Please, note that one can specify Python_ADDITIONAL_VERSIONS to point out
 # desired versions of python to be used. Like that:
@@ -41,7 +42,7 @@
 function( goo_py_extensions )
     # Function signature:
     set( options NO_INIT_FILE )
-    set( oneValueArgs PKG_NAME WRAPPER_SOUCES )
+    set( oneValueArgs PKG_NAME WRAPPER_SOUCES SETUP_TEMPLATE )
     set( multiValueArgs INTERFACES LINK_LIBS )
     cmake_parse_arguments( py_extensions
             "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
@@ -100,12 +101,14 @@
         #set_source_files_properties( ${IFACE_FILE} PROPERTIES COMPILE_FLAGS -Dregister= )
         swig_add_module( ${IFACE} python ${IFACE_FILE} )
         swig_link_libraries( ${IFACE} ${PYTHON_LIBRARIES} ${py_extensions_LINK_LIBS})
-        install(TARGETS ${SWIG_MODULE_${IFACE}_REAL_NAME}
-                DESTINATION ${PY_MODULES_INSTALL_DIR}/${PYPKGNM} )
-            #list( APPEND PY_EXT_MODULES_LIST ${SWIG_MODULE_${IFACE}_REAL_NAME} )  # TODO
+
+        # TODO: use install.py
+        #install(TARGETS ${SWIG_MODULE_${IFACE}_REAL_NAME}
+        #        DESTINATION ${PY_MODULES_INSTALL_DIR}/${PYPKGNM} )
+        #list( APPEND PY_EXT_MODULES_LIST ${SWIG_MODULE_${IFACE}_REAL_NAME} )  # TODO
         list( APPEND PY_EXT_MODULES_LIST ${swig_generated_file_fullname} )  # TODO
-        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${IFACE}.py
-                DESTINATION ${PY_MODULES_INSTALL_DIR}/${PYPKGNM} )
+        #install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${IFACE}.py
+        #        DESTINATION ${PY_MODULES_INSTALL_DIR}/${PYPKGNM} )
         set( ${PYPKGNM}_PY_MODULES "${${PYPKGNM}_PY_MODULES}${IFACE} " )
     endforeach()

@@ -115,9 +118,14 @@
         message( STATUS "__init__.py will be generated for ${PYPKGNM}" )
         configure_file( ${THIS_MODULE_DIR}/PyExtensions_init-template.in
                         ${CMAKE_CURRENT_BINARY_DIR}/__init__.py )
-        install( FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py
-                 DESTINATION ${PY_MODULES_INSTALL_DIR}/${PYPKGNM} )
+        #install( FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py
+        #DESTINATION ${PY_MODULES_INSTALL_DIR}/${PYPKGNM} )
     endif( NOT py_extensions_NO_INIT_FILE )
+
+    if( py_extensions_SETUP_TEMPLATE )
+        message( STATUS "setup.py will be generated for ${PYPKGNM} from ${py_extensions_SETUP_TEMPLATE}" )
+        configure_file( ${py_extensions_SETUP_TEMPLATE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py )
+    endif( py_extensions_SETUP_TEMPLATE )

     set( PY_MODULES_INSTALL_DIR ${PY_MODULES_INSTALL_DIR} PARENT_SCOPE )
     set( PYPKGNM ${PYPKGNM} PARENT_SCOPE )


(Re)activated the mitkNavigationToolStorageSerializerAndDeserializerTest

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -34,10 +34,7 @@
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp
-   # -----------------------------------------------------------------------
-
-   # ------------------ Deavtivated Tests ----------------------------------
-   # mitkNavigationToolStorageSerializerAndDeserializerTest.cpp # see bug 12730
+   mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
    # -----------------------------------------------------------------------
 )


removed outdated comments

removed outdated comments

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -22,7 +22,6 @@
    mitkTrackingVolumeGeneratorTest.cpp
    mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp
-# This test fails randomly, see bug #8033
    mitkVirtualTrackingDeviceTest.cpp
    mitkNavigationDataPlayerTest.cpp
    mitkTrackingDeviceSourceTest.cpp
@@ -32,7 +31,7 @@

    # ------------------ Navigation Tool Management Tests -------------------
    mitkNavigationToolStorageTest.cpp
-   mitkNavigationToolStorageSerializerAndDeserializerTest.cpp #deactivated, see bug #10701
+   mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
    mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp
    # -----------------------------------------------------------------------


ENH: Update Hippo_Kitware_TubeTK.cmake

ENH: Update Hippo_Kitware_TubeTK.cmake

--- Hippo_Kitware_TubeTK.cmake
+++ Hippo_Kitware_TubeTK.cmake
@@ -97,7 +97,7 @@
 set( SITE_NIGHTLY_BUILD ON )
 set( SITE_NIGHTLY_TEST ON )
 set( SITE_NIGHTLY_CPPCHECK ON )
-set( SITE_NIGHTLY_KWSTYLE ON )
+set( SITE_NIGHTLY_KWSTYLE OFF )
 set( SITE_NIGHTLY_COVERAGE OFF )
 set( SITE_NIGHTLY_MEMORY OFF )
 set( SITE_NIGHTLY_PACKAGE ON )


Changes to try debugging Travis failure

Changes to try debugging Travis failure

Former-commit-id: 7779c9873c52a0d206f03725c35bbee874c8bb59

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -33,6 +33,7 @@
     DEPENDS ${args_GENERATOR_TARGET}
     COMMAND ${EXEC_PATH} ${args_GENERATOR_ARGS}
     WORKING_DIRECTORY ${args_GENFILES_DIR}
+    COMMENT "Executing Generator ${args_GENERATOR_TARGET} with args ${args_GENERATOR_ARGS}..."
   )

   add_custom_target(${EXEC_TARGET} DEPENDS ${args_OUTPUTS})
@@ -104,6 +105,7 @@
     GENFILES_DIR     ${GENFILES_DIR}
     OUTPUTS          "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}"
   )
+  set_source_files_properties("${GENFILES_DIR}/${FILTER_HDR}" PROPERTIES GENERATED TRUE)
 endfunction(halide_add_aot_library)

 # Usage:


build: Fix zlib.cmake install behavior

build: Fix zlib.cmake install behavior

Install zlib to a zlib-specific prefix under the build directory to be
more consistent with how the other external projects are handled.

--- contrib/zlib.cmake
+++ contrib/zlib.cmake
@@ -1,14 +1,15 @@
 # build zlib
 set(zlib_PREFIX ${CMAKE_BINARY_DIR}/contrib/zlib-prefix)
+set(zlib_INSTALL ${CMAKE_BINARY_DIR}/contrib/zlib-install)
+
 ExternalProject_Add(zlib
     PREFIX ${zlib_PREFIX}
     GIT_REPOSITORY "https://github.com/madler/zlib.git"
     GIT_TAG "v1.2.8"
     BUILD_IN_SOURCE 1
-    CONFIGURE_COMMAND ${zlib_PREFIX}/src/zlib/configure --prefix=${zlib_PREFIX} --static
-    BUILD_COMMAND ${MAKE}
-    INSTALL_COMMAND ""
+    CONFIGURE_COMMAND ${zlib_PREFIX}/src/zlib/configure --prefix=${zlib_INSTALL} --static
+    INSTALL_DIR ${zlib_INSTALL}
     )

-include_directories(${zlib_PREFIX}/src)
-set(zlib_LIB ${zlib_PREFIX}/src/zlib/libz.a)
+include_directories(${zlib_INSTALL}/src)
+set(zlib_LIB ${zlib_INSTALL}/lib/libz.a)


Fixed source_group in source/ENERGY

Fixed source_group in source/ENERGY

--- source/ENERGY/sources.cmake
+++ source/ENERGY/sources.cmake
@@ -20,4 +20,4 @@
 SET(BALL_sources ${BALL_sources} ${SOURCES})

 ### source group definition ###
-SOURCE_GROUP("Source Files\\DATATYPE" FILES ${SOURCE})
+SOURCE_GROUP("Source Files\\ENERGY" FILES ${SOURCE})


Add some more warning compile switches.

Add some more warning compile switches.

--- ppc_gcc.cmake
+++ ppc_gcc.cmake
@@ -9,7 +9,7 @@
 SET (CMAKE_C_COMPILER "/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux/powerpc-poky-linux-gcc")
 SET (CMAKE_CXX_COMPILER "/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux/powerpc-poky-linux-g++")

-SET(CMAKE_C_FLAGS "-pipe -Wall -Wshadow -Wextra -Wunused-result -Wcast-qual -Wformat=2 -Wwrite-strings -Wmissing-prototypes -std=c99 -pedantic" CACHE STRING "" FORCE)
+SET(CMAKE_C_FLAGS "-pipe -Wall -Wshadow -Wextra -Winit-self -Wstrict-overflow=5 -Wunused-result -Wcast-qual -Wcast-align -Wpointer-arith -Wformat=2 -Wwrite-strings -Wmissing-prototypes -std=c99 -pedantic" CACHE STRING "" FORCE)
 #SET(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
 SET(CMAKE_C_FLAGS_RELEASE "-O2 -flto -fomit-frame-pointer" CACHE STRING "" FORCE)
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb" CACHE STRING "" FORCE)


liblib as prefix doe not make too much sense

--- sundials/config/FindKLU.cmake
+++ sundials/config/FindKLU.cmake
@@ -18,7 +18,7 @@
 #
 # Set library prefixes for Windows
 IF(WIN32)
-  set(CMAKE_FIND_LIBRARY_PREFIXES lib ${CMAKE_FIND_LIBRARY_PREFIXES})
+  set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
   set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
 endif()

@@ -39,8 +39,6 @@
 else ()
     # find library with user provided directory path
     set(KLU_LIBRARY_NAME klu)
-    message(STATUS ${KLU_LIBRARY_DIR})
-    message(STATUS ${CMAKE_FIND_LIBRARY_PREFIXES})
     find_library(KLU_LIBRARY ${KLU_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH)
 endif ()
 mark_as_advanced(KLU_LIBRARY)


Remowing warning C4251 on MSVC.

Remowing warning C4251 on MSVC.

Signed-off-by: Etienne Schmitt <25d5031dc1a1d443222aec9a4e916501ae23c255@inria.fr>

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -105,6 +105,7 @@
 	# C4714 - marked as __forceinline but not inlined
 	# C4505 - unreferenced local function has been removed (impossible to deactive selectively)
 	# C4910 - __declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
-	add_flags(CMAKE_CXX_FLAGS "/EHsc /wd4127 /wd4505 /wd4714 /wd4910")
+	# C4251 - 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
+	add_flags(CMAKE_CXX_FLAGS "/EHsc /wd4127 /wd4505 /wd4714 /wd4910 /wd4251")

 endif()


Ensure ENABLE_IPV6 option is considered

Ensure ENABLE_IPV6 option is considered

The option has been introduced in commit 9baa8f2 but the value was
always set to 1 at the end of the configure checks.

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -1057,7 +1057,6 @@
 endif(APPLE)

 # todo
-set(ENABLE_IPV6 1)
 set(HAVE_UCS4_TCL 0)
 set(HAVE_PROTOTYPES 1)
 set(PTHREAD_SYSTEM_SCHED_SUPPORTED 1)


Update oneDNN. (#4950)

Update oneDNN. (#4950)

--- cmake/external/onednn.cmake
+++ cmake/external/onednn.cmake
@@ -119,8 +119,8 @@

 FetchContent_Declare(
     ext_dnnl
-    URL       https://github.com/oneapi-src/oneDNN/archive/v1.6.1.zip
-    URL_HASH  SHA1=5ebbe215ac1dd3121fe34511c9ffb597ec1d7a48
+    URL       https://github.com/oneapi-src/oneDNN/archive/v1.6.2.zip
+    URL_HASH  SHA1=d183155342cc8b842dea49992c544efe7ee2bbe9
 )

 FetchContent_GetProperties(ext_dnnl)


Revert "Adds more control for building MKL-DNN. (#322)" (#336)

This reverts commit 393830296b6fde049a2bdf8b520cf79d1c789196.

It looks like the commit actually suppressed parallel makes
of MKL-DNN, at least in the case where ngraph itself was being
built with parallel make.  It also introduced problems with
make jobserver warnings.

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -17,34 +17,6 @@
 # Fetch and install MKL-DNN
 #----------------------------------------------------------------------------------------------------------

-set(MKLDNN_BUILD_COMMAND_EXTRA_FLAGS ""
-    CACHE STRING "Additional flags to supply to '${CMAKE_MAKE_PROGRAM}' when building MKLDNN."
-    )
-
-set(MKLDNN_CMAKE_EXTRA_FLAGS ""
-    CACHE STRING "Additional flags to supply to 'cmake' when building the MKLDNN build."
-    )
-
-# CMake is a terrible language when it comes to lists and strings.  Here's the behavior we *want*:
-#   1. CMake's user enters a space-separated list of additional command-line argments to be supplied
-#      to the 'make' invocation that builds MKL-DNN.
-#
-#   2. When that 'make' invocation occurs, each of thoise command-line arguments is a separate token
-#      on the command-line of the 'make' invocation.
-#
-# To avoid CMake grouping all of those command-line arguments together into a single, quote-
-# delimited string on the 'make' command-line, we need to temporarily convert the user-specified,
-# space-separated string into a CMake semicolon-separated list.
-separate_arguments(MKLDNN_BUILD_COMMAND_EXTRA_FLAGS_LIST UNIX_COMMAND
-    "${MKLDNN_BUILD_COMMAND_EXTRA_FLAGS}"
-    )
-
-separate_arguments(MKLDNN_CMAKE_EXTRA_FLAGS_LIST UNIX_COMMAND
-    "${MKLDNN_CMAKE_EXTRA_FLAGS}"
-    )
-
-#----------------------------------------------------------------------------------------------------------
-
 if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

     set(MKLDNN_GIT_REPO_URL https://github.com/01org/mkl-dnn)
@@ -60,10 +32,7 @@
             UPDATE_COMMAND ""
             # Uncomment below with any in-flight MKL-DNN patches
             # PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
-            CMAKE_ARGS
-                -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
-                ${MKLDNN_CMAKE_EXTRA_FLAGS_LIST}
-            BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}" ${MKLDNN_BUILD_COMMAND_EXTRA_FLAGS_LIST}
+            CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
             )
     else()
         ExternalProject_Add(
@@ -73,11 +42,8 @@
             UPDATE_COMMAND ""
             # Uncomment below with any in-flight MKL-DNN patches
             # PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
+            CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
             BUILD_BYPRODUCTS "${MKLDNN_INSTALL_DIR}/include/mkldnn.hpp"
-            CMAKE_ARGS
-                -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
-                ${MKLDNN_CMAKE_EXTRA_FLAGS_LIST}
-            BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}" ${MKLDNN_BUILD_COMMAND_EXTRA_FLAGS_LIST}
             )
     endif()


Use `${CMAKE_COMMAND}` instead of `cmake`.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -36,7 +36,7 @@
     endif()

     add_custom_command(OUTPUT symbol.def
-      COMMAND cmake -E echo "EXPORTS" > symbol.def
+      COMMAND ${CMAKE_COMMAND} -E echo "EXPORTS" > symbol.def
       COMMAND ${CAT} ${export_file} >> symbol.def
       DEPENDS ${export_file}
       VERBATIM
@@ -423,7 +423,7 @@
     add_dependencies(${target} ${ARG_DEPENDS})
   else()
     add_custom_target(${target}
-      COMMAND cmake -E echo "${target} does nothing, no tools built.")
+      COMMAND ${CMAKE_COMMAND} -E echo "${target} does nothing, no tools built.")
     message(STATUS "${target} does nothing.")
   endif()


[CMake] Silence stderr on "COMMAND ${CMAKE_C_COMPILER} -Wl,--version". It was noisy during configuraion.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -146,6 +146,7 @@
   execute_process(
     COMMAND ${CMAKE_C_COMPILER} -Wl,--version
     OUTPUT_VARIABLE stdout
+    ERROR_QUIET
     )
   if("${stdout}" MATCHES "GNU gold")
     set(LLVM_LINKER_IS_GOLD ON)


build: allow specifying the component to `llvm_install_symlink`

Add an optional parameter to `llvm_install_symlink` which allows the symlink
installation to be placed into a specific component rather than the default
value.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1254,7 +1254,7 @@
 endfunction()

 function(llvm_install_symlink name dest)
-  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
+  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
   foreach(path ${CMAKE_MODULE_PATH})
     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
       set(INSTALL_SYMLINK ${path}/LLVMInstallSymlink.cmake)
@@ -1262,10 +1262,14 @@
     endif()
   endforeach()

-  if(ARG_ALWAYS_GENERATE)
-    set(component ${dest})
-  else()
-    set(component ${name})
+  if(ARG_COMPONENT)
+    set(component ${ARG_COMPONENT})
+  else()
+    if(ARG_ALWAYS_GENERATE)
+      set(component ${dest})
+    else()
+      set(component ${name})
+    endif()
   endif()

   set(full_name ${name}${CMAKE_EXECUTABLE_SUFFIX})


Fixed cmake for new file names.

Fixed cmake for new file names.

--- cmake/oskar_packaging.cmake
+++ cmake/oskar_packaging.cmake
@@ -2,10 +2,10 @@
 # CMake Packaging macros for OSKAR.
 #

-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/readme.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OSKAR-${OSKAR_VERSION}")
 set(CPACK_PACKAGE_VENDOR "University of Oxford, Oxford e-Research Centre.")
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/copying.txt")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.md")
 set(CPACK_PACKAGE_VERSION_MAJOR "${OSKAR_VERSION_MAJOR}")
 set(CPACK_PACKAGE_VERSION_MINOR "${OSKAR_VERSION_MINOR}")
 set(CPACK_PACKAGE_VERSION_PATCH "${OSKAR_VERSION_PATCH}")


Remove a typo

Remove a typo


now astyle works on linux

now astyle works on linux

--- dist/WkBuild.cmake
+++ dist/WkBuild.cmake
@@ -182,9 +182,14 @@
 	FILE(GLOB_RECURSE HEADERS RELATIVE ${PROJECT_SOURCE_DIR} include/*.h include/*.hh include/*.hpp)
 	FILE(GLOB_RECURSE SOURCES RELATIVE ${PROJECT_SOURCE_DIR} src/*.c src/*.cpp src/*.cc)

+	set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/")
 	FIND_PACKAGE(AStyle)
 	IF ( ASTYLE_FOUND )
-		MESSAGE (STATUS " ASTYLE FOUND !!!!!" )
+		option (${PROJECT_NAME}_CODE_FORMAT "Enable Code Formatting" ON)
+		IF ( ${PROJECT_NAME}_CODE_FORMAT )
+			set(${PROJECT_NAME}_CODE_FORMAT_STYLE "ansi" CACHE STRING "Format Style for AStyle")
+		ENDIF ( ${PROJECT_NAME}_CODE_FORMAT )
+		ADD_CUSTOM_TARGET(format ALL ${ASTYLE_EXECUTABLE} "--style=${${PROJECT_NAME}_CODE_FORMAT_STYLE}" "${HEADERS}" "${SOURCES}" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} VERBATIM )
 	ENDIF ( ASTYLE_FOUND )

 	#Including configured headers (
@@ -219,6 +224,10 @@
 	else (${project_type} STREQUAL "LIBRARY")
 		message( FATAL_ERROR " Project Type can only be EXECUTABLE or LIBRARY " )
 	endif(${project_type} STREQUAL "LIBRARY")
+
+	if( ASTYLE_FOUND )
+		add_dependencies(${PROJECT_NAME} format)
+	endif( ASTYLE_FOUND )

 	#
 	# Defining where to put what has been built
@@ -269,7 +278,7 @@

 	# if possible by using WkFind modules
 	# maybe belongs somewhere else
-	set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+	set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/")

 	find_package( ${package_name} ${ARGN} )
 	if ( ${package_name}_FOUND )


Add option to generate C# wrappers (#287)

--- lcm-cmake/lcmUtilities.cmake
+++ lcm-cmake/lcmUtilities.cmake
@@ -5,6 +5,7 @@
 #                  [CPP_HEADERS <VARIABLE_NAME>
 #                   [CPP_INCLUDE <PATH>] [CPP11]]
 #                  [JAVA_SOURCES <VARIABLE_NAME>]
+#                  [CSHARP_SOURCES <VARIABLE_NAME>]
 #                  [PYTHON_SOURCES <VARIABLE_NAME>]
 #                  [LUA_SOURCES <VARIABLE_NAME>]
 #                  [GO_SOURCES <VARIABLE_NAME>]
@@ -176,6 +177,7 @@
     C_HEADERS C_SOURCES C_INCLUDE C_EXPORT
     CPP_HEADERS CPP_INCLUDE
     JAVA_SOURCES
+    CSHARP_SOURCES
     PYTHON_SOURCES
     LUA_SOURCES
     GO_SOURCES
@@ -202,12 +204,13 @@
   if(NOT DEFINED _C_HEADERS AND
      NOT DEFINED _CPP_HEADERS AND
      NOT DEFINED _JAVA_SOURCES AND
+     NOT DEFINED _CSHARP_SOURCES AND
      NOT DEFINED _PYTHON_SOURCES AND
      NOT DEFINED _LUA_SOURCES AND
      NOT DEFINED _GO_SOURCES)
     message(SEND_ERROR
       "lcm_wrap_types: at least one of C_HEADERS, CPP_HEADERS, JAVA_SOURCES,"
-      " PYTHON_SOURCES, LUA_SOURCES or GO_SOURCES is required")
+      " CSHARP_SOURCES, PYTHON_SOURCES, LUA_SOURCES or GO_SOURCES is required")
     return()
   endif()

@@ -249,6 +252,9 @@
   endif()
   if(DEFINED _JAVA_SOURCES)
     list(APPEND _args --java --jpath ${_DESTINATION})
+  endif()
+  if(DEFINED _CSHARP_SOURCES)
+    list(APPEND _args --csharp --csharp-path ${_DESTINATION})
   endif()
   if(DEFINED _PYTHON_SOURCES)
     list(APPEND _args --python --python-no-init --ppath ${_DESTINATION})
@@ -342,6 +348,13 @@
             _lcm_add_outputs(_JAVA_SOURCES ${_package_dir}/${_type}.java)
           endif()
         endif()
+        if(DEFINED _CSHARP_SOURCES)
+          if(_package_dir STREQUAL ".")
+            _lcm_add_outputs(_CSHARP_SOURCES LCMTypes/${_type}.cs)
+          else()
+            _lcm_add_outputs(_CSHARP_SOURCES ${_package_dir}/${_type}.cs)
+          endif()
+        endif()
       endif()
     endforeach()

@@ -372,6 +385,7 @@
   _lcm_export(_C_HEADERS)
   _lcm_export(_CPP_HEADERS)
   _lcm_export(_JAVA_SOURCES)
+  _lcm_export(_CSHARP_SOURCES)
   _lcm_export(_PYTHON_SOURCES)
   _lcm_export(_LUA_SOURCES)
   _lcm_export(_GO_SOURCES)


Doxygen: Added compute shaders to doxygen

--- docs/doxygen.cmake
+++ docs/doxygen.cmake
@@ -177,17 +177,18 @@

 INCLUDE_PATH           = ${incpaths}

-EXTENSION_MAPPING      = no_extension=C++ frag=C++ vert=C++ geom=C++ glsl=C++
+EXTENSION_MAPPING      = no_extension=C++ frag=C++ vert=C++ geom=C++ glsl=C++ comp=C++

 FILE_PATTERNS          = *.c \\
                          *.cpp \\
                          *.hpp \\
                          *.h \\
                          *.cl \\
+                         *.dox \\
+                         *.comp \\
                          *.frag \\
                          *.vert \\
                          *.geom \\
-                         *.dox \\
                          *.glsl

 RECURSIVE              = YES
@@ -299,7 +300,7 @@
         FILTER_PATTERNS
     )
     cmake_parse_arguments(HARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
-
+
     string(TOLOWER ${HARG_NAME} name_lower)

     set(aliases_list
@@ -400,13 +401,20 @@
     set(GENERATE_IMG "YES")

     if(PYTHONINTERP_FOUND)
-        #set(PREFIX_PYTHON "")
-        set(PREFIX_PYTHON "${PYTHON_EXECUTABLE} ") # This is sometimes needed but gives errors on win7
+        if(${MSVC})
+            set(PREFIX_PYTHON "python ")
+        else()
+            set(PREFIX_PYTHON "python3 ")
+        endif()
+        #string(REPLACE " " "\ " SPACE_PYTHON ${PYTHON_EXECUTABLE})
+        #set(PREFIX_PYTHON "${SPACE_PYTHON} ") # This is sometimes needed but gives errors on win7
+
         set(filer_patterns_list
             "\"*.frag=${PREFIX_PYTHON}${ivw_doxy_dir}/filter/glslfilter.py\""
             "\"*.vert=${PREFIX_PYTHON}${ivw_doxy_dir}/filter/glslfilter.py\""
             "\"*.geom=${PREFIX_PYTHON}${ivw_doxy_dir}/filter/glslfilter.py\""
             "\"*.glsl=${PREFIX_PYTHON}${ivw_doxy_dir}/filter/glslfilter.py\""
+            "\"*.comp=${PREFIX_PYTHON}${ivw_doxy_dir}/filter/glslfilter.py\""
          )
     else()
         set(filer_patterns_list "")


MySql as custom Find module doesnt need variable name adapter as SDL find modules

--- dist/WkUtils.cmake
+++ dist/WkUtils.cmake
@@ -90,10 +90,9 @@
 	if ( ${${varname}} STREQUAL "STLPort" )
 		set ( ${varname} "STLPORT")
 	endif ( ${${varname}} STREQUAL "STLPort" )
-	if ( ${${varname}} STREQUAL "MySql" )
-		set ( ${varname} "MYSQL")
-	endif ( ${${varname}} STREQUAL "MySql" )
+	# NB : MySql doesnt require renaming here as it is our own module and variable name and package name are the same
 	#etc.
 	# add whats needed for the projects we support, waiting for a standard way in cmake modules...
+	#

 endmacro(SetPackageVarName varname pkgname)


Add bsymbolic flags to linux linker

Add bsymbolic flags to linux linker

The problem with not having these flags are:

`libhostfxr.so` and `libhostpolicy.so` would still keep using common functions that are defined in `dotnet.exe` effectively void a servicing override. Of course, servicing of common code would service both `dotnet.exe` and `libhostpolicy.so`, but this is needed to match Windows for consistency and is easier to reason about.

--- cli/setup.cmake
+++ cli/setup.cmake
@@ -37,6 +37,12 @@
     add_compile_options(-Wno-unused-local-typedef)
 endif()

+# This is required to map a symbol reference to a matching definition local to the module (.so)
+# containing the reference instead of using definitions from other modules.
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions")
+endif()
+
 if(CLI_CMAKE_PLATFORM_ARCH_I386)
     add_definitions(-D_TARGET_X86_=1)
 elseif(CLI_CMAKE_PLATFORM_ARCH_AMD64)


Fixed missing extern C in embedded asset compilation units.

--- embed_assets.cmake
+++ embed_assets.cmake
@@ -27,8 +27,8 @@
 	file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.cpp" CONTENT
 "#include <mirrage/asset/embedded_asset.hpp>

-extern const char ${ID}[];
-extern int ${ID}_size;
+extern \"C\" const char ${ID}[];
+extern \"C\" int ${ID}_size;

 static auto mirrage_asset_reg = mirrage::asset::Embedded_asset(\"${target}\",
 		gsl::span<const gsl::byte>{reinterpret_cast<const gsl::byte*>(&*${ID}), ${ID}_size});


bump version

bump version

--- CMakeModules/FCLVersion.cmake
+++ CMakeModules/FCLVersion.cmake
@@ -1,8 +1,8 @@
 # set the version in a way CMake can use
 set(FCL_MAJOR_VERSION 0)
-set(FCL_MINOR_VERSION 2)
-set(FCL_PATCH_VERSION 9)
+set(FCL_MINOR_VERSION 3)
+set(FCL_PATCH_VERSION 0)
 set(FCL_VERSION "${FCL_MAJOR_VERSION}.${FCL_MINOR_VERSION}.${FCL_PATCH_VERSION}")

 # increment this when we have ABI changes
-set(FCL_ABI_VERSION 3)
+set(FCL_ABI_VERSION 4)


Working TensorFlow ROCm on AMD Fiji GPU

Working TensorFlow ROCm on AMD Fiji GPU

--- cmake/ExternalTensorflow.cmake
+++ cmake/ExternalTensorflow.cmake
@@ -51,7 +51,7 @@
         PREFIX ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm
         BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm
         GIT_REPOSITORY "https://github.com/ROCmSoftwarePlatform/tensorflow-upstream"
-        GIT_TAG "r1.13-rocm"
+        GIT_TAG "r1.14-rocm"
         UPDATE_COMMAND ""
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
@@ -73,13 +73,13 @@
                 cd ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm/src/tensorflow_download_rocm/ && bazel build -c opt --config=rocm //tensorflow:libtensorflow_cc.so
             INSTALL_COMMAND
                 echo "Installing tensorflow binary" &&
-                cp -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm/src/tensorflow_download_rocm/bazel-bin/tensorflow/libtensorflow_cc.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_cc_ROCm.so &&
-                cp -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm/src/tensorflow_download_rocm/bazel-bin/tensorflow/libtensorflow_framework.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_framework_ROCm.so &&
+                cp -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm/src/tensorflow_download_rocm/bazel-bin/tensorflow/libtensorflow_cc.so.1.14.0 ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_cc_ROCm.so &&
+                cp -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm/src/tensorflow_download_rocm/bazel-bin/tensorflow/libtensorflow_framework.so.1.14.0 ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_framework_ROCm.so &&
                 chmod a+w ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_cc_ROCm.so &&
                 chmod a+w ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_framework_ROCm.so &&
                 patchelf --set-soname libtensorflow_cc_ROCm.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_cc_ROCm.so &&
                 patchelf --set-soname libtensorflow_framework_ROCm.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_framework_ROCm.so &&
-                patchelf --replace-needed libtensorflow_framework.so libtensorflow_framework_ROCm.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_cc_ROCm.so &&
+                patchelf --replace-needed libtensorflow_framework.so.1 libtensorflow_framework_ROCm.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/libtensorflow_cc_ROCm.so &&
                 echo "Installing tensorflow headers" &&
                 cp -rf ${FAST_EXTERNAL_BUILD_DIR}/tensorflow_rocm/src/tensorflow_download_rocm/tensorflow/ ${FAST_EXTERNAL_INSTALL_DIR}/include/ &&
                 echo "Installing tensorflow generated headers" &&


FindLAPACK lint

FindLAPACK lint

--- cmake/Modules/FindLAPACK.cmake
+++ cmake/Modules/FindLAPACK.cmake
@@ -119,10 +119,7 @@
 if(LAPACK_ATLAS AND BLAS_C_ATLAS AND BLAS_LIBRARY AND ATLAS_LIB)
   set(LAPACK_Atlas_FOUND true PARENT_SCOPE)
   set(LAPACK_LIBRARY ${LAPACK_ATLAS} ${BLAS_C_ATLAS} ${BLAS_LIBRARY} ${ATLAS_LIB})
-  if(NOT WIN32)
-    find_package(Threads)  # not required--for example Flang
-    list(APPEND LAPACK_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
-  endif()
+  list(APPEND LAPACK_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
 endif()

 set(LAPACK_LIBRARY ${LAPACK_LIBRARY} PARENT_SCOPE)
@@ -202,9 +199,7 @@
 list(APPEND LAPACK_LIBRARY ${BLAS_LIBRARY})
 set(LAPACK_Netlib_FOUND true PARENT_SCOPE)

-if(NOT WIN32)
-  list(APPEND LAPACK_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
-endif()
+list(APPEND LAPACK_LIBRARY ${CMAKE_THREAD_LIBS_INIT})

 set(LAPACK_LIBRARY ${LAPACK_LIBRARY} PARENT_SCOPE)
 set(LAPACK_INCLUDE_DIR ${LAPACK_INCLUDE_DIR} PARENT_SCOPE)
@@ -238,10 +233,7 @@
 list(APPEND LAPACK_LIBRARY ${BLAS_LIBRARY})
 set(LAPACK_OpenBLAS_FOUND true PARENT_SCOPE)

-if(NOT WIN32)
- find_package(Threads)  # not required--for example Flang
- list(APPEND LAPACK_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
-endif()
+list(APPEND LAPACK_LIBRARY ${CMAKE_THREAD_LIBS_INIT})

 set(LAPACK_LIBRARY ${LAPACK_LIBRARY} PARENT_SCOPE)
 set(LAPACK_INCLUDE_DIR ${LAPACK_INCLUDE_DIR} PARENT_SCOPE)
@@ -309,6 +301,7 @@
 endif()

 find_package(PkgConfig)
+find_package(Threads)

 # ==== generic MKL variables ====

@@ -318,10 +311,6 @@
   file(TO_CMAKE_PATH "$ENV{MKLROOT}" MKLROOT)

   list(APPEND CMAKE_PREFIX_PATH ${MKLROOT}/tools/pkgconfig)
-
-  if(NOT WIN32)
-    find_package(Threads)
-  endif()

   if(BUILD_SHARED_LIBS)
     set(_mkltype dynamic)


Fix for ROOT-6836 (make build fails on Yosemite)

--- cmake/modules/SetUpMacOS.cmake
+++ cmake/modules/SetUpMacOS.cmake
@@ -131,7 +131,7 @@
   endif()

   #---Set Linker flags----------------------------------------------------------------------
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/../lib")
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}  -mmacosx-version-min=${MACOSX_VERSION} -Wl,-rpath,@loader_path/../lib")

 else (CMAKE_SYSTEM_NAME MATCHES Darwin)


Use ${_prefix}_VERSION} rather than ${_xprefix}_VERSION} in
pkg_check_pkgconfig macro because the latter is not defined.  This
fixes a FORCE_EXTERNAL_STATIC bug.

svn path=/trunk/; revision=12063

--- cmake/modules/pkg-config.cmake
+++ cmake/modules/pkg-config.cmake
@@ -94,7 +94,9 @@
     set(${_include_DIR} ${${_xprefix}_INCLUDE_DIRS})
     set(${_link_DIR}    ${${_xprefix}_LIBRARY_DIRS})
     set(${_cflags}      ${${_xprefix}_CFLAGS})
-    set(${_version}     ${${_xprefix}_VERSION})
+    # N.B. must use ${_prefix}_VERSION} rather than ${_xprefix}_VERSION}
+    # because the latter is not defined.
+    set(${_version}     ${${_prefix}_VERSION})
     set(_return_VALUE 0)
   else(${_prefix}_FOUND)
     set(${_include_DIR})
@@ -109,6 +111,7 @@
   #message("${_link_DIR} = ${${_link_DIR}}")
   #message("${_link_FLAGS} = ${${_link_FLAGS}}")
   #message("${_cflags} = ${${_cflags}}")
+  #message("${_version} = ${${_version}}")
 endmacro(pkg_check_pkgconfig)

 macro(pkg_config_link_flags _link_flags_out _link_flags_in)


More work todo

More work todo

--- cmake/platform/Propeller.cmake
+++ cmake/platform/Propeller.cmake
@@ -21,7 +21,7 @@
 # C Flags ######################################################################

 set(PROPELLER_C_FLAGS
-"-ffunction-sections -fdata-sections -m32bit-doubles") # -mfcache
+"-ffunction-sections -fdata-sections -m32bit-doubles -mfcache")

 set(CMAKE_C_FLAGS
 "-Os ${PROPELLER_C_FLAGS} -std=c99") # removed -g
@@ -305,9 +305,11 @@
     if("${COGC_FILE_EXT}" STREQUAL ".cogc")
         set(COGC_COMPILIER "${CMAKE_C_COMPILER}")
         set(COGC_FLAGS "${CMAKE_C_FLAGS} -Os -mcog -r -xc")
+        set(COGC_LANGUAGE "C")
     elseif("${COGC_FILE_EXT}" STREQUAL ".cogcpp")
         set(COGC_COMPILIER "${CMAKE_CXX_COMPILER}")
         set(COGC_FLAGS "${CMAKE_CXX_FLAGS} -Os -mcog -r -xc++")
+        set(COGC_LANGUAGE "CXX")
     else()
         message(FATAL_ERROR "Unknown file type \"${COGC_FILE_EXT}\"!")
     endif()
@@ -323,7 +325,7 @@
     "${CMAKE_BINARY_DIR}/CMakeFiles/cogc.dir/${COGC_FILE_OBJ}.obj")

     set_source_files_properties("${COGC_FILE_OBJ}" PROPERTIES
-    EXTERNAL_OBJECT TRUE GENERATED TRUE)
+    EXTERNAL_OBJECT TRUE GENERATED TRUE LANGUAGE "${COGC_LANGUAGE}")

     separate_arguments(COGC_FLAGS)

@@ -390,7 +392,7 @@
     "${CMAKE_BINARY_DIR}/CMakeFiles/spin.dir/${SPIN_FILE_OBJ}.obj")

     set_source_files_properties("${SPIN_FILE_OBJ}" PROPERTIES
-    EXTERNAL_OBJECT TRUE GENERATED TRUE)
+    EXTERNAL_OBJECT TRUE GENERATED TRUE LANGUAGE "C")

     get_filename_component(SPIN_FILE_OBJ_PATH "${SPIN_FILE_OBJ}" DIRECTORY)
     get_filename_component(SPIN_FILE_OBJ_NAME "${SPIN_FILE_OBJ}" NAME_WE)
@@ -727,7 +729,7 @@
             set_target_properties("${FF_PATH_NAME}" PROPERTIES
             COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
             LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
-            SUFFIX ".a" LINKER_LANGUAGE "CXX")
+            SUFFIX ".a")

             set(LIB_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)

@@ -768,7 +770,7 @@
             set_target_properties("${FF_PATH_NAME}" PROPERTIES
             COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
             LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
-            SUFFIX ".elf" LINKER_LANGUAGE "CXX")
+            SUFFIX ".elf")

             set(EXE_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)


COMP: post build depends on exe

COMP: post build depends on exe

--- CMake/OTBApplicationMacros.cmake
+++ CMake/OTBApplicationMacros.cmake
@@ -127,7 +127,8 @@
        "${APPLICATION_NAME}"
        "${APPLICATION_BINARY_PATH}"
        "${descriptor_output_dir}/"
-       #COMMENT "./bin/otbQgisDescriptor ${APPLICATION_NAME} ${APPLICATION_BINARY_PATH} ${descriptor_output_dir}"
+       DEPENDS otbQgisDescriptor
+       #COMMENT "./bin/otbQgisDescriptor ${APPLICATION_NAME} ${APPLICATION_BINARY_PATH} ${descriptor_output_dir}/"
        WORKING_DIRECTORY ${OTB_BINARY_DIR} VERBATIM)
      install(FILES ${dfile} DESTINATION ${OTB_INSTALL_DESCR_DIR})
    endif()


cublas, curand, and cusparse are huge! Only installing cudart and cufft to keep packaged build sizes down.

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@3887 fa922fa7-2fde-0310-acd8-f43f465a7996

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -57,7 +57,7 @@

     # determine the directory of the found cuda libs
     get_filename_component(_cuda_libdir ${CUDA_CUDART_LIBRARY} PATH)
-    FILE(GLOB _cuda_libs "${_cuda_libdir}/lib*")
+    FILE(GLOB _cuda_libs ${_cuda_libdir}/libcudart* ${_cuda_libdir}/libcufft*)
     install(PROGRAMS ${_cuda_libs} DESTINATION ${LIB_INSTALL_DIR})

 endif (ENABLE_EMBED_CUDA)


- allow to pick up debug library rather than fail to detect them

--- CMakeModules/FindCROSSGUID.cmake
+++ CMakeModules/FindCROSSGUID.cmake
@@ -2,6 +2,7 @@
 # Properties, Inc., University of Heidelberg, and University of
 # of Connecticut School of Medicine.
 # All rights reserved.
+

@@ -44,7 +45,7 @@
   endif (NOT CROSSGUID_INCLUDE_DIR)

   find_library(CROSSGUID_LIBRARY
-    NAMES crossguid
+    NAMES crossguid crossguid-dgb
     PATHS $ENV{CROSSGUID_DIR}/lib
           $ENV{CROSSGUID_DIR}
           ${COPASI_DEPENDENCY_DIR}/lib


Fixed files.cmake and added StateMachineFactoryTest to custom tests

--- Core/Code/Testing/files.cmake
+++ Core/Code/Testing/files.cmake
@@ -35,7 +35,6 @@
   mitkSlicedGeometry3DTest.cpp
   mitkSliceNavigationControllerTest.cpp
   mitkStateMachineTest.cpp
-  mitkStateMachineFactoryTest.cpp
   mitkStateTest.cpp
   mitkSurfaceTest.cpp
   mitkSurfaceToSurfaceFilterTest.cpp
@@ -88,5 +87,6 @@
     mitkDICOMLocaleTest.cpp
     mitkEventMapperTest.cpp
     mitkNodeDependentPointSetInteractorTest.cpp
+    mitkStateMachineFactoryTest.cpp
 )


fix: Duplicate ‘lib’ target issue [BASIS]

--- CMake/Basis/ProjectTools.cmake
+++ CMake/Basis/ProjectTools.cmake
@@ -1631,7 +1631,9 @@
   endforeach ()
   if (TARGETS)
     basis_make_target_uid (LIBRARY_TARGET lib)
-    add_custom_target (${LIBRARY_TARGET} ALL)
+    if (NOT TARGET ${LIBRARY_TARGET})
+      add_custom_target (${LIBRARY_TARGET} ALL)
+    endif ()
     basis_add_dependencies (${LIBRARY_TARGET} ${TARGETS})
   endif ()
 endfunction ()


CSharp: Fix sample target names and ensure that all samples are properly grouped in VS.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -170,7 +170,7 @@
 macro (add_sample TARGET)
     if ("${ARGN}" STREQUAL CSHARP)
         if (DESKTOP)    # TODO: Support other platforms
-            add_target_csharp(102_CSharpProject ${CMAKE_CURRENT_SOURCE_DIR}/102_CSharpProject.csproj)
+            add_target_csharp(${TARGET} ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.csproj)
             add_dependencies(${TARGET} Urho3DNet)
             if (MSVC AND URHO3D_WITH_MONO)
                 # On windows managed sample executable will not run when double-clicked. Create a
@@ -197,7 +197,6 @@
         endif ()
         target_link_libraries (${TARGET} Urho3D)
         target_include_directories(${TARGET} PRIVATE ..)
-        set_target_properties(${TARGET} PROPERTIES FOLDER Samples)
         if (NOT ANDROID)
             install(TARGETS ${TARGET} RUNTIME DESTINATION ${DEST_SAMPLES_DIR})
         endif ()
@@ -215,6 +214,7 @@
             target_link_libraries(${TARGET} "-s NO_EXIT_RUNTIME=1" "-s WASM=1" "--pre-js ${CMAKE_BINARY_DIR}/Source/pak-loader.js")
         endif ()
     endif ()
+    set_target_properties(${TARGET} PROPERTIES FOLDER Samples)
 endmacro ()

 # Macro deploys Qt dlls to folder where target executable is located.


Updated CMake config file to point to correct library directory for installed library.

--- CMake/TBTKConfigTemplate.cmake
+++ CMake/TBTKConfigTemplate.cmake
@@ -9,7 +9,7 @@
 LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Modules/")

 #Add link directory for global install
-#LINK_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/..)
+LINK_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/..)
 #Add link directory for build directory
 LINK_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/../Lib/src/)


MITK 2013.03.02 version update

MITK 2013.03.02 version update

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -7,7 +7,7 @@
 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2013")
 set(MITK_VERSION_MINOR "03")
-set(MITK_VERSION_PATCH "00")
+set(MITK_VERSION_PATCH "02")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")


Forge tag update for ArrayFire 3.1.2

Forge tag update for ArrayFire 3.1.2

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -22,7 +22,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG af3.1
+    GIT_TAG af3.1.2
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


v2x: adding update_golden command in v2x cmake

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- v2x_tests.cmake
+++ v2x_tests.cmake
@@ -5,7 +5,6 @@
   # ~~~
   # V2X_GENERIC_TEST(
   #   NAME name
-  #   TOP_MODULE name
   #   TYPE pb_type | model
   #   )
   # ~~~
@@ -15,14 +14,13 @@
   # Therefore, this function is used to generalize and perform the desired test.
   #
   # NAME name of the test.
-  # TOP_MODULE name of the top verilog module that has to be tested.
   # TYPE type of test that has to be performed (model or pb_type generation).
   #
   # In addition it adds the newly created target to the `all_v2x_tests` dependencies. (all tests will be performed with `make all_v2x_tests`)
   #
-  # Usage: v2x_generic_test(NAME <test_name> TOP_MODULE <top_module.v> TYPE <model|pb_type>) (All fields are required)
+  # Usage: v2x_generic_test(NAME <test_name> TYPE <model|pb_type>) (All fields are required)

-  set(oneValueArgs NAME TOP_MODULE TYPE)
+  set(oneValueArgs NAME TYPE)
   cmake_parse_arguments(
     V2X_GENERIC_TEST
     "${options}"
@@ -31,21 +29,28 @@
     ${ARGN}
   )

+  set(TYPE ${V2X_GENERIC_TEST_TYPE})
+  set(NAME ${V2X_GENERIC_TEST_NAME})

   # pb_type checking
-  set(V2X_GENERIC_TEST_GOLDEN_XML golden.${V2X_GENERIC_TEST_TYPE}.xml)
-  add_file_target(FILE ${V2X_GENERIC_TEST_GOLDEN_XML} SCANNER_TYPE xml)
-  xml_sort(NAME ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_golden_sort FILE ${V2X_GENERIC_TEST_GOLDEN_XML} OUTPUT ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.golden.xml)
+  set(GOLDEN_XML golden.${TYPE}.xml)
+  add_file_target(FILE ${GOLDEN_XML} SCANNER_TYPE xml)
+  xml_sort(NAME ${NAME}_${TYPE}_golden_sort FILE ${GOLDEN_XML} OUTPUT ${NAME}.${TYPE}.golden.xml)

-  set(V2X_GENERIC_TEST_ACTUAL_XML ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.xml)
-  xml_sort(NAME ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_actual_sort FILE ${V2X_GENERIC_TEST_ACTUAL_XML} OUTPUT ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.actual.xml)
+  set(ACTUAL_XML ${NAME}.${TYPE}.xml)
+  xml_sort(NAME ${NAME}_${TYPE}_actual_sort FILE ${ACTUAL_XML} OUTPUT ${NAME}.${TYPE}.actual.xml)

-  diff(NAME ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_diff GOLDEN ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.golden.xml ACTUAL ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.actual.xml)
+  diff(NAME ${NAME}_${TYPE}_diff GOLDEN ${NAME}.${TYPE}.golden.xml ACTUAL ${NAME}.${TYPE}.actual.xml)

-  add_dependencies(all_v2x_tests ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_diff)
+  add_dependencies(all_v2x_tests ${NAME}_${TYPE}_diff)

   # TODO This has to be completed in order update the golden pb_type/model accordingly
-  add_custom_target(${V2X_GENERIC_TEST_NAME}_update_golden_${V2X_GENERIC_TEST_TYPE})
+  add_custom_target(${NAME}_update_golden_${TYPE})
+  add_custom_command(
+    TARGET ${NAME}_update_golden_${TYPE}
+    POST_BUILD
+    COMMAND cp ${ACTUAL_XML} ${CMAKE_CURRENT_SOURCE_DIR}/golden.${TYPE}.xml
+    )
 endfunction(V2X_GENERIC_TEST)

 function(V2X_TEST_MODEL)
@@ -63,7 +68,7 @@
   #
   # Usage: v2x_test_model(NAME <test_name> TOP_MODULE <top_module.v>) (All fields are required)

-  set(oneValueArgs NAME TOP_MODULE TYPE)
+  set(oneValueArgs NAME TOP_MODULE)
   cmake_parse_arguments(
     V2X_TEST_MODEL
     "${options}"
@@ -72,13 +77,16 @@
     ${ARGN}
   )

-  set(V2X_TEST_MODEL_SRC ${V2X_TEST_MODEL_NAME}.sim.v)
-  add_file_target(FILE ${V2X_TEST_MODEL_SRC} SCANNER_TYPE verilog)
-  v2x(NAME ${V2X_TEST_MODEL_NAME} SRCS ${V2X_TEST_MODEL_SRC} TOP_MODULE ${V2X_TEST_MODEL_TOP_MODULE})
+  set(NAME ${V2X_TEST_MODEL_NAME})
+  set(TOP_MODULE ${V2X_TEST_MODEL_TOP_MODULE})

-  v2x_generic_test(NAME ${V2X_TEST_MODEL_NAME} TOP_MODULE ${V2X_TEST_MODEL_TOP_MODULE} TYPE model)
+  set(SRC ${NAME}.sim.v)
+  add_file_target(FILE ${SRC} SCANNER_TYPE verilog)
+  v2x(NAME ${NAME} SRCS ${SRC} TOP_MODULE ${TOP_MODULE})

-  add_custom_target(${V2X_TEST_MODEL_NAME}_diff ALL DEPENDS ${V2X_TEST_MODEL_NAME}_model_diff)
+  v2x_generic_test(NAME ${NAME} TOP_MODULE ${TOP_MODULE} TYPE model)
+
+  add_custom_target(${NAME}_diff ALL DEPENDS ${NAME}_model_diff)
 endfunction(V2X_TEST_MODEL)

 function(V2X_TEST_PB_TYPE)
@@ -96,7 +104,7 @@
   #
   # Usage: v2x_test_model(NAME <test_name> TOP_MODULE <top_module.v>) (All fields are required)

-  set(oneValueArgs NAME TOP_MODULE TYPE)
+  set(oneValueArgs NAME TOP_MODULE)
   cmake_parse_arguments(
     V2X_TEST_PB_TYPE
     "${options}"
@@ -105,13 +113,16 @@
     ${ARGN}
   )

-  set(V2X_TEST_PB_TYPE_SRC ${V2X_TEST_PB_TYPE_NAME}.sim.v)
-  add_file_target(FILE ${V2X_TEST_PB_TYPE_SRC} SCANNER_TYPE verilog)
-  v2x(NAME ${V2X_TEST_PB_TYPE_NAME} SRCS ${V2X_TEST_PB_TYPE_SRC} TOP_MODULE ${V2X_TEST_PB_TYPE_TOP_MODULE})
+  set(NAME ${V2X_TEST_MODEL_NAME})
+  set(TOP_MODULE ${V2X_TEST_MODEL_TOP_MODULE})

-  v2x_generic_test(NAME ${V2X_TEST_PB_TYPE_NAME} TOP_MODULE ${V2X_TEST_PB_TYPE_TOP_MODULE} TYPE pb_type)
+  set(SRC ${NAME}.sim.v)
+  add_file_target(FILE ${SRC} SCANNER_TYPE verilog)
+  v2x(NAME ${NAME} SRCS ${SRC} TOP_MODULE ${TOP_MODULE})

-  add_custom_target(${V2X_TEST_PB_TYPE_NAME}_diff ALL DEPENDS ${V2X_TEST_PB_TYPE_NAME}_pb_type_diff)
+  v2x_generic_test(NAME ${NAME} TOP_MODULE ${TOP_MODULE} TYPE pb_type)
+
+  add_custom_target(${NAME}_diff ALL DEPENDS ${NAME}_pb_type_diff)
 endfunction(V2X_TEST_PB_TYPE)

 function(V2X_TEST_BOTH)
@@ -130,7 +141,7 @@
   #
   # Usage: v2x_test_model(NAME <test_name> TOP_MODULE <top_module.v>) (All fields are required)

-  set(oneValueArgs NAME TOP_MODULE TYPE)
+  set(oneValueArgs NAME TOP_MODULE)
   cmake_parse_arguments(
     V2X_TEST_BOTH
     "${options}"
@@ -139,12 +150,15 @@
     ${ARGN}
   )

-  set(V2X_TEST_BOTH_SRC ${V2X_TEST_BOTH_NAME}.sim.v)
-  add_file_target(FILE ${V2X_TEST_BOTH_SRC} SCANNER_TYPE verilog)
-  v2x(NAME ${V2X_TEST_BOTH_NAME} SRCS ${V2X_TEST_BOTH_SRC} TOP_MODULE ${V2X_TEST_BOTH_TOP_MODULE})
+  set(NAME ${V2X_TEST_BOTH_NAME})
+  set(TOP_MODULE ${V2X_TEST_BOTH_TOP_MODULE})

-  v2x_generic_test(NAME ${V2X_TEST_BOTH_NAME} TOP_MODULE ${V2X_TEST_BOTH_TOP_MODULE} TYPE pb_type)
-  v2x_generic_test(NAME ${V2X_TEST_BOTH_NAME} TOP_MODULE ${V2X_TEST_BOTH_TOP_MODULE} TYPE model)
+  set(SRC ${NAME}.sim.v)
+  add_file_target(FILE ${SRC} SCANNER_TYPE verilog)
+  v2x(NAME ${NAME} SRCS ${SRC} TOP_MODULE ${TOP_MODULE})

-  add_custom_target(${V2X_TEST_BOTH_NAME}_diff ALL DEPENDS ${V2X_TEST_BOTH_NAME}_pb_type_diff ${V2X_TEST_BOTH_NAME}_model_diff)
+  v2x_generic_test(NAME ${NAME} TOP_MODULE ${MODULE} TYPE pb_type)
+  v2x_generic_test(NAME ${NAME} TOP_MODULE ${TOP_MODULE} TYPE model)
+
+  add_custom_target(${NAME}_diff ALL DEPENDS ${NAME}_pb_type_diff ${NAME}_model_diff)
 endfunction(V2X_TEST_BOTH)


Add %defattr back to silent rpmlint

Add %defattr back to silent rpmlint

--- Modules/ManageRPM.cmake
+++ Modules/ManageRPM.cmake
@@ -168,6 +168,8 @@
 make install DESTDIR=%{buildroot}"
 	)

+        SET(RPM_SPEC_FILES_SECTION_OUTPUT "%defattr(-,root,root-)")
+
 	# %{dist}
 	EXECUTE_PROCESS(COMMAND ${RPM_CMD} -E "%{dist}"
 	    COMMAND sed -e "s/^\\.//"
@@ -207,11 +209,23 @@
 	SET(RPM_CHANGELOG_FILE "${RPM_BUILD_SPECS}/RPM-ChangeLog")
 	SET(RPM_CHANGELOG_PREV_FILE "${RPM_CHANGELOG_FILE}.prev")
 	IF(NOT _cmake_fedora_dependency_missing)
-	    M_MSG(${M_INFO1} "Requesting newest changelog from koji")
-	    EXECUTE_PROCESS(
-		COMMAND ${CMAKE_FEDORA_KOJI_CMD} newest-changelog "${PROJECT_NAME}"
-	        OUTPUT_FILE ${RPM_CHANGELOG_PREV_FILE}
-	    )
+	    IF(EXISTS "${RPM_CHANGELOG_PREV_FILE}")
+		IF("${RELEASE_NOTES_FILE}" IS_NEWER_THAN "${RPM_CHANGELOG_PREV_FILE}")
+		    M_MSG(${M_INFO1} "Updating RPM-ChangeLog.prev from koji")
+		    EXECUTE_PROCESS(
+			COMMAND ${CMAKE_FEDORA_KOJI_CMD} newest-changelog "${PROJECT_NAME}"
+			OUTPUT_FILE ${RPM_CHANGELOG_PREV_FILE}
+			)
+		ELSE("${RELEASE_NOTES_FILE}" IS_NEWER_THAN "${RPM_CHANGELOG_PREV_FILE}")
+		    M_MSG(${M_INFO1} "RPM-ChangeLog.prev is newer than RELEASE-NOTES, no need to update")
+		ENDIF("${RELEASE_NOTES_FILE}" IS_NEWER_THAN "${RPM_CHANGELOG_PREV_FILE}")
+	    ELSE(EXISTS "${RPM_CHANGELOG_PREV_FILE}")
+		M_MSG(${M_INFO1} "Create newest RPM-ChangeLog.prev from koji")
+		EXECUTE_PROCESS(
+		    COMMAND ${CMAKE_FEDORA_KOJI_CMD} newest-changelog "${PROJECT_NAME}"
+		    OUTPUT_FILE ${RPM_CHANGELOG_PREV_FILE}
+		    )
+	    ENDIF(EXISTS "${RPM_CHANGELOG_PREV_FILE}")
 	ENDIF(NOT _cmake_fedora_dependency_missing)
 	IF(EXISTS ${RPM_CHANGELOG_PREV_FILE})
 	    # Update RPM_ChangeLog
@@ -220,7 +234,7 @@
 	    EXECUTE_PROCESS(COMMAND cat "${RPM_CHANGELOG_PREV_FILE}"
 		OUTPUT_VARIABLE RPM_CHANGELOG_PREV
 		OUTPUT_STRIP_TRAILING_WHITESPACE
-	    )
+		)
 	ELSE(EXISTS ${RPM_CHANGELOG_PREV_FILE})
 	    SET(RPM_CHNAGELOG_PREV "")
 	ENDIF(EXISTS ${RPM_CHANGELOG_PREV_FILE})
@@ -473,7 +487,7 @@
 	    ADD_CUSTOM_TARGET(rpmlint
 		COMMAND find .
 		-name '${PROJECT_NAME}*-${PRJ_VER}-${RPM_RELEASE_NO}.*.rpm'
-		-print -exec rpmlint '{}' '\\;'
+		-print -exec rpmlint -I '{}' '\\;'
 		DEPENDS ${PRJ_SRPM_FILE} ${PRJ_RPM_FILES}
 		)


Fix unit test CMake file

Fix unit test CMake file

--- Source/UnitTest/cmake_core.cmake
+++ Source/UnitTest/cmake_core.cmake
@@ -51,7 +51,7 @@
             ASTCENC_POPCNT=0)

     if (${ARCH} MATCHES x64)
-        target_compile_options(astcenc-${ISA_SIMD}
+        target_compile_options(test-simd-${ISA_SIMD}
             PRIVATE
                 $<$<CXX_COMPILER_ID:${GNU_LIKE}>:-mfpmath=sse -msse2>)
     endif()


Search version proj api

Search version proj api

--- source/cmake_modules/CompilationFlags.cmake
+++ source/cmake_modules/CompilationFlags.cmake
@@ -79,12 +79,19 @@
     set(NAVITIA_ALLOCATOR "")
 endif(USE_SANITIZER)

-exec_program(proj OUTPUT_VARIABLE PROJ_LIB_VERSION RETURN_VALUE _result)
-if("${_result}" EQUAL 0)
-    string(REGEX MATCH "([0-9]+).([0-9]+).([0-9]+)" _PROJ_LIB_VERSION "${PROJ_LIB_VERSION}")
-    message("-- Found Proj Library : ${_PROJ_LIB_VERSION}")
-    string(REGEX REPLACE "^([0-9]+).*" "\\1" _PROJ_API_VERSION_MAJOR "${_PROJ_LIB_VERSION}")
-    add_definitions("-DPROJ_API_VERSION_MAJOR_${_PROJ_API_VERSION_MAJOR}")
-else()
-    message(FATAL_ERROR "Could not find version of Proj Library ...")
+find_file(PROJ_FILE_NAME NAMES proj_api.h)
+if(NOT PROJ_FILE_NAME)
+    message(FATAL_ERROR "-- proj_api.h not found")
 endif()
+file(STRINGS ${PROJ_FILE_NAME} _PROJ_LIB_VERSION REGEX "^#define PJ_VERSION ([0-9]+)([0-9]+)([0-9]+)")
+STRING (REGEX REPLACE "^#define PJ_VERSION " "" _PROJ_LIB_VERSION "${_PROJ_LIB_VERSION}")
+message("-- Found Proj Library : ${_PROJ_LIB_VERSION}")
+if(${_PROJ_LIB_VERSION} LESS_EQUAL 400)
+    add_definitions("-DPROJ_API_VERSION_MAJOR_4")
+endif()
+if(${_PROJ_LIB_VERSION} GREATER_EQUAL 600)
+    add_definitions("-DPROJ_API_VERSION_MAJOR_6")
+endif()
+if(${_PROJ_LIB_VERSION} GREATER 400 AND ${_PROJ_LIB_VERSION} LESS 600)
+    message(FATAL_ERROR "-- Proj Library '${_PROJ_LIB_VERSION}' not supported ...")
+endif()


HDF standard build requires CMake 2.8.6.

--- hdf5.cmake
+++ hdf5.cmake
@@ -4,7 +4,7 @@

 if (NOT hdf5_NAME)

-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)

 include (ExternalProject)
 include (ExternalSource)
@@ -46,4 +46,4 @@

 set_target_properties(${hdf5_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)

-endif (NOT hdf5_NAME)+endif (NOT hdf5_NAME)


Typo in cmake main_ci.cmake

Typo in cmake main_ci.cmake

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -80,16 +80,17 @@
 if ( OTB_DATA_USE_LARGEINPUT )
   find_path( OTB_DATA_LARGEINPUT_ROOT
       NAMES OTBData.readme
-      HINTS ${CTEST_SOURCE_DIRECTORY}/../../OTB-LargeInput ${OTB_LARGEINPUT_ROOT}
+      HINTS ${CTEST_SOURCE_DIRECTORY}/../../OTB-LargeInput
     )
 # For the CI the directory should be in
 # ${CTEST_SOURCE_DIRECTORY}/../../OTB-LargeInput
-  if( ${OTB_DATA_LARGEINPUT_ROOT} STREQUAL "${OTB_DATA_LARGEINPUT_ROOT}-NOTFOUND" )
+  if( NOT OTB_DATA_LARGEINPUT_ROOT )
     message( WARNING "Option -DOTB_DATA_USE_LARGEINPUT=ON is used but we \
 could not found the OTBData.readme file. Make sure you set the \
 OTB_DATA_LARGEINPUT_ROOT variable correctly.
 OTB_DATA_USE_LARGEINPUT will be set to OFF.")
-  set( OTB_DATA_USE_LARGEINPUT "OFF")
+    set( OTB_DATA_USE_LARGEINPUT "OFF")
+  endif()
 endif()

 message(STATUS "CI profile : ${ci_profile}")


REFAC: This file can be removed now that we builds cookbook as part of the OTB build

--- Documentation/Cookbook/CTestConfig.cmake
+++ Documentation/Cookbook/CTestConfig.cmake
@@ -1,7 +0,0 @@
-set(CTEST_PROJECT_NAME "Documentation")
-set(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
-
-set(CTEST_DROP_METHOD "https")
-set(CTEST_DROP_SITE "dash.orfeo-toolbox.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=Documentation")
-set(CTEST_DROP_SITE_CDASH TRUE)


Use macros due to scoping

Use macros due to scoping

--- functions.cmake
+++ functions.cmake
@@ -433,7 +433,7 @@
     set_property(GLOBAL APPEND PROPERTY MODULE_${MODULE_NAME}_TEST_TARGETS ${TARGET})
 endfunction()

-function(__handle_test_targets)
+macro(__handle_test_targets)
     # If this is a test executable, add it to the test target for this module
     # If building of unit tests is not specified, exclude this target from the all target
     if(ARG_TEST)
@@ -443,7 +443,7 @@
             set_target_properties(${TARGET} PROPERTIES EXCLUDE_FROM_ALL TRUE)
         endif()
     endif()
-endfunction()
+endmacro()

 function(__create_module_targets PROPERTY_POSTFIX TARGET_POSTFIX)
     get_property(VESPA_MODULES GLOBAL PROPERTY VESPA_MODULES)


Reenabled the original ('highest') warning levels by default.

--- build_options.cmake
+++ build_options.cmake
@@ -71,6 +71,7 @@
 TNUN_add_compile_options( Debug   ${TNUN_compiler_debug_flags} ${TNUN_compiler_debug_symbols} ${TNUN_compiler_runtime_sanity_checks} )
 TNUN_add_link_options   ( Debug   ${TNUN_linker_runtime_sanity_checks} )
 TNUN_add_compile_options( Release ${TNUN_compiler_release_flags} )
+add_compile_options( ${TNUN_default_warnings} )

 # Implementation note:


fixing incorrect github repo URL for this project

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -14,7 +14,7 @@
 set(CTEST_SOURCE_NAME "msi")
 set(CTEST_BINARY_NAME "build")

-set(REPO_URL_BASE "git@github.com:SCOREC/xgc_scorec")
+set(REPO_URL_BASE "git@github.com:SCOREC/msi")
 set(BRANCHES "master;dev")
 set(MERGE_AUTHOR "Nightly Bot <donotemail@scorec.rpi.edu>")


PackageConfig: only print success status once

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -58,6 +58,9 @@
   "set(_quiet)\n"
   "set(_fail)\n"
   "set(${UPPER_PROJECT_NAME}_COMPONENTS)\n"
+  "if(NOT ${UPPER_PROJECT_NAME}_FOUND)\n"
+  "  set(${UPPER_PROJECT_NAME}_STATUS ON)\n"
+  "endif()\n"
   "\n"
 # add dependent library finding
   "@DEPENDENTS@"
@@ -155,7 +158,7 @@
   "  set(${UPPER_PROJECT_NAME}_MODULE_FILENAME ${MODULE_FILENAME})\n"
   "  list(SORT ${UPPER_PROJECT_NAME}_INCLUDE_DIRS)\n"
   "  list(REMOVE_DUPLICATES ${UPPER_PROJECT_NAME}_INCLUDE_DIRS)\n"
-  "  if(_out)\n"
+  "  if(_out AND ${UPPER_PROJECT_NAME}_STATUS)\n"
   "    message(STATUS \"Found ${CMAKE_PROJECT_NAME} ${VERSION} [\${${UPPER_PROJECT_NAME}_COMPONENTS}] in \"\n"
   "      \"\${${UPPER_PROJECT_NAME}_INCLUDE_DIRS}:\${${UPPER_PROJECT_NAME}_LIBRARY}\")\n"
   "  endif()\n"


do not include MKL path when try to find it

--- cmake/FindMKL.cmake
+++ cmake/FindMKL.cmake
@@ -28,6 +28,5 @@
     MESSAGE (STATUS "NOT Found MKL headers")
     SET (MKL_FOUND FALSE)
 ELSE (${MKL_INCLUDE_DIR} STREQUAL MKL_INCLUDE_DIR-NOTFOUND)
-    INCLUDE_DIRECTORIES (${MKL_INCLUDE_DIR})
     MESSAGE (STATUS "Found MKL headers: ${MKL_INCLUDE_DIR}")
 ENDIF (${MKL_INCLUDE_DIR} STREQUAL MKL_INCLUDE_DIR-NOTFOUND)


Also look for TBB in sibling folder on Windows

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -50,6 +50,7 @@
     HINTS ${TBB_ROOT}
     PATHS
       ${PROJECT_SOURCE_DIR}/tbb
+      ${PROJECT_SOURCE_DIR}/../tbb
       "${PROGRAMFILES32}/IntelSWTools/compilers_and_libraries/windows/tbb"
       "${PROGRAMFILES32}/Intel/Composer XE/tbb"
       "${PROGRAMFILES32}/Intel/compilers_and_libraries/windows/tbb"


add fixme

add fixme

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -281,6 +281,7 @@

   file(GLOB GO_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.go")
   string(REPLACE "${PADDLE_GO_PATH}/" "" CMAKE_CURRENT_SOURCE_REL_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+  # FIXME: link path
   add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
     COMMAND rm "${${TARGET_NAME}_LIB_PATH}"
     # Golang build source code
@@ -299,6 +300,7 @@
   cmake_parse_arguments(go_binary "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   string(REPLACE "${PADDLE_GO_PATH}/" "" CMAKE_CURRENT_SOURCE_REL_DIR ${CMAKE_CURRENT_SOURCE_DIR})

+  # FIXME: link path
   add_custom_command(OUTPUT ${TARGET_NAME}_timestamp
       COMMAND env LIBRARY_PATH=${CMAKE_BINARY_DIR}/go/pserver/client/c/:$ENV{LIBRARY_PATH}
       GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build


FIX: add -lrt for link

FIX: add -lrt for link

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -93,7 +93,7 @@
 if(NOT APPLE)
     find_package(Threads REQUIRED)
     link_libraries(${CMAKE_THREAD_LIBS_INIT})
-    set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl")
+    set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl -lrt")
 endif(NOT APPLE)

 function(merge_static_libs TARGET_NAME)


Fix if/endif arguments in CMake options (#172)

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -26,7 +26,7 @@
   set(clawpack5 ON)
   set(clawpatch ON)
   set(clawpack3_46 ON)
-endif(clawpack3)
+endif(clawpack)

 if(geoclaw)
   set(clawpatch ON)


Minor CMake update

Minor CMake update

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[x] Bugfix
[ ] New Feature
[ ] Cleanup
[ ] Optimization
[ ] Documentation

--- UploadPPA.cmake
+++ UploadPPA.cmake
@@ -1,13 +1,20 @@
 ##
 # Copyright (c) 2010 Daniel Pfeifer <daniel@pfeifer-mail.de>
+#
+#  sudo apt-get install devscripts
 ##

 find_program(DEBUILD_EXECUTABLE debuild)
 find_program(DPUT_EXECUTABLE dput)

-if(NOT DEBUILD_EXECUTABLE OR NOT DPUT_EXECUTABLE)
+if(NOT DEBUILD_EXECUTABLE)
+  message(WARNING "debuild not found")
   return()
-endif(NOT DEBUILD_EXECUTABLE OR NOT DPUT_EXECUTABLE)
+endif()
+if(NOT DPUT_EXECUTABLE)
+  message(WARNING "dput not found")
+  return()
+endif()

 # DEBIAN/control
 # debian policy enforce lower case for package name


RPM: set log direcorty SELinux context premanently

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -9,7 +9,8 @@
 %define _datarootdir       %{_prefix}/share
 %define _datadir           %{_datarootdir}
 %define _docdir            %{_datadir}/doc
-%define flexisip_logdir    %{_localstatedir}/log/flexisip
+%define logdir             %{_localstatedir}/log
+%define flexisip_logdir    %{logdir}/flexisip

 # Hack: force _mandir to its default value because cmake-builder re-define it
 # on rpmbuild invokation with a bad value.
@@ -49,6 +50,19 @@

 %endif # %if %{debian_platform}

+
+%if %{centos_platform}
+
+%global selinux_logdir_context_post \
+semanage fcontext -a -t var_log_t '%{logdir}(/.*)?' 2>/dev/null || : \
+restorecon -R %{logdir} || :
+
+%global selinux_logdir_context_postun \
+if [ $1 -eq 0 ]; then  # final removal \
+	semanage fcontext -d -t var_log_t '%{logdir}(/.*)?' 2>/dev/null || : \
+fi
+
+%endif # %if %{centos_platform}

 Summary:       SIP proxy with media capabilities
@@ -193,14 +207,15 @@

 %if %centos_platform
 %post
+%selinux_logdir_context_post
 %systemd_post %flexisip_services
-/usr/bin/chcon -t chcon -t var_log_t %{flexisip_logdir} || true
 %endif

 %preun
 %systemd_preun %flexisip_services

 %postun
+%selinux_logdir_context_postun
 %systemd_postun_with_restart %flexisip_services

 %files


darwin.cmake now creates working xcode projects for the OS X build

--- build/toolchains/darwin.cmake
+++ build/toolchains/darwin.cmake
@@ -4,6 +4,9 @@
 set(EXECUTABLE_NAME "tangram.out")

 add_definitions(-DPLATFORM_OSX)
+
+# include headers for homebrew-installed libraries
+include_directories(/usr/local/include)

 # load core library
 include_directories(${PROJECT_SOURCE_DIR}/core/include/)
@@ -17,23 +20,29 @@

 # link and build functions
 function(link_libraries)
+
     find_library(OPENGL_FRAMEWORK OpenGL)
     find_library(COCOA_FRAMEWORK Cocoa)
     find_library(IOKIT_FRAMEWORK IOKit)
     find_library(CORE_FOUNDATION_FRAMEWORK CoreFoundation)
     find_library(CORE_VIDEO_FRAMEWORK CoreVideo)
+    find_library(GLFW glfw3)

-    list(APPEND GLFW_LIBRARY -lglfw3
-                             ${OPENGL_FRAMEWORK}
-                             ${COCOA_FRAMEWORK}
-                             ${IOKIT_FRAMEWORK}
-                             ${CORE_FOUNDATION_FRAMEWORK}
-                             ${CORE_VIDEO_FRAMEWORK})
+    list(APPEND GLFW_LIBRARIES
+        ${OPENGL_FRAMEWORK}
+        ${COCOA_FRAMEWORK}
+        ${IOKIT_FRAMEWORK}
+        ${CORE_FOUNDATION_FRAMEWORK}
+        ${CORE_VIDEO_FRAMEWORK}
+        ${GLFW})

     check_and_link_libraries(${EXECUTABLE_NAME} curl)
-    target_link_libraries(${EXECUTABLE_NAME} ${GLFW_LIBRARY} core)
+    target_link_libraries(${EXECUTABLE_NAME} core ${GLFW_LIBRARIES})
+
 endfunction()

 function(build)
+
     add_executable(${EXECUTABLE_NAME} ${SOURCES})
+
 endfunction()


set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on) to hopefully fix MSVC build problems with examples

--- cmake/jkqtplotter_common_compilersettings.cmake
+++ cmake/jkqtplotter_common_compilersettings.cmake
@@ -3,6 +3,7 @@
 # configure compiler
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED on)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on)

 if(MINGW)
   # COMPILER-SETTINGS FOR MINGW


Make FindIce only look for Ice once.

Make FindIce only look for Ice once.

It was looking for it every time a CMakeList.txt file referenced it, which
is annoying.

--- meta/FindIce.cmake
+++ meta/FindIce.cmake
@@ -21,109 +21,113 @@

 # start with 'not found'
 set( ICE_FOUND 0 CACHE BOOL "Do we have Ice?" )
-
-find_path( ICE_HOME_INCLUDE_ICE Ice.h
-  # rational for this search order:
-  #    source install w/env.var -> source install
-  #    package -> package
-  #    package + source install w/env.var -> source install
-  #    package + source install w/out env.var -> package
-  #
-  # installation selected by user
-  ${ICE_HOME}/include/Ice
-  $ENV{ICE_HOME}/include/Ice
-  # debian package installs Ice here
-  /usr/include/Ice
-  # Test standard installation points: generic symlinks first, then standard dirs, newer first
-  /opt/Ice/include/Ice
-  /opt/Ice-4/include/Ice
-  /opt/Ice-4.0/include/Ice
-  /opt/Ice-3/include/Ice
-  /opt/Ice-3.5/include/Ice
-  /opt/Ice-3.4/include/Ice
-  /opt/Ice-3.4.1/include/Ice
-  /opt/Ice-3.4.2/include/Ice
-  # some people may manually choose to install Ice here
-  /usr/local/include/Ice
-  # windows
-  C:/Ice-3.4.0-VC80/include/Ice
-  C:/Ice-3.4.0/include/Ice
-  )
+if( NOT ICE_FOUND EQUAL 1 )
+  find_path( ICE_HOME_INCLUDE_ICE Ice.h
+    # rational for this search order:
+    #    source install w/env.var -> source install
+    #    package -> package
+    #    package + source install w/env.var -> source install
+    #    package + source install w/out env.var -> package
+    #
+    # installation selected by user
+    ${ICE_HOME}/include/Ice
+    $ENV{ICE_HOME}/include/Ice
+    # debian package installs Ice here
+    /usr/include/Ice
+    # Test standard installation points: generic symlinks first, then standard dirs, newer first
+    /opt/Ice/include/Ice
+    /opt/Ice-4/include/Ice
+    /opt/Ice-4.0/include/Ice
+    /opt/Ice-3/include/Ice
+    /opt/Ice-3.5/include/Ice
+    /opt/Ice-3.4/include/Ice
+    /opt/Ice-3.4.1/include/Ice
+    /opt/Ice-3.4.2/include/Ice
+    # some people may manually choose to install Ice here
+    /usr/local/include/Ice
+    # windows
+    C:/Ice-3.4.0-VC80/include/Ice
+    C:/Ice-3.4.0/include/Ice
+    )
 # message( STATUS "DEBUG: Ice.h is apparently found in : ${ICE_HOME_INCLUDE_ICE}" )

 # NOTE: if ICE_HOME_INCLUDE_ICE is set to *-NOTFOUND it will evaluate to FALSE
-if( ICE_HOME_INCLUDE_ICE )
+  if( ICE_HOME_INCLUDE_ICE )

-    set( ICE_FOUND 1 CACHE BOOL "Do we have Ice?" FORCE )
+      set( ICE_FOUND 1 CACHE BOOL "Do we have Ice?" FORCE )

-    # strip 'file' twice to get rid off 'include/Ice'
+      # strip 'file' twice to get rid off 'include/Ice'
 #     message( STATUS "DEBUG: ICE_HOME_INCLUDE_ICE=" ${ICE_HOME_INCLUDE_ICE} )
-    get_filename_component( ICE_HOME_INCLUDE ${ICE_HOME_INCLUDE_ICE} PATH )
-    #message( STATUS "DEBUG: ICE_HOME_INCLUDE=" ${ICE_HOME_INCLUDE} )
-    get_filename_component( ICE_HOME ${ICE_HOME_INCLUDE} PATH CACHE )
+      get_filename_component( ICE_HOME_INCLUDE ${ICE_HOME_INCLUDE_ICE} PATH )
+      #message( STATUS "DEBUG: ICE_HOME_INCLUDE=" ${ICE_HOME_INCLUDE} )
+      get_filename_component( ICE_HOME ${ICE_HOME_INCLUDE} PATH CACHE )

-    message( STATUS "Setting ICE_HOME to ${ICE_HOME}" )
+      message( STATUS "Setting ICE_HOME to ${ICE_HOME}" )

-    # include and lib dirs are easy
-    set( ICE_INCLUDE_DIR ${ICE_HOME}/include )
-    set( ICE_LIBRARY_DIR ${ICE_HOME}/lib )
+      # include and lib dirs are easy
+      set( ICE_HOME ${ICE_HOME} CACHE INTERNAL "Ice home" )
+      set( ICE_INCLUDE_DIR ${ICE_HOME}/include CACHE INTERNAL "Ice include directory" )
+      set( ICE_LIBRARY_DIR ${ICE_HOME}/lib CACHE INTERNAL "Ice library directory" )

-    include_directories( ${ICE_INCLUDE_DIR} )
-    link_directories( ${ICE_LIBRARY_DIR} )
+      include_directories( ${ICE_INCLUDE_DIR} )
+      link_directories( ${ICE_LIBRARY_DIR} )

-    # Slice files are often installed elsewhere
-    find_path( ICE_SLICE_ICE Communicator.ice
-        # installation selected by user
-        ${ICE_SLICE_DIR}/Ice
-        $ENV{ICE_SLICE_DIR}/Ice
-        # standard Ice installation puts here
-        ${ICE_HOME}/slice/Ice
-        # debian package installs it here
-        /usr/share/slice/Ice
-        # slackware package installs it here
-        /usr/share/Ice/slice/Ice
-    )
+      # Slice files are often installed elsewhere
+      find_path( ICE_SLICE_ICE Communicator.ice
+          # installation selected by user
+          ${ICE_SLICE_DIR}/Ice
+          $ENV{ICE_SLICE_DIR}/Ice
+          # standard Ice installation puts here
+          ${ICE_HOME}/slice/Ice
+          # debian package installs it here
+          /usr/share/slice/Ice
+          # slackware package installs it here
+          /usr/share/Ice/slice/Ice
+      )

-    # NOTE: if ICE_SLICE_ICE is set to *-NOTFOUND it will evaluate to FALSE
-    if( NOT ICE_SLICE_ICE )
-        message( FATAL_ERROR "Ice was found but Slice file installation was not. Check Ice installation or specify ICE_SLICE_DIR manually." )
-    endif()
+      # NOTE: if ICE_SLICE_ICE is set to *-NOTFOUND it will evaluate to FALSE
+      if( NOT ICE_SLICE_ICE )
+          message( FATAL_ERROR "Ice was found but Slice file installation was not. Check Ice installation or specify ICE_SLICE_DIR manually." )
+      endif()

-    # strip 'file' once to get rid off 'Ice'
+      # strip 'file' once to get rid off 'Ice'
 #     message( STATUS "DEBUG: ICE_SLICE_ICE=" ${ICE_SLICE_ICE} )
-    get_filename_component( ICE_SLICE_DIR ${ICE_SLICE_ICE} PATH )
-    message( STATUS "Slice files were found in ${ICE_SLICE_DIR}" )
+      get_filename_component( ICE_SLICE_DIR ${ICE_SLICE_ICE} PATH )
+      message( STATUS "Slice files were found in ${ICE_SLICE_DIR}" )

-    # some libs only care about IceUtil, we tell them to find IceUtil in the same place as Ice.
-    set( ICEUTIL_HOME ${ICE_HOME} )
-    message( STATUS "Setting ICEUTIL_HOME to ${ICEUTIL_HOME}" )
+      # some libs only care about IceUtil, we tell them to find IceUtil in the same place as Ice.
+      set( ICEUTIL_HOME ${ICE_HOME} CACHE INTERNAL "IceUtil home directory" )
+      set( ICE_SLICE_DIR ${ICE_SLICE_DIR} CACHE INTERNAL "Slice directory" )
+      message( STATUS "Setting ICEUTIL_HOME to ${ICEUTIL_HOME}" )

-endif( ICE_HOME_INCLUDE_ICE )
+  endif( ICE_HOME_INCLUDE_ICE )

 #
 # Ice for Java
 #

 # start with 'not found'
-set( ICEJ_FOUND 0 CACHE BOOL "Do we have Ice for Java?" )
+  set( ICEJ_FOUND 0 CACHE BOOL "Do we have Ice for Java?" )

 # don't bother if Ice for C++ was not found
-if( ICE_FOUND )
+  if( ICE_FOUND )

-    find_path( ICEJ_HOME Ice.jar
-    # installation selected by user
-    $ENV{ICEJ_HOME}
-    # debian package installs Ice here
-    /usr/share/java
-    # maybe user put it into the same place as Ice
-    ${ICE_HOME}/lib
-    )
-
-    if( ICEJ_HOME )
-
-        set( ICEJ_FOUND 1 CACHE BOOL "Do we have Ice?" FORCE )
-        message( STATUS "Setting ICEJ_HOME to ${ICEJ_HOME}" )
-
-    endif( ICEJ_HOME )
+      find_path( ICEJ_HOME Ice.jar
+      # installation selected by user
+      $ENV{ICEJ_HOME}
+      # debian package installs Ice here
+      /usr/share/java
+      # maybe user put it into the same place as Ice
+      ${ICE_HOME}/lib
+      )
+
+      if( ICEJ_HOME )
+
+          set( ICEJ_FOUND 1 CACHE BOOL "Do we have Ice?" FORCE )
+          message( STATUS "Setting ICEJ_HOME to ${ICEJ_HOME}" )
+          set( ICEJ_HOME ${ICEJ_HOME} CACHE INTERNAL "IceJ home" )
+
+      endif( ICEJ_HOME )

-endif( ICE_FOUND )
+  endif( ICE_FOUND )
+endif()


Cosmetics

Cosmetics

--- SubProject.cmake
+++ SubProject.cmake
@@ -130,7 +130,7 @@

     add_custom_target(update_git_subprojects_${PROJECT_NAME}
       COMMAND ${CMAKE_COMMAND} -P ${GIT_SUBPROJECTS_SCRIPT}
-      COMMENT "Recreate ${PROJECT_NAME}/.gitsubprojects"
+      COMMENT "Update ${PROJECT_NAME}/.gitsubprojects"
       WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")

     if(NOT TARGET update)


ENH: Add option to build FADTTS during superbuild.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -67,6 +67,11 @@
 set(ITK_EXTERNAL_NAME ITKv${ITK_VERSION_MAJOR})

 set(${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${ITK_EXTERNAL_NAME} VTK SlicerExecutionModel DTIProcess QtToCppXML)
+
+option(BUILD_FADTTS "Build FADTTS during superbuild" OFF)
+if(BUILD_FADTTS)
+  set(${PRIMARY_PROJECT_NAME}_DEPENDENCIES ${${PRIMARY_PROJECT_NAME}_DEPENDENCIES} FADTTS)
+endif()

 if(BUILD_STYLE_UTILS)
   list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES Cppcheck KWStyle Uncrustify)


Send also static libraries to ${PROJECT_BINARY_DIR}/lib

--- modules/default_build_paths.cmake
+++ modules/default_build_paths.cmake
@@ -5,8 +5,10 @@
 #
 # Variables modified::
 #
+#   CMAKE_ARCHIVE_OUTPUT_DIRECTORY
+#   CMAKE_LIBRARY_OUTPUT_DIRECTORY
 #   CMAKE_RUNTIME_OUTPUT_DIRECTORY
-#   CMAKE_LIBRARY_OUTPUT_DIRECTORY

+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)


Skip Vespa 5 compatibility script

Skip Vespa 5 compatibility script

--- install_java.cmake
+++ install_java.cmake
@@ -57,7 +57,6 @@
 vespa_install_script(config-proxy/src/main/sh/vespa-config-loadtester bin)
 vespa_install_script(config-proxy/src/main/sh/vespa-config-verification bin)
 vespa_install_script(config-model/src/main/perl/vespa-deploy bin)
-vespa_install_script(config-model/src/main/perl/vespa-deploy-application bin)
 vespa_install_script(config-model/src/main/perl/vespa-expand-config.pl bin)
 vespa_install_script(config-model/src/main/perl/vespa-replicate-log-stream bin)
 vespa_install_script(config-model/src/main/sh/vespa-validate-application bin)


cmake: Update FindCPLEX (#3252)

cmake: Update FindCPLEX (#3252)

--- cmake/FindCPLEX.cmake
+++ cmake/FindCPLEX.cmake
@@ -74,13 +74,14 @@
   target_include_directories(CPLEX::CPLEX SYSTEM INTERFACE "${CPLEX_ROOT}/cplex/include")

   if(APPLE) # be aware that `UNIX` is `TRUE` on OS X, so this check must be first
-    # FIXME(mizux) need actual macOS library path
-    # target_link_libraries(CPLEX::CPLEX INTERFACE "${CPLEX_ROOT}/cplex/lib/libcplex.lib")
-    message(FATAL_ERROR "CPLEX not yet supported for CMake builds on ${CMAKE_SYSTEM}")
+    set_target_properties(CPLEX::CPLEX PROPERTIES
+      IMPORTED_LOCATION "${CPLEX_ROOT}/cplex/lib/x86-64_osx/static_pic/libcplex.a")
   elseif(UNIX)
-    target_link_libraries(CPLEX::CPLEX INTERFACE "${CPLEX_ROOT}/cplex/lib/x86-64_linux/static_pic/libcplex.a")
+    set_target_properties(CPLEX::CPLEX PROPERTIES
+      IMPORTED_LOCATION "${CPLEX_ROOT}/cplex/lib/x86-64_linux/static_pic/libcplex.a")
   elseif(MSVC)
-    target_link_libraries(CPLEX::CPLEX INTERFACE "${CPLEX_ROOT}/cplex/lib/x64_windows_msvc14/stat_mda/cplex12100.lib")
+    set_target_properties(CPLEX::CPLEX PROPERTIES
+      IMPORTED_LOCATION "${CPLEX_ROOT}/cplex/lib/x64_windows_msvc14/stat_mda/cplex12100.lib")
   else()
     message(FATAL_ERROR "CPLEX not supported for ${CMAKE_SYSTEM}")
   endif()


Update FindNLOPT.cmake

Update FindNLOPT.cmake

--- cmake/FindNLOPT.cmake
+++ cmake/FindNLOPT.cmake
@@ -14,7 +14,7 @@
     HINTS ${PC_NLOPT_INCLUDEDIR} ${PC_NLOPT_INCLUDE_DIRS}
     PATHS "${CMAKE_INSTALL_PREFIX}/include")

-find_library(NLOPT_LIBRARY NAMES nlopt
+find_library(NLOPT_LIBRARY NAMES nlopt nlopt_cxx
              HINTS ${PC_NLOPT_LIBDIR} ${PC_NLOPT_LIBRARY_DIRS} )

 set(NLOPT_LIBRARIES ${NLOPT_LIBRARY})


removed debug message

removed debug message

--- cmake/Findadolc.cmake
+++ cmake/Findadolc.cmake
@@ -72,7 +72,6 @@
         find_package_handle_standard_args(adolc DEFAULT_MSG
                                         ${adolc_LIBRARIES} ${adolc_INCLUDE_DIRS})
     else()
-        message(STATUS "rgdfhnlldfgkj.")
         # handle the QUIETLY and REQUIRED arguments and set adolc_FOUND to TRUE
         # if all listed variables are TRUE
         find_package_handle_standard_args(adolc  DEFAULT_MSG


add debug info for the farm ...

add debug info for the farm ...

--- cmake/rosbuild2.cmake
+++ cmake/rosbuild2.cmake
@@ -32,6 +32,29 @@
       COMMENT "Generating dynamic reconfigure stuff from ${_cfg}: ${_output_cpp} ${_output_py}"
       )

+    execute_process(
+      COMMAND ${CATKIN_ENV}
+      ${_input}
+      ${dynamic_reconfigure_SELF_DIR}/..
+      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}
+      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}
+      RESULT_VARIABLE RES_VAR
+      OUTPUT_VARIABLE OUT_VAR
+      ERROR_VARIABLE ERR_VAR
+      )
+    message(INFO "${CATKIN_ENV}
+      ${_input}
+      ${dynamic_reconfigure_SELF_DIR}/..
+      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}
+      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+      ${CATKIN_BUILD_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}"
+    )
+    message(INFO ${RES_VAR})
+    message(INFO ${OUT_VAR})
+    message(INFO ${ERR_VAR})
+
+
     list(APPEND ${PROJECT_NAME}_generated
       ${_output_cpp} ${_output_py}
       )


[brief] Updates compiler identifiers for Visual Studio 2017.

[detailed]
- Adds support for VS 2017.

--- config/Compiler.cmake
+++ config/Compiler.cmake
@@ -4,12 +4,11 @@

 # First identify the compiler we're using.
 if (MSVC)
-    if ((MSVC_VERSION EQUAL 1800) OR
-        (MSVC_VERSION EQUAL 1900))
+    if ((MSVC_VERSION VERSION_GREATER 1800))
         set(ATLAS_COMPILER_MSVC 1)
         message(STATUS "Using MSVC ${MSVC_VERSION}...")
     else()
-        message(FATAL_ERROR "Atlas requires Visual Studio 12 or 14 to run.")
+        message(FATAL_ERROR "Atlas requires at least Visual Studio 12 to run.")
     endif()
 elseif(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
         set(ATLAS_COMPILER_CLANG 1)


Split off 7.6.0

Split off 7.6.0

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

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
-set ( HPCC_MINOR 5 )
-set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MINOR 6 )
+set ( HPCC_POINT 1 )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.4.50

Split off 8.4.50

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

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


Split off 7.8.42

Split off 7.8.42

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 8 )
-set ( HPCC_POINT 41 )
+set ( HPCC_POINT 43 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


ENH: Update ITK version

ENH: Update ITK version

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -33,7 +33,7 @@
 #if(DEFINED ${extProjName}_DIR AND NOT EXISTS ${${extProjName}_DIR})
 #  message(FATAL_ERROR "${extProjName}_DIR variable is defined but corresponds to non-existing directory (${${extProjName}_DIR})")
 #endif()
-set(${proj}_DEPENDENCIES "")
+set(${proj}_DEPENDENCIES "VTK")

 if(NOT ( DEFINED "USE_SYSTEM_${extProjName}" AND "${USE_SYSTEM_${extProjName}}" ) )
   #message(STATUS "${__indent}Adding project ${proj}")
@@ -159,6 +159,8 @@
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
       -DITK_USE_SYSTEM_DCMTK:BOOL=${${PROJECT_NAME}_BUILD_DICOM_SUPPORT}
       -DModule_ITKIOPhilipsREC:BOOL=ON
+      -DModule_ITKVtkGlue:BOOL=ON
+      -DVTK_DIR:PATH=${VTK_DIR}
       ${${proj}_TIFF_ARGS}
       ${${proj}_JPEG_ARGS}
       ${${proj}_ZLIB_ARGS}
@@ -170,8 +172,8 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG 9dc4f194046cedb4b392e181caec73b629ae7564)
-  set(ITK_VERSION_ID ITK-4.6)
+  set(${proj}_GIT_TAG 74155d0b7059fde841832c92a9aec78c79bc68c0)
+  set(ITK_VERSION_ID ITK-4.8)

   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}


ENH:  Updating to ITK compatible with OSX Mavericks

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -127,7 +127,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG 0c17e523d0c41af428c1aff639f70f6e28cd9c45) # 20-Aug-2013
+  set(${proj}_GIT_TAG 1926df35cf9fddc6a867349a63f4d55dca65bc04) # 7-Nov-2013
   set(ITK_VERSION_ID ITK-4.5)

   ExternalProject_Add(${proj}


Update paraview build with threading related build options

--- projects/paraview.cmake
+++ projects/paraview.cmake
@@ -29,6 +29,8 @@
     -DVTK_INSTALL_DATA_DIR:STRING=share/paraview
     -DVTK_INSTALL_DOC_DIR:STRING=share/doc/paraview
     -DVTK_CUSTOM_LIBRARY_SUFFIX:STRING=
+    -DVTK_PYTHON_FULL_THREADSAFE:BOOL=ON
+    -DVTK_NO_PYTHON_THREADS:BOOL=OFF
     -DPARAVIEW_QT_VERSION:STRING=5
     -DPARAVIEW_BUILD_QT_GUI:BOOL=ON
     -DPARAVIEW_ENABLE_PYTHON:BOOL=ON


Added $ENV{MONALISA_DIR} to look for monalisa

--- cmake/modules/FindMonalisa.cmake
+++ cmake/modules/FindMonalisa.cmake
@@ -13,7 +13,8 @@

 find_path(MONALISA_INCLUDE_DIR ApMon.h
   ${MONALISA_DIR}/include
-  /usr/local/include
+  $ENV{MONALISA_DIR}/include
+  /usr/local/include
   /opt/alien/api/include
   /opt/monalisa/include
   /usr/include
@@ -22,7 +23,8 @@

 find_library(MONALISA_LIBRARY NAMES apmoncpp PATHS
   ${MONALISA_DIR}/lib
-  /usr/local/lib
+  $ENV{MONALISA_DIR}/lib
+  /usr/local/lib
   /opt/alien/api/lib
   /opt/monalisa/lib
   /usr/lib


CMake: FindTRILINOS.cmake: Drop /.../include/scotch from include dirs

scotch has the very unfortunate bad habit of containing a header file

  /usr/include/scotch/metis.h

If above directory is in our list of include directories, we will
accidentally pick up this header instead of /usr/include/metis.h

I assume it is safe to drop /usr/include/scotch/, this should be only
internally used in Trilinos...

Further, deduplicate library and include directory lists. *wow*

--- cmake/modules/FindTRILINOS.cmake
+++ cmake/modules/FindTRILINOS.cmake
@@ -150,12 +150,30 @@
 ENDIF()

 #
-# *Boy* Sanitize the include paths given by TrilinosConfig.cmake...
-#
+# *Boy* Sanitize variables that are exported by TrilinosConfig.cmake...
+#
+# Especially deduplicate stuff...
+#
+REMOVE_DUPLICATES(Trilinos_LIBRARIES REVERSE)
+REMOVE_DUPLICATES(Trilinos_TPL_LIBRARIES REVERSE)
+
+REMOVE_DUPLICATES(Trilinos_INCLUDE_DIRS)
 STRING(REGEX REPLACE
   "(lib64|lib)\\/cmake\\/Trilinos\\/\\.\\.\\/\\.\\.\\/\\.\\.\\/" ""
   Trilinos_INCLUDE_DIRS "${Trilinos_INCLUDE_DIRS}"
   )
+
+REMOVE_DUPLICATES(Trilinos_TPL_INCLUDE_DIRS)
+
+#
+# workaround: Do not pull in scotch include directory. It clashes with
+# our use of the metis headers...
+#
+FOREACH(_item ${Trilinos_TPL_INCLUDE_DIRS})
+  IF("${_item}" MATCHES "scotch$")
+    LIST(REMOVE_ITEM Trilinos_TPL_INCLUDE_DIRS ${_item})
+  ENDIF()
+ENDFOREACH()

 #
 # We'd like to have the full library names but the Trilinos package only


From Jean-Sebastien Guay, updated CTestConfig to point to new cdash.openscenegraph.org site

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,6 +8,6 @@
 set(CTEST_NIGHTLY_START_TIME "00:00:00 CET")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "www.cdash.org")
-set(CTEST_DROP_LOCATION "/CDashPublic/submit.php?project=OpenSceneGraph")
+set(CTEST_DROP_SITE "cdash.openscenegraph.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=OpenSceneGraph")
 set(CTEST_DROP_SITE_CDASH TRUE)


Corrected an error in CDash test config.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,5 +1,5 @@
 # CTest/CDash configuration
 SET (CTEST_DROP_METHOD "http")
 SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
-SET (CTEST_DROP_LOCATION "~wfisher/cdash/submit.php?project=WinNETCDF")
+SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
 SET (CTEST_DROP_SITE_CDASH TRUE)


[cdash] change project name to nix

[cdash] change project name to nix

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
-set(CTEST_PROJECT_NAME "libPandora")
+set(CTEST_PROJECT_NAME "nix")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=libPandora")
+set(CTEST_DROP_LOCATION "/submit.php?project=nix")
 set(CTEST_DROP_SITE_CDASH TRUE)


Update to latest cmake-modules

Update to latest cmake-modules

--- cmake/AddSAMPPluginTest.cmake
+++ cmake/AddSAMPPluginTest.cmake
@@ -16,6 +16,9 @@
   set(options TARGET OUTPUT_FILE SCRIPT TIMEOUT CONFIG WORKING_DIRECTORY)
   cmake_parse_arguments(ARG "" "${options}" "" ${ARGN})

+  find_package(SAMPServerCLI REQUIRED)
+  set(command ${SAMPServerCLI_EXECUTABLE})
+
   if(ARG_SCRIPT)
     list(APPEND args --gamemode ${ARG_SCRIPT})
   endif()
@@ -26,12 +29,6 @@

   if(ARG_WORKING_DIRECTORY)
     list(APPEND args --workdir ${ARG_WORKING_DIRECTORY})
-  endif()
-
-  if(WIN32)
-    set(command samp-server-cli.exe)
-  else()
-    set(command samp-server-cli)
   endif()

   add_test(NAME ${name} COMMAND ${command} ${args} --output


Use arrow numeric version instead of arrow version string.

--- cmake/Modules/FindArrow.cmake
+++ cmake/Modules/FindArrow.cmake
@@ -74,13 +74,20 @@
     set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${ARROW_ROOT}/lib/pkgconfig" )
     find_package(PkgConfig)
     pkg_search_module(_ARROW REQUIRED arrow) # using only version information
-    ADD_DEFINITIONS(-DARROW_VERSION="${_ARROW_VERSION}")
-    if ("${_ARROW_VERSION}" MATCHES "^(0.8.0|0.9.0|0.10.0)$")
-      ADD_DEFINITIONS(-DARROW_METADATA_V4)
-    elseif ("${_ARROW_VERSION}" MATCHES "^(0.7.0|0.7.1)$")
+    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" ARROW_VERSION_MAJOR "${_ARROW_VERSION}")
+    STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" ARROW_VERSION_MINOR "${_ARROW_VERSION}")
+    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" ARROW_VERSION_PATCH "${_ARROW_VERSION}")
+    math(EXPR ARROW_NUMERIC_VERSION "${ARROW_VERSION_MAJOR} * 10000 + ${ARROW_VERSION_MINOR} * 100 + ${ARROW_VERSION_PATCH}")
+    message(STATUS "ARROW_NUMERIC_VERSION=${ARROW_NUMERIC_VERSION}")
+    ADD_DEFINITIONS(-DARROW_VERSION=${ARROW_NUMERIC_VERSION})
+    # see arrow/ipc/message.h
+    if (ARROW_NUMERIC_VERSION LESS 200)
+      ADD_DEFINITIONS(-DARROW_METADATA_V1)
+    elseif (ARROW_NUMERIC_VERSION LESS 300)
+      ADD_DEFINITIONS(-DARROW_METADATA_V2)
+    elseif (ARROW_NUMERIC_VERSION LESS 800)
       ADD_DEFINITIONS(-DARROW_METADATA_V3)
     else()
-      message(WARNING "Unrecognized arrow version: ${_ARROW_VERSION}, assuming the most recent.")
       ADD_DEFINITIONS(-DARROW_METADATA_V4)
     endif()
 endif ()


attempting to fix the qhull cmake module

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@460 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindQhull.cmake
+++ cmake/Modules/FindQhull.cmake
@@ -7,9 +7,15 @@
 # QHULL_LIBRARIES - Libraries needed to use QHULL.
 # QHULL_DEFINITIONS - Compiler flags for QHULL.

-find_path(QHULL_INCLUDE_DIR qhull/qhull.h)
+#find_path(QHULL_INCLUDE_DIR qhull/qhull.h)
+find_path(QHULL_INCLUDE_DIR qhull.h
+          HINTS ${QHULL_ROOT}
+          PATH_SUFFIXES qhull src)

-find_library(QHULL_LIBRARY qhull)
+#find_library(QHULL_LIBRARY qhull)
+find_library(QHULL_LIBRARY qhull
+             HINTS ${QHULL_ROOT}
+             PATH_SUFFIXES project)

 set(QHULL_INCLUDE_DIRS ${QHULL_INCLUDE_DIR})
 set(QHULL_LIBRARIES ${QHULL_LIBRARY})
@@ -20,3 +26,7 @@

 mark_as_advanced(QHULL_LIBRARY QHULL_INCLUDE_DIR)

+if(QHULL_FOUND)
+  message(STATUS "QHULL found (include: ${QHULL_INCLUDE_DIRS}, lib: ${QHULL_LIBRARIES})")
+endif(QHULL_FOUND)
+


Temporarily disable Clang-Tidy.

Temporarily disable Clang-Tidy.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -18,15 +18,16 @@

 find_package(Python ${PREFERRED_PYTHON_VERSION} COMPONENTS Interpreter Development)

-#ISSUE359 -- Re-enable Clang-Tidy below...
 find_program(CLANG_FORMAT_EXE NAMES ${PREFERRED_CLANG_FORMAT_NAMES} clang-format)
-#find_program(CLANG_TIDY_EXE NAMES ${PREFERRED_CLANG_TIDY_NAMES} clang-tidy)
+find_program(CLANG_TIDY_EXE NAMES ${PREFERRED_CLANG_TIDY_NAMES} clang-tidy)
 find_program(FIND_EXE NAMES ${PREFERRED_FIND_NAMES} find)
 find_program(GCOV_EXE NAMES ${PREFERRED_GCOV_NAMES} gcov)
 find_program(GIT_EXE NAMES ${PRFERRED_GIT_NAMES} git)
 find_program(LLVM_COV_EXE NAMES ${PREFERRED_LLVM_COV_NAMES} llvm-cov HINTS ${LLVM_BIN_DIR} /Library/Developer/CommandLineTools/usr/bin/)
 find_program(LLVM_PROFDATA_EXE NAMES ${PREFERRED_LLVM_PROFDATA_NAMES} llvm-profdata HINTS ${LLVM_BIN_DIR} /Library/Developer/CommandLineTools/usr/bin/)
 find_program(VALGRIND_EXE NAMES ${PREFERRED_VALGRIND_NAMES} valgrind)
+#ISSUE359 -- Remove the below...
+set(CLANG_TIDY_EXE)

 find_package(Doxygen)
 find_package(Sphinx)


Update protobuf to v21.7

Update protobuf to v21.7

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -63,7 +63,7 @@
 ExternalProject_Add(${PROTOBUF_TARGET}
     PREFIX ${PROTOBUF_TARGET}
     GIT_REPOSITORY https://github.com/google/protobuf.git
-    GIT_TAG v3.20.1
+    GIT_TAG v21.7
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${CMAKE_COMMAND} ${PROTOBUF_INSTALL_DIR}/src/${PROTOBUF_TARGET}/cmake
         -G${CMAKE_GENERATOR}


add 1.37 release

add 1.37 release

svn path=/trunk/kdesupport/akonadi/; revision=905714


Make GitTarget outputs reusable

Make GitTarget outputs reusable

--- GitTargets.cmake
+++ GitTargets.cmake
@@ -1,6 +1,9 @@
 # Copyright (c) 2012 Stefan.Eilemann@epfl.ch
 # See doc/GitTargets.md for documentation

+if(GITTARGETS_FOUND)
+  return()
+endif()
 find_package(Git)
 if(NOT GIT_EXECUTABLE)
   return()
@@ -8,6 +11,7 @@

 find_program(GZIP_EXECUTABLE gzip)

+# branch
 math(EXPR _gittargets_ODD_MINOR "${VERSION_MINOR} % 2")
 if(_gittargets_ODD_MINOR)
   math(EXPR BRANCH_VERSION "${VERSION_MINOR} + 1")
@@ -23,6 +27,7 @@
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
   )

+# remove branch
 add_custom_target(cut
   COMMAND ${GIT_EXECUTABLE} branch -d ${BRANCH_VERSION}
   COMMAND ${GIT_EXECUTABLE} push origin --delete ${BRANCH_VERSION}
@@ -30,6 +35,7 @@
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
   )

+# tag on branch
 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gitbranchandtag.cmake
   "# Create branch:
    execute_process(COMMAND ${GIT_EXECUTABLE} branch ${BRANCH_VERSION}
@@ -55,6 +61,7 @@
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
   )

+# remove tag
 add_custom_target(erase
   COMMAND ${GIT_EXECUTABLE} tag -d release-${VERSION}
   COMMAND ${GIT_EXECUTABLE} push origin :release-${VERSION}
@@ -62,24 +69,29 @@
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
   )

+# tarball
+set(TARBALL_RELATIVE "${CMAKE_PROJECT_NAME}-${VERSION}.tar")
+set(TARBALL_ABSOLUTE "${CMAKE_BINARY_DIR}/${TARBALL_RELATIVE}")
+
 add_custom_target(tarball-create
   COMMAND ${GIT_EXECUTABLE} archive --worktree-attributes
-    --prefix ${CMAKE_PROJECT_NAME}-${VERSION}/
-    -o ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar
+    --prefix ${CMAKE_PROJECT_NAME}-${VERSION}/ -o ${TARBALL_ABSOLUTE}
     release-${VERSION}
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
-  COMMENT "Creating ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar"
+  COMMENT "Creating ${TARBALL_ABSOLUTE}"
   )

 if(GZIP_EXECUTABLE)
   add_custom_target(tarball
-    COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz"
-    COMMAND ${GZIP_EXECUTABLE} "${CMAKE_PROJECT_NAME}-${VERSION}.tar"
+    COMMAND ${CMAKE_COMMAND} -E remove ${TARBALL_RELATIVE}.gz
+    COMMAND ${GZIP_EXECUTABLE} ${TARBALL_RELATIVE}
     DEPENDS tarball-create
     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
     COMMENT
-      "Compressing ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz"
+      "Compressing ${TARBALL_ABSOLUTE}.gz"
   )
+  set(TARBALL_RELATIVE "${TARBALL_RELATIVE}.gz")
+  set(TARBALL_ABSOLUTE "${TARBALL_ABSOLUTE}.gz")
 else()
   add_custom_target(tarball DEPENDS tarball-create)
 endif()
@@ -89,3 +101,4 @@
   set_target_properties(${_gittargets_TARGET} PROPERTIES EXCLUDE_FROM_ALL ON)
   set_target_properties(${_gittargets_TARGET} PROPERTIES FOLDER "git")
 endforeach()
+set(GITTARGETS_FOUND 1)


Correct case-sensitivity issue with samples media path

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401947

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -142,8 +142,8 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
-set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/media")
-set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/media")
+set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
+set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")


Fix library headers: they were including -inl.h files as well but should not

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -174,7 +174,7 @@
 endmacro()

 # This function will create a new header file (LIBRARY_HEADER) that includes
-# all the headers in HEADER_FILES.
+# all the headers (except all "-inl.h") in HEADER_FILES.
 function(surgsim_create_library_header LIBRARY_HEADER HEADER_FILES)
 	if(";${HEADER_FILES};" MATCHES ";${LIBRARY_HEADER};")
 		message(FATAL_ERROR
@@ -183,7 +183,13 @@

 	file(RELATIVE_PATH HEADER_DIRECTORY ${SURGSIM_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
 	foreach(HEADER ${HEADER_FILES})
-		set(HEADER_FILES_INCLUDES "${HEADER_FILES_INCLUDES}#include \"${HEADER_DIRECTORY}/${HEADER}\"\n")
+		# Filters "-inl.h" files as they are not intended to be included directly but through a 'normal' header .h
+		# Example: Fem-inl.h is included only in Fem.h
+		# So only the 'normal' header files are exposed here in the library header file.
+		string(FIND ${HEADER} "-inl.h" result)
+		if(result STREQUAL -1)
+			set(HEADER_FILES_INCLUDES "${HEADER_FILES_INCLUDES}#include \"${HEADER_DIRECTORY}/${HEADER}\"\n")
+		endif()
 	endforeach()

 	string(REPLACE "/" "_" HEADER_GUARD "${HEADER_DIRECTORY}/${LIBRARY_HEADER}")


ENH: Update FFTW to 3.3.10

ENH: Update FFTW to 3.3.10

FFTW 3.3.10
  Sep 15th, 2021
  Fix bug that would cause 2-way SIMD (notably SSE2 in double precision)
  to attempt unaligned accesses in certain obscure cases, causing
  segfaults.  The following test triggers the bug (SSE2, double
    precision): ./tests/bench -oexhaustive r4*2:5:3

  This test computes a pair of length-4 real->complex transforms where
  the second input is 5 real numbers away from the first input. That is,
  there is a gap of one real number between the first and second input
  array.  The -oexhaustive level allow FFTW to attempt to compute this
  transform by reducing it to a pair of complex transforms of length 2,
  but now the second input is not aligned to a complex-number boundary.
  The fact that 5 is odd is the problem.

  The bug cannot occur in complex->complex transforms because the
  complex interface accepts strides in units of complex numbers, so
  strides are aligned by construction.

  This bug has been around at least since fftw-3.1.2 (July 2006), and probably since fftw-3.0 (2003).

FFTW 3.3.9
  Dec 13th, 2020

  New API fftw_planner_nthreads() returns the number of threads currently being used by the planner.
  Fix incorrect math in 128-bit generic SIMD
  Fix wisdom for avx512.
  The avx512 alignment requirement was set to 64 bytes, but this is
  wrong. Alignment requirements are a property of the platform (e.g.,
    x86) and not of the instruction set (e.g., AVX). Among other things,
  this broke wisdom with avx512.

  Note that avx512 support is still experimental because the FFTW authors
  have no avx512 hardware available for testing.

  fftw_threads_set_callback function to change the threading backend at runtime.

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -49,8 +49,8 @@

     include(GNUInstallDirs)

-    set(_fftw_target_version 3.3.8)
-    set(_fftw_url_hash "ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38")
+    set(_fftw_target_version 3.3.10)
+    set(_fftw_url_hash "2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40")
     set(_fftw_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_fftw_url_hash}/download")

     set(FFTW_STAGED_INSTALL_PREFIX "${ITK_BINARY_DIR}/fftw")


cmake REFACTOR update findpcre2 module

cmake REFACTOR update findpcre2 module

--- CMakeModules/FindPCRE2.cmake
+++ CMakeModules/FindPCRE2.cmake
@@ -4,27 +4,49 @@
 # PCRE2_INCLUDE_DIRS    - where to find pcre.h, etc.
 # PCRE2_LIBRARIES   - List of libraries when using pcre.
 # PCRE2_FOUND   - True if pcre found.
+include(FindPackageHandleStandardArgs)

-# Look for the header file.
-FIND_PATH(PCRE2_INCLUDE_DIR pcre2.h)
+if(PCRE2_LIBRARIES AND PCRE2_INCLUDE_DIRS)
+    # in cache already
+    set(PCRE2_FOUND TRUE)
+else()
+    find_path(PCRE2_INCLUDE_DIR
+        NAMES
+        pcre2.h
+        PATHS
+        /usr/include
+        /usr/local/include
+        /opt/local/include
+        /sw/include
+        ${CMAKE_INCLUDE_PATH}
+        ${CMAKE_INSTALL_PREFIX}/include)

-# Look for the library.
-FIND_LIBRARY(PCRE2_LIBRARY NAMES libpcre2.a pcre2-8)
+    # Look for the library.
+    find_library(PCRE2_LIBRARY
+        NAMES
+        libpcre2.a
+        pcre2-8
+        PATHS
+        /usr/lib
+        /usr/lib64
+        /usr/local/lib
+        /usr/local/lib64
+        /opt/local/lib
+        /sw/lib
+        ${CMAKE_LIBRARY_PATH}
+        ${CMAKE_INSTALL_PREFIX}/lib)

-# Check required version
-execute_process(COMMAND pcre2-config --version OUTPUT_VARIABLE PCRE2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(PCRE2_LIBRARY)
+        # Check required version
+        execute_process(COMMAND pcre2-config --version OUTPUT_VARIABLE PCRE2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+    endif()

-# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2 REQUIRED_VARS PCRE2_LIBRARY PCRE2_INCLUDE_DIR VERSION_VAR PCRE2_VERSION)
+    set(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
+    set(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
+    mark_as_advanced(PCRE2_INCLUDE_DIRS PCRE2_LIBRARIES)

-# Copy the results to the output variables.
-IF(PCRE2_FOUND)
-    SET(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
-    SET(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
-ELSE(PCRE2_FOUND)
-    SET(PCRE_LIBRARIES)
-    SET(PCRE_INCLUDE_DIRS)
-ENDIF(PCRE2_FOUND)
-
-MARK_AS_ADVANCED(PCRE2_INCLUDE_DIRS PCRE2_LIBRARIES)+    # Handle the QUIETLY and REQUIRED arguments and set PCRE2_FOUND to TRUE if all listed variables are TRUE.
+    find_package_handle_standard_args(PCRE2 FOUND_VAR PCRE2_FOUND
+        REQUIRED_VARS PCRE2_LIBRARY PCRE2_INCLUDE_DIR
+        VERSION_VAR PCRE2_VERSION)
+endif()


GitExternal: Do not fetch if we are already on the correct tag

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -109,6 +109,14 @@
   endif()

   if(IS_DIRECTORY "${DIR}/.git")
+    execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
+      OUTPUT_VARIABLE currentref OUTPUT_STRIP_TRAILING_WHITESPACE
+      WORKING_DIRECTORY ${DIR})
+    if(currentref STREQUAL TAG) # nothing to do
+      return()
+    endif()
+
+    # reset generated files
     foreach(GIT_EXTERNAL_RESET_FILE ${GIT_EXTERNAL_RESET})
       execute_process(
         COMMAND "${GIT_EXECUTABLE}" reset -q "${GIT_EXTERNAL_RESET_FILE}"
@@ -120,6 +128,7 @@
         WORKING_DIRECTORY "${DIR}")
     endforeach()

+    # fetch latest update
     execute_process(COMMAND "${GIT_EXECUTABLE}" fetch --all -q
       RESULT_VARIABLE nok ERROR_VARIABLE error
       WORKING_DIRECTORY "${DIR}")
@@ -127,6 +136,7 @@
       message(STATUS "Update of ${DIR} failed:\n   ${error}")
     endif()

+    # checkout requested tag
     execute_process(
       COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
       RESULT_VARIABLE nok ERROR_VARIABLE error


Changed cmake message to explicitly mention Vtk version 5.10.0.

--- Modules/QmitkExt/files.cmake
+++ Modules/QmitkExt/files.cmake
@@ -193,7 +193,7 @@
     QmitkVtkLineProfileWidget.h
   )
 else()
-  message("QmitkVtkHistogramWidget and QmitkVtkLineProfileWidget won't be build. Use a Vtk version between 5.4.0 and 5.10.1 if you need this classes.")
+  message("QmitkVtkHistogramWidget and QmitkVtkLineProfileWidget won't be build. Use Vtk version 5.10.0 if you need this classes.")

 endif()


should make copile error on incorrect linking of dynamically loaded shared libraries

--- Plugins/PluginTemplate.cmake
+++ Plugins/PluginTemplate.cmake
@@ -103,6 +103,7 @@
        "-DPLUGIN_NAME=${PROJECT_NAME}\n"
     )
   set(outfile_ "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PROJECT_NAME}_config.txt")
+  target_compile_options(${PROJECT_NAME} PRIVATE "-Wl,--no-undefined")
 endif(WIN32)

 set(${PROJECT_NAME}_PLUGIN_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}/src/" CACHE PATH "" FORCE)


Finishing touches for UpdateModule removal: remove configure_sparkle CMake macro.

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -260,12 +260,6 @@
         endif ()
     sagase_configure_report (OPENAL)
 endmacro (configure_openal)
-
-macro (configure_sparkle)
-    FIND_LIBRARY (SPARKLE_LIBRARY NAMES Sparkle)
-    set (SPARKLE_INCLUDE_DIRS ${SPARKLE_LIBRARY}/Headers)
-    set (SPARKLE_LIBRARIES ${SPARKLE_LIBRARY})
-endmacro (configure_sparkle)

 macro(use_package_knet)
     set(KNET_DIR $ENV{KNET_DIR})


added option to manually set the path for the FZAPI

--- cmake/Modules/FindFZAPI.cmake
+++ cmake/Modules/FindFZAPI.cmake
@@ -19,7 +19,9 @@
   #MESSAGE("Searching Fotonic libs: ${FZ_API_DIR}/Release")
   find_library(FZAPI_LIBS fotonic_fz_api
     HINTS "${FZ_API_DIR}/Release" NO_DEFAULT_PATH
-    DOC "Fotonic libraries")
+    DOC "Fotonic libraries")
+else()
+  set(FZ_API_DIR "default value" CACHE FILEPATH "directory of Fotonic API")
 endif()

 #MESSAGE("FZAPI_INCLUDE_DIR: ${FZAPI_INCLUDE_DIR}")