removed numpy headers

removed numpy headers

Former-commit-id: a5601e9679b1b512d5a960a52ad55354e4f5845e

--- cmake/FindNumPy.cmake
+++ cmake/FindNumPy.cmake
@@ -1,90 +0,0 @@
-# - Find the NumPy libraries
-# This module finds if NumPy is installed, and sets the following variables
-# indicating where it is.
-#
-# TODO: Update to provide the libraries and paths for linking npymath lib.
-#
-#  NUMPY_FOUND               - was NumPy found
-#  NUMPY_VERSION             - the version of NumPy found as a string
-#  NUMPY_VERSION_MAJOR       - the major version number of NumPy
-#  NUMPY_VERSION_MINOR       - the minor version number of NumPy
-#  NUMPY_VERSION_PATCH       - the patch version number of NumPy
-#  NUMPY_VERSION_DECIMAL     - e.g. version 1.6.1 is 10601
-#  NUMPY_INCLUDE_DIRS        - path to the NumPy include files
-
-#============================================================================
-# Copyright 2012 Continuum Analytics, Inc.
-#
-# MIT License
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files
-# (the "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to permit
-# persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#============================================================================
-
-# Finding NumPy involves calling the Python interpreter
-if(NumPy_FIND_REQUIRED)
-    find_package(PythonInterp REQUIRED)
-else()
-    find_package(PythonInterp)
-endif()
-
-if(NOT PYTHONINTERP_FOUND)
-    set(NUMPY_FOUND FALSE)
-endif()
-
-execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
-    "import numpy as n; print(n.__version__); print(n.get_include());"
-    RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS
-    OUTPUT_VARIABLE _NUMPY_VALUES
-    ERROR_VARIABLE _NUMPY_ERROR_VALUE
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-if(NOT _NUMPY_SEARCH_SUCCESS MATCHES 0)
-    if(NumPy_FIND_REQUIRED)
-        message(FATAL_ERROR
-            "NumPy import failure:\n${_NUMPY_ERROR_VALUE}")
-    endif()
-    set(NUMPY_FOUND FALSE)
-endif()
-
-# Convert the process output into a list
-string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES})
-string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES})
-list(GET _NUMPY_VALUES 0 NUMPY_VERSION)
-list(GET _NUMPY_VALUES 1 NUMPY_INCLUDE_DIRS)
-
-# Make sure all directory separators are '/'
-string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS})
-
-# Get the major and minor version numbers
-string(REGEX REPLACE "\\." ";" _NUMPY_VERSION_LIST ${NUMPY_VERSION})
-list(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR)
-list(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR)
-list(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH)
-string(REGEX MATCH "[0-9]*" NUMPY_VERSION_PATCH ${NUMPY_VERSION_PATCH})
-math(EXPR NUMPY_VERSION_DECIMAL
-    "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}")
-
-find_package_message(NUMPY
-    "Found NumPy: version \"${NUMPY_VERSION}\" ${NUMPY_INCLUDE_DIRS}"
-    "${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}")
-
-set(NUMPY_FOUND TRUE)
-


Add a check that the host compiler is modern to CMake, take 1. This is
likely to be reverted and re-applied a few times. The minimum versions
we're aiming at:

  GCC 4.7
  Clang 3.1
  MSVC 17.0 (Visual Studio 2012)

Let me know if something breaks!

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -315,6 +315,25 @@
     endif ()
   endif ()
 endif ()
+
+option(LLVM_FORCE_USE_OLD_TOOLCHAIN
+       "Set to ON if you want to force CMake to use a toolchain older than those supported by LLVM."
+       OFF)
+if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN)
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+      message(FATAL_ERROR "Host GCC version must be at least 4.7!")
+    endif()
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
+      message(FATAL_ERROR "Host Clang version must be at least 3.1!")
+    endif()
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)
+      message(FATAL_ERROR "Host Visual Studio must be at least 2012 (MSVC 17.0)")
+    endif()
+  endif()
+endif()

 include(CheckCXXCompilerFlag)


[tsan] Enable Thread Sanitizer on OS X builds by default

Differential Revision: http://reviews.llvm.org/D15109

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@254417 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -560,17 +560,10 @@
 endif()

 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Linux|FreeBSD")
+    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
   set(COMPILER_RT_HAS_TSAN TRUE)
 else()
   set(COMPILER_RT_HAS_TSAN FALSE)
-endif()
-
-if(APPLE)
-  option(COMPILER_RT_ENABLE_TSAN_OSX "Enable building TSan for OS X - Experimental" Off)
-  if(COMPILER_RT_ENABLE_TSAN_OSX)
-    set(COMPILER_RT_HAS_TSAN TRUE)
-  endif()
 endif()

 if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND


Explicitly tell cmake to use the phobos library. This library is used in plplot.d and the D examples since it's provided with the standard D compiler install. This may become a problem if a user wants to use the "competing" tango library, but first make everything run with the phobos library and then take care about Tango.

svn path=/trunk/; revision=10236

--- cmake/modules/d.cmake
+++ cmake/modules/d.cmake
@@ -38,6 +38,7 @@

 if(ENABLE_d)
   # Find and check D compiler
+  set(CMAKE_D_USE_PHOBOS ON)
   enable_language(D OPTIONAL)
   if(NOT CMAKE_D_COMPILER_WORKS)
     message(STATUS "WARNING: no working D compiler so disabling D bindings and examples.")


cpack: Add TGZ optional generator for Linux

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -7,6 +7,7 @@
 set(linux_supported_packaging_systems
   DEB
   RPM
+  TGZ
 )

 set(windows_supported_packaging_system


cmake: Require 3.8.2 on all platforms, including MSYS2

Now that MSYS2 ships with CMake 3.9.6 there's no need anymore to
downgrade the minimum required CMake version for it.

Signed-off-by: Carles Cufi <853081dc8dca4fe6a7e3c984752718b5db36e060@nordicsemi.no>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -27,22 +27,13 @@
   set(MSYS 1)
 endif()

-# CMake version 3.8.2 is the only supported version. Version 3.9 is
-# not supported because it introduced a warning that we do not wish to
+# CMake version 3.8.2 is the minimum supported version. Version 3.9 is
+# supported but it introduced a warning that we do not wish to
 # show to users. Specifically, it displays a warning when an OLD
 # policy is used, but we need policy CMP0000 set to OLD to avoid
 # copy-pasting cmake_minimum_required across application
 # CMakeLists.txt files.
-#
-# An exception to the above is MSYS, MSYS is allowed to use 3.6.0
-# because MSYS does not support 3.8, this will be set back to 3.8 when
-# https://github.com/zephyrproject-rtos/zephyr/issues/4687 is
-# resolved.
-if(MSYS)
-  cmake_minimum_required(VERSION 3.6.0)
-else()
-  cmake_minimum_required(VERSION 3.8.2)
-endif()
+cmake_minimum_required(VERSION 3.8.2)

 cmake_policy(SET CMP0000 OLD)
 cmake_policy(SET CMP0002 NEW)


Build: Less verbose

Build: Less verbose

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -772,7 +772,7 @@
 		OUTPUT_STRIP_TRAILING_WHITESPACE
 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 		)
-	message(STATUS "GIT_TAG = ${git_tag}")
+	#message(STATUS "GIT_TAG = ${git_tag}")
 	execute_process(
 		COMMAND git rev-parse HEAD
 		OUTPUT_VARIABLE git_desc


Set correct TBB library name in debug build and remove warning related to rpath dependency from symlink. test=develop

--- cmake/external/ngraph.cmake
+++ cmake/external/ngraph.cmake
@@ -44,7 +44,11 @@
 SET(NGRAPH_LIB_DIR         ${NGRAPH_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR})
 SET(NGRAPH_SHARED_LIB_NAME libngraph.so)
 SET(NGRAPH_CPU_LIB_NAME    libcpu_backend.so)
-SET(NGRAPH_TBB_LIB_NAME    libtbb.so.2)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+    SET(NGRAPH_TBB_LIB_NAME    libtbb_debug.so.2)
+else()
+    SET(NGRAPH_TBB_LIB_NAME    libtbb.so.2)
+endif()
 SET(NGRAPH_GIT_REPO        "https://github.com/NervanaSystems/ngraph.git")
 SET(NGRAPH_SHARED_LIB      ${NGRAPH_LIB_DIR}/${NGRAPH_SHARED_LIB_NAME})
 SET(NGRAPH_CPU_LIB         ${NGRAPH_LIB_DIR}/${NGRAPH_CPU_LIB_NAME})
@@ -66,16 +70,7 @@
     CMAKE_ARGS          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     CMAKE_ARGS          -DMKLDNN_INCLUDE_DIR=${MKLDNN_INC_DIR}
     CMAKE_ARGS          -DMKLDNN_LIB_DIR=${MKLDNN_INSTALL_DIR}/lib
-)
-
-# Workaround for nGraph expecting mklml to be in mkldnn install directory.
-ExternalProject_Add_Step(
-    ${NGRAPH_PROJECT}
-    PrepareMKL
-    COMMAND ${CMAKE_COMMAND} -E create_symlink ${MKLML_LIB} ${MKLDNN_INSTALL_DIR}/lib/libmklml_intel.so
-    COMMAND ${CMAKE_COMMAND} -E create_symlink ${MKLML_IOMP_LIB} ${MKLDNN_INSTALL_DIR}/lib/libiomp5.so
-    DEPENDEES download
-    DEPENDERS configure
+    CMAKE_ARGS          -DMKLML_LIB_DIR=${MKLML_INSTALL_DIR}/lib
 )

 add_dependencies(ngraph ${NGRAPH_PROJECT})


Set IDYNTREE_COMPILES_YARP_TOOLS option to OFF

--- cmake/iDynTreeOptions.cmake
+++ cmake/iDynTreeOptions.cmake
@@ -44,7 +44,7 @@
 # Turn off compilation of specific parts of iDynTree.
 option(IDYNTREE_COMPILES_OPTIMALCONTROL "Compile iDynTree optimal control part." TRUE)
 option(IDYNTREE_COMPILES_TOOLS "Compile iDynTree tools." TRUE)
-option(IDYNTREE_COMPILES_YARP_TOOLS "Deprecated: Compile iDynTree tools that depend (also) on YARP." TRUE)
+option(IDYNTREE_COMPILES_YARP_TOOLS "Deprecated: Compile iDynTree tools that depend (also) on YARP." OFF)

 #########################################################################
 # Deal with RPATH


Prune debug message in AddLLVM.cmake.

Prune debug message in AddLLVM.cmake.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -298,7 +298,6 @@
     # Add dependencies also to objlibs.
     # CMake issue 14747 --  add_dependencies() might be ignored to objlib's user.
     foreach(objlib ${objlibs})
-      message("add_dependencies(${objlib} ${LLVM_COMMON_DEPENDS})")
       add_dependencies(${objlib} ${LLVM_COMMON_DEPENDS})
     endforeach()
   endif()


Potential fix for github actions not finding MYSQL_LIBRARY_PATH

--- cmake/modules/mysqldb.cmake
+++ cmake/modules/mysqldb.cmake
@@ -8,6 +8,7 @@
       "$ENV{PROGRAMFILES}/MySQL/*/include"
       "$ENV{SYSTEMDRIVE}/MySQL/*/include"
       "C:/Program Files/MySQL/*/include"
+      "$ENV{SYSTEMDRIVE}/mysql*/include"
       )

   find_path(MYSQL_LIBRARY_PATH
@@ -17,6 +18,7 @@
       "$ENV{PROGRAMFILES}/MySQL/*/lib"
       "$ENV{SYSTEMDRIVE}/MySQL/*/lib"
       "C:/Program Files/MySQL/*/lib"
+      "$ENV{SYSTEMDRIVE}/mysql*/lib"
       )

   find_library(MYSQL_LIBRARY


Suppress CMake unused variable warning for Android platform.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -125,7 +125,7 @@
     cmake_dependent_option (ANDROID_NDK_GDB "Enable ndk-gdb for debugging (Android build only)" FALSE "CMAKE_BUILD_TYPE STREQUAL Debug" FALSE)
 else ()
     unset (ANDROID_NDK_GDB CACHE)
-    if (ANDROID_ABI)
+    if (ANDROID_ABI AND ANDROID_NATIVE_API_LEVEL)
         # Just reference it to suppress "unused variable" CMake warning on non-Android project
         # Due to the design of cmake_gcc.sh currently, the script can be used to configure/generate Android project and other non-Android projects in one go
     endif ()


Fix typo bug

Fix typo bug

--- CommonInstall.cmake
+++ CommonInstall.cmake
@@ -42,6 +42,6 @@
     install(FILES ${FILE} DESTINATION ${THIS_DESTINATION}/${DIR}
       ${THIS_COMPONENT})
     configure_file(${FILE}
-      ${THIS_BINARY_DIR}/${THIS_DESTINATION}/${DIR}/${BASENAME} @COPYONLY)
+      ${THIS_BINARY_DIR}/${THIS_DESTINATION}/${DIR}/${BASENAME} COPYONLY)
   endforeach()
 endfunction()


link with whole-archive flags

link with whole-archive flags

we must force the linker to consider all the modules contained in the static library.
If we do not use this flag, the linker does not include static constructors (for the clock) and the Reset_Handler

--- board_examples/cmake/example.cmake
+++ board_examples/cmake/example.cmake
@@ -22,7 +22,7 @@

 ADD_EXECUTABLE(${PROJECT_NAME}.elf	${PROJECT_SOURCES})

-target_link_libraries(${PROJECT_NAME}.elf embedded)
+target_link_libraries(${PROJECT_NAME}.elf -Wl,--whole-archive embedded -Wl,--no-whole-archive)

 ADD_CUSTOM_TARGET(${PROJECT_NAME}.bin ALL DEPENDS ${PROJECT_NAME}.elf COMMAND ${OBJCOPY} -O binary ${PROJECT_NAME}.elf ${PROJECT_NAME}.bin)


COMP: CMAKE-File including the new Componten QmitkSurfaceTransformer

--- Qmitk/files.cmake
+++ Qmitk/files.cmake
@@ -28,7 +28,7 @@
   QmitkFunctionalityComponents/QmitkThresholdComponent.cpp
   QmitkFunctionalityComponents/QmitkSingleTimeStepExporterComponent.cpp
   QmitkFunctionalityComponents/QmitkImageCropperComponent.cpp
-  QmitkFunctionalityComponents/QmitkEmptyComponent.cpp
+  QmitkFunctionalityComponents/QmitkSurfaceTransformerComponent.cpp
   QmitkHelpBrowser.cpp
   QmitkInteractionFunctionalityComponent.cpp
   QmitkLevelWindowWidgetContextMenu.cpp
@@ -87,7 +87,7 @@
   QmitkFunctionalityComponents/QmitkThresholdComponentGUI.ui
   QmitkFunctionalityComponents/QmitkSingleTimeStepExporterComponentGUI.ui
   QmitkFunctionalityComponents/QmitkImageCropperComponentGUI.ui
-  QmitkFunctionalityComponents/QmitkEmptyComponentGUI.ui
+  QmitkFunctionalityComponents/QmitkSurfaceTransformerComponentGUI.ui
   QmitkLevelWindowPresetDefinition.ui
   QmitkLevelWindowRangeChange.ui
   QmitkLevelWindowWidget.ui
@@ -129,7 +129,7 @@
   QmitkFunctionalityComponents/QmitkThresholdComponent.h
   QmitkFunctionalityComponents/QmitkSingleTimeStepExporterComponent.h
   QmitkFunctionalityComponents/QmitkImageCropperComponent.h
-  QmitkFunctionalityComponents/QmitkEmptyComponent.h
+  QmitkFunctionalityComponents/QmitkSurfaceTransformerComponent.h
   QmitkHelpBrowser.h
   QmitkInteractionFunctionalityComponent.h
   QmitkLevelWindowWidgetContextMenu.h


Delete FindSampgdk3 module

Delete FindSampgdk3 module

--- cmake/Modules/FindSampgdk3.cmake
+++ cmake/Modules/FindSampgdk3.cmake
@@ -1,17 +0,0 @@
-# Try to find Sampgdk3
-#
-# Defined variables:
-# - Sampgdk3_FOUND
-# - Sampgdk3_INCLUDE_DIRS
-# - Sampgdk3_LIBRARIES
-
-find_path(Sampgdk3_INCLUDE_DIR NAMES sampgdk/a_samp.h)
-find_library(Sampgdk3_LIBRARY NAMES sampgdk3 libsampgdk3)
-
-set(Sampgdk3_LIBRARIES ${Sampgdk3_LIBRARY})
-set(Sampgdk3_INCLUDE_DIRS ${Sampgdk3_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Sampgdk3 DEFAULT_MSG Sampgdk3_LIBRARY Sampgdk3_INCLUDE_DIR)
-
-mark_as_advanced(Sampgdk3_LIBRARIES Sampgdk3_INCLUDE_DIRS)


reformat cmake

reformat cmake

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -307,26 +307,26 @@
 	set (TMP ${TOOLS})
 	message (STATUS "Exclude tool ${name} because ${reason}")
 	list (REMOVE_ITEM TMP
-			${name})
+			  ${name})
 	set (TOOLS
-	    ${TMP}
-	    CACHE STRING
-		${TOOLS_DOC}
-		FORCE)
+	     ${TMP}
+	     CACHE STRING
+		   ${TOOLS_DOC}
+	     FORCE)

 	# save removed tools for dependency resolving later on
 	if (REMOVED_TOOLS)
 		set (REMOVED_TOOLS
-			"${REMOVED_TOOLS};${name}"
-			CACHE STRING
-			"${REMOVED_TOOLS_DOC}"
-			FORCE)
+		     "${REMOVED_TOOLS};${name}"
+		     CACHE STRING
+			   "${REMOVED_TOOLS_DOC}"
+		     FORCE)
 	else ()
 		set (REMOVED_TOOLS
-			"${name}"
-			CACHE STRING
-			"${REMOVED_TOOLS_DOC}"
-			FORCE)
+		     "${name}"
+		     CACHE STRING
+			   "${REMOVED_TOOLS_DOC}"
+		     FORCE)
 	endif ()
 endmacro (remove_tool)


Make sure to list-append while appending a compile options to source file

--- cmake/kl/PrecompileHeaders.cmake
+++ cmake/kl/PrecompileHeaders.cmake
@@ -76,7 +76,7 @@
         __filter_source_files_pch(${_target} "${arg_EXCLUDE}" source_files)
         foreach(source_file IN ITEMS ${source_files})
             set_property(SOURCE ${source_file}
-                APPEND_STRING PROPERTY COMPILE_OPTIONS ${source_file_flags}
+                APPEND_STRING PROPERTY COMPILE_OPTIONS ";${source_file_flags};"
             )
             # OBJECT_DEPENDS is needed for Ninja generator, MSBuild simply ignores it
             set_property(SOURCE ${source_file}
@@ -153,7 +153,7 @@
         __filter_source_files_pch(${_target} "${arg_EXCLUDE}" source_files)
         foreach(source_file IN ITEMS ${source_files})
             set_property(SOURCE ${source_file}
-                APPEND_STRING PROPERTY COMPILE_OPTIONS "-include;${host_file_native};-Winvalid-pch"
+                APPEND_STRING PROPERTY COMPILE_OPTIONS ";-include;${host_file_native};-Winvalid-pch;"
             )
             set_property(SOURCE ${source_file}
                 APPEND PROPERTY OBJECT_DEPENDS ${prefix_file}


[cmake] Resubmit Remove redundant call to cmake when building host tools.

Only pass Native to LLVM_TARGETS_TO_BUILD.

Summary:
Remove the redundant, config-time call to cmake when
building host tools for cross compiles or optimized tablegen..

The config-time call to cmake is redundant because it will always get
called again when the CONFIGURE_LLVM_${target_name} target fires at
build-time.  This speeds up initial configuration, but has no affect
on build behavior.

Differential Revision: https://reviews.llvm.org/D40229

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -12,6 +12,17 @@
         CACHE STRING "Toolchain file for ${target_name}")
   endif()

+  if (buildtype)
+    set(build_type_flags "-DCMAKE_BUILD_TYPE=${buildtype}")
+  endif()
+  if (LLVM_USE_LINKER AND NOT CMAKE_CROSSCOMPILING)
+    set(linker_flag "-DLLVM_USE_LINKER=${LLVM_USE_LINKER}")
+  endif()
+  if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
+    # Propagate LLVM_EXTERNAL_CLANG_SOURCE_DIR so that clang-tblgen can be built
+    set(external_clang_dir "-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=${LLVM_EXTERNAL_CLANG_SOURCE_DIR}")
+  endif()
+
   add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}
     COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_${target_name}_BUILD}
     COMMENT "Creating ${LLVM_${target_name}_BUILD}...")
@@ -23,40 +34,14 @@
     COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
         ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
         -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
+        -DLLVM_TARGETS_TO_BUILD=Native
+        ${build_type_flags} ${linker_flag} ${external_clang_dir}
     WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
     DEPENDS CREATE_LLVM_${target_name}
     COMMENT "Configuring ${target_name} LLVM...")

   add_custom_target(CONFIGURE_LLVM_${target_name}
                     DEPENDS ${LLVM_${target_name}_BUILD}/CMakeCache.txt)
-
-  set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-                                      ${LLVM_${target_name}_BUILD})
-
-  if(NOT IS_DIRECTORY ${LLVM_${target_name}_BUILD})
-
-    message(STATUS "Configuring ${target_name} build...")
-    execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory
-      ${LLVM_${target_name}_BUILD} )
-
-    message(STATUS "Configuring ${target_name} targets...")
-    if (buildtype)
-      set(build_type_flags "-DCMAKE_BUILD_TYPE=${buildtype}")
-    endif()
-    if (LLVM_USE_LINKER AND NOT CMAKE_CROSSCOMPILING)
-      set(linker_flag "-DLLVM_USE_LINKER=${LLVM_USE_LINKER}")
-    endif()
-    if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
-      # Propagate LLVM_EXTERNAL_CLANG_SOURCE_DIR so that clang-tblgen can be built
-      set(external_clang_dir "-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=${LLVM_EXTERNAL_CLANG_SOURCE_DIR}")
-    endif()
-    execute_process(COMMAND ${CMAKE_COMMAND} ${build_type_flags}
-        -G "${CMAKE_GENERATOR}" -DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD}
-        ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
-        -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
-        ${external_clang_dir} ${linker_flag}
-      WORKING_DIRECTORY ${LLVM_${target_name}_BUILD} )
-  endif(NOT IS_DIRECTORY ${LLVM_${target_name}_BUILD})

 endfunction()


From Pere:
Add -Od compiler option (disable optimisation) when building in Debug mode.

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

--- cmake/modules/SetUpWindows.cmake
+++ cmake/modules/SetUpWindows.cmake
@@ -15,10 +15,10 @@
 #---Select compiler flags----------------------------------------------------------------
 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -Z7")
 set(CMAKE_CXX_FLAGS_RELEASE        "-O2")
-set(CMAKE_CXX_FLAGS_DEBUG          "-Z7")
+set(CMAKE_CXX_FLAGS_DEBUG          "-Od -Z7")
 set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -Z7")
 set(CMAKE_C_FLAGS_RELEASE          "-O2")
-set(CMAKE_C_FLAGS_DEBUG            "-Z7")
+set(CMAKE_C_FLAGS_DEBUG            "-Od -Z7")

 if(winrtdebug)
   set(BLDCXXFLAGS "-MDd -GR")


added EMBREE_INTERSECTION_FILTER_CONTEXT to embree-config.cmake

--- common/cmake/embree-config.cmake
+++ common/cmake/embree-config.cmake
@@ -46,6 +46,7 @@
 SET(EMBREE_STAT_COUNTERS @EMBREE_STAT_COUNTERS@)
 SET(EMBREE_BACKFACE_CULLING @EMBREE_BACKFACE_CULLING@)
 SET(EMBREE_INTERSECTION_FILTER @EMBREE_INTERSECTION_FILTER@)
+SET(EMBREE_INTERSECTION_FILTER_CONTEXT @EMBREE_INTERSECTION_FILTER_CONTEXT@)
 SET(EMBREE_IGNORE_INVALID_RAYS @EMBREE_IGNORE_INVALID_RAYS@)
 SET(EMBREE_TASKING_SYSTEM @EMBREE_TASKING_SYSTEM@)


Quote variable expansion in target functions

--- conf/sprokit-macro-targets.cmake
+++ conf/sprokit-macro-targets.cmake
@@ -148,19 +148,19 @@
 endfunction ()

 function (sprokit_add_library name)
-  add_library(${name}
+  add_library("${name}"
     ${ARGN})
-  set_target_properties(${name}
+  set_target_properties("${name}"
     PROPERTIES
       ARCHIVE_OUTPUT_DIRECTORY "${sprokit_output_dir}/lib${library_subdir}${library_subdir_suffix}"
       LIBRARY_OUTPUT_DIRECTORY "${sprokit_output_dir}/lib${library_subdir}${library_subdir_suffix}"
       RUNTIME_OUTPUT_DIRECTORY "${sprokit_output_dir}/bin${library_subdir}${library_subdir_suffix}")

-  add_dependencies(${name}
+  add_dependencies("${name}"
     configure-config.h)

   foreach (config ${CMAKE_CONFIGURATION_TYPES})
-    set(subdir ${library_subdir}${library_subdir_suffix})
+    set(subdir "${library_subdir}${library_subdir_suffix}")

     if (CMAKE_CONFIGURATION_TYPES)
       set(subdir "${library_subdir}/${config}${library_subdir_suffix}")
@@ -181,21 +181,21 @@
   endif ()

   get_target_property(target_type
-    ${name} TYPE)
+    "${name}" TYPE)

   if (target_type STREQUAL "STATIC_LIBRARY")
-    _sprokit_compile_pic(${name})
+    _sprokit_compile_pic("${name}")
   else ()
     set(sprokit_libraries
       ${sprokit_libraries}
-      ${name}
+      "${name}"
       CACHE INTERNAL "Libraries built as part of sprokit")
   endif ()

-  _sprokit_export(${name})
-
-  sprokit_install(
-    TARGETS       ${name}
+  _sprokit_export("${name}")
+
+  sprokit_install(
+    TARGETS       "${name}"
     ${exports}
     ARCHIVE
       DESTINATION "lib${LIB_SUFFIX}${library_subdir}"


Investigating eigenvalue bug on cluster

Investigating eigenvalue bug on cluster

Former-commit-id: 1faa91fe559e0a685d91f26c2959cfd56d4c1c62

--- cmake-modules/FindLAPACKE.cmake
+++ cmake-modules/FindLAPACKE.cmake
@@ -41,6 +41,10 @@
             /usr/include
             /usr/include/x86_64-linux-gnu
             )
+    if(LAPACKE_INCLUDE_DIRS)
+        message(STATUS "Found lapacke.h headers in: ${LAPACKE_INCLUDE_DIRS}")
+    endif()
+
 endif()


Another aproach: just do not proceed FindOpenCL.cmake when LUXRAYS_DISABLE_OPENCL

--- cmake/Packages/FindOpenCL.cmake
+++ cmake/Packages/FindOpenCL.cmake
@@ -5,6 +5,8 @@
 # OPENCL_INCLUDE_PATH
 # OPENCL_LIBRARY
 #
+
+if (NOT LUXRAYS_DISABLE_OPENCL)

 IF (WIN32)
 	FIND_PATH( OPENCL_INCLUDE_PATH CL/cl.h
@@ -47,4 +49,6 @@
 	SET( OPENCL_FOUND 0 CACHE STRING "Set to 1 if OpenCL is found, 0 otherwise")
 ENDIF (OPENCL_INCLUDE_PATH)

-MARK_AS_ADVANCED( OPENCL_FOUND )+MARK_AS_ADVANCED( OPENCL_FOUND )
+
+endif (NOT LUXRAYS_DISABLE_OPENCL)


remove opencv from linked libs in augmentation

--- cmake/augmentation_widget.cmake
+++ cmake/augmentation_widget.cmake
@@ -7,7 +7,7 @@
 qt5_wrap_cpp(augmentation_MOC ${augmentation_HEADERS})

 add_library( augmentation ${augmentation_SOURCES}  ${augmentation_MOC} )
-target_link_libraries( augmentation ${QT_LIBRARIES} GL opencv_core opencv_highgui )
+target_link_libraries( augmentation ${QT_LIBRARIES} GL)
 target_include_directories ( augmentation PUBLIC ${INCLUDE_DIR} )

 qt5_use_modules( augmentation Core Gui Widgets OpenGL )


cmake: fix endif args

cmake: fix endif args

Signed-off-by: Corentin Chary <298d22bb5b8e08c296f77ec9e7162462cf47b8a1@iksaif.net>

--- cmake/modules/FindQWEBDAV.cmake
+++ cmake/modules/FindQWEBDAV.cmake
@@ -43,4 +43,4 @@
   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(QWEBDAV DEFAULT_MSG QWEBDAV_LIBRARIES QWEBDAV_INCLUDE_DIR)

-endif (QWEBDAV_INCLUDE_DIR AND QWEBDA_LIBRARIES)
+endif (QWEBDAV_INCLUDE_DIR AND QWEBDAV_LIBRARIES)


corrected required GCC version for AVX.

corrected required GCC version for AVX.

--- cmake/gcc.cmake
+++ cmake/gcc.cmake
@@ -55,7 +55,7 @@
   MARK_AS_ADVANCED(GCC_VERSION)
 ENDIF()

-SET(GCC_VERSION_REQUIRED_AVX "4.6.0")
+SET(GCC_VERSION_REQUIRED_AVX "4.4.0")
 SET(GCC_VERSION_REQUIRED_AVX2 "4.7.0")

 IF (GCC_VERSION VERSION_LESS GCC_VERSION_REQUIRED_AVX)


fix endian detection

fix endian detection

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -2,7 +2,7 @@
 include(CheckIncludeFiles)
 include(CheckFunctionExists)
 include(CheckSymbolExists)
-include(TestBigEndian)
+# include(TestBigEndian)

 check_include_file("dlfcn.h" HAVE_DLFCN_H)
 check_include_file("fcntl.h" HAVE_FCNTL_H)
@@ -24,13 +24,13 @@
 #/* Define to 1 if you have the ANSI C header files. */
 check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)

-test_big_endian(WORDS_BIGENDIAN)
+# test_big_endian(WORDS_BIGENDIAN)
 #/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-if(WORDS_BIGENDIAN)
-    set(BYTEORDER 4321)
-else(WORDS_BIGENDIAN)
+# if(WORDS_BIGENDIAN)
+#     set(BYTEORDER 4321)
+# else(WORDS_BIGENDIAN)
     set(BYTEORDER 1234)
-endif(WORDS_BIGENDIAN)
+# endif(WORDS_BIGENDIAN)

 if(HAVE_SYS_TYPES_H)
     check_symbol_exists("off_t" "sys/types.h" OFF_T)


CHG (#1846): added mitkSurfaceToSurfaceFilter to files.cmake. superclass to all filters creating surfaces from surfaces

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -18,6 +18,7 @@
   Algorithms/mitkPointSetSource.cpp
   Algorithms/mitkSubImageSelector.cpp
   Algorithms/mitkSurfaceSource.cpp
+  Algorithms/mitkSurfaceToSurfaceFilter.cpp
   Algorithms/mitkUIDGenerator.cpp
   Algorithms/mitkVolumeCalculator.cpp
   Controllers/mitkBaseController.cpp


updated models hash

updated models hash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -16,7 +16,7 @@

 set(CTEST_PROJECT_NAME "Embree")
 set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
-set(TEST_MODELS_HASH 40c7a7c53cf287d9e0e49981a5d883f2461649e3)
+set(TEST_MODELS_HASH 0492fdff472c3d58cbe41159119b82be523405f3)

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


Set VERSION_ABI in Common

Set VERSION_ABI in Common

--- Common.cmake
+++ Common.cmake
@@ -14,6 +14,18 @@
     set(CMAKE_BUILD_TYPE Debug)
   endif()
 endif(NOT CMAKE_BUILD_TYPE)
+
+if(NOT VERSION_ABI)
+  if(RELEASE_VERSION)
+    set(VERSION_ABI ${RELEASE_VERSION})
+  else()
+    if(VERSION_MAJOR VERSION_GREATER 0)
+      set(VERSION_ABI ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_PATCH})
+    else()
+      set(VERSION_ABI ${VERSION_MINOR}${VERSION_PATCH})
+    endif()
+  endif()
+endif()

 if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT MSVC)
   set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH


cmake: Remove explicit setting of fPIC flags

--- Common.cmake
+++ Common.cmake
@@ -1,4 +1,6 @@
 include(CMakeDependentOption)
+
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)

 #-----------------------------------------------------------------------------
 # Build option(s)
@@ -121,17 +123,6 @@
 endif()

 #-----------------------------------------------------------------------------
-# Add needed flag for gnu on linux like enviroments to build static common libs
-# suitable for linking with shared object libs.
-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-  if(NOT "${CMAKE_CXX_FLAGS}" MATCHES "-fPIC")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-  endif()
-  if(NOT "${CMAKE_C_FLAGS}" MATCHES "-fPIC")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-  endif()
-endif()
-#-----------------------------------------------------------------------------
 if(WIN32)
   set(fileextension .exe)
 endif()


Use CPACK_PACKAGE_NAME_EXTRA to tweak RPM & DEB package filename

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -96,6 +96,9 @@
   set(CPACK_RPM_PACKAGE_LICENSE "LGPL")
   set(CPACK_RPM_PACKAGE_RELEASE ${${UPPER_PROJECT_NAME}_PACKAGE_VERSION})
   set(CPACK_RPM_PACKAGE_VERSION ${VERSION})
+  if(CPACK_PACKAGE_NAME_EXTRA)
+    set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}")
+  endif()
   if(NOT CPACK_RPM_POST_INSTALL_SCRIPT_FILE)
     set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/CMake/rpmPostInstall.sh")
   endif()
@@ -109,9 +112,9 @@
     # dpkg requires lowercase package names
     string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)

-    if(DEBIAN_PACKAGE_VERSION_EXTRA)
+    if(CPACK_PACKAGE_NAME_EXTRA)
       set(CPACK_DEBIAN_PACKAGE_VERSION
-        "${CPACK_PACKAGE_VERSION}~${DEBIAN_PACKAGE_VERSION_EXTRA}${LSB_RELEASE}")
+        "${CPACK_PACKAGE_VERSION}~${CPACK_PACKAGE_NAME_EXTRA}${LSB_RELEASE}")

       set(CPACK_PACKAGE_FILE_NAME
         "${CPACK_PACKAGE_NAME}-${CPACK_DEBIAN_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}")


Remove obsolete finder

Remove obsolete finder

--- FindFlatBuffers.cmake
+++ FindFlatBuffers.cmake
@@ -1,57 +0,0 @@
-# Copyright 2014 Stefan.Eilemann@epfl.ch
-# Copyright 2014 Google Inc. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Find the flatbuffers schema compiler
-#
-# Output Variables:
-# * FLATBUFFERS_FLATC_EXECUTABLE the flatc compiler executable
-# * FLATBUFFERS_FOUND
-#
-# Provides:
-# * FLATBUFFERS_GENERATE_C_HEADERS(Name <files>) creates the C++ headers
-#   for the given flatbuffer schema files.
-#   Returns the header files in ${Name}_OUTPUTS
-
-find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc)
-find_path(FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(flatbuffers
-  DEFAULT_MSG FLATBUFFERS_FLATC_EXECUTABLE FLATBUFFERS_INCLUDE_DIR)
-
-if(FLATBUFFERS_FOUND)
-  function(FLATBUFFERS_GENERATE_C_HEADERS Name)
-    set(FLATC_OUTPUTS)
-    foreach(FILE ${ARGN})
-      get_filename_component(FLATC_OUTPUT ${FILE} NAME_WE)
-      set(FLATC_OUTPUT
-        "${CMAKE_CURRENT_BINARY_DIR}/${FLATC_OUTPUT}_generated.h")
-      list(APPEND FLATC_OUTPUTS ${FLATC_OUTPUT})
-
-      add_custom_command(OUTPUT ${FLATC_OUTPUT}
-        COMMAND ${FLATBUFFERS_FLATC_EXECUTABLE}
-        ARGS -c -o "${CMAKE_CURRENT_BINARY_DIR}/" ${FILE}
-        COMMENT "Building C++ header for ${FILE}"
-        DEPENDS ${FILE} ${FLATBUFFERS_FLATC_EXECUTABLE}
-        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-    endforeach()
-    set(${Name}_OUTPUTS ${FLATC_OUTPUTS} PARENT_SCOPE)
-  endfunction()
-
-  set(FLATBUFFERS_INCLUDE_DIRS ${FLATBUFFERS_INCLUDE_DIR})
-  include_directories(${CMAKE_BINARY_DIR})
-else()
-  set(FLATBUFFERS_INCLUDE_DIR)
-endif()


Bump the fallback version to 1.7.0 for release

Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>

--- cmake/DetermineTomvizVersion.cmake
+++ cmake/DetermineTomvizVersion.cmake
@@ -7,7 +7,7 @@
 #   tomviz_version
 #   tomviz_version_long

-set(hardcoded_tomviz_version "1.6.0")
+set(hardcoded_tomviz_version "1.7.0")

 function(_set_version_vars versiontext)
   string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")


Only build the tests

Only build the tests

--- cmake/modules/jegp_add_tests.cmake
+++ cmake/modules/jegp_add_tests.cmake
@@ -2,7 +2,7 @@
     add_executable(jegp_test_${name} test/${name}.cpp)
     target_compile_options(jegp_test_${name} PRIVATE ${ARGN})
     target_link_libraries(jegp_test_${name} PRIVATE jegp::jegp)
-    add_test(jegp_test_${name} jegp_test_${name})
+#    add_test(jegp_test_${name} jegp_test_${name})
 endfunction()

 jegp_add_test(include_utility)


[Build] Improved PythonLibs support on RedHat/CentOS/EPEL.

--- config/FindPythonLibsWrapper.cmake
+++ config/FindPythonLibsWrapper.cmake
@@ -2,8 +2,16 @@
 # script. Indeed, that latter does not work well on EPEL 5, where only the Python
 # static library is searched. In that latter case, the Python dynamic library is
 # searched, and the PYTHON_LIBRARIES variable re-set accordingly.
+# Moreover, on EPEL 5 and 6, only PYTHON_INCLUDE_PATH is defined, where as
+# PYTHON_INCLUDE_DIRS is expected to be set.
+
 #
+if (PYTHON_INCLUDE_PATH AND "${PYTHON_INCLUDE_DIRS}" STREQUAL "")
+  set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH} PARENT_SCOPE)
+  set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
+endif ()

+#
 if ("${PYTHON_LIBRARIES}" MATCHES "libpython[1-9.]*.a")
   # The PythonLibs finder has found only the static library
   message (STATUS "The Python static library has been found by the regular PythonLibs finder: ${PYTHON_LIBRARIES}")


cmake: update SwiftSupport from XCTest

cmake: update SwiftSupport from XCTest

Update the swift support CMake rules from XCTest.  This adds support for
additional features like partial module compilation which improves
incremental builds.  It allows for executable and library builds.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -4,7 +4,7 @@
 function(add_swift_target target)
   set(options LIBRARY;SHARED;STATIC)
   set(single_value_options MODULE_NAME;MODULE_LINK_NAME;MODULE_PATH;MODULE_CACHE_PATH;OUTPUT;TARGET)
-  set(multiple_value_options CFLAGS;DEPENDS;LINK_FLAGS;SOURCES;SWIFT_FLAGS)
+  set(multiple_value_options CFLAGS;DEPENDS;LINK_FLAGS;RESOURCES;SOURCES;SWIFT_FLAGS)

   cmake_parse_arguments(AST "${options}" "${single_value_options}" "${multiple_value_options}" ${ARGN})

@@ -132,16 +132,14 @@
   if(AST_LIBRARY)
     set(emit_library -emit-library)
   endif()
-  if(library_kind STREQUAL SHARED)
+  if(NOT AST_LIBRARY OR library_kind STREQUAL SHARED)
     add_custom_command(OUTPUT
                          ${AST_OUTPUT}
                        DEPENDS
                          ${objs}
                          ${AST_DEPENDS}
                        COMMAND
-                         ${CMAKE_SWIFT_COMPILER} ${emit_library} ${link_flags} -o ${AST_OUTPUT} ${objs}
-                       COMMAND
-                         ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR})
+                         ${CMAKE_SWIFT_COMPILER} ${emit_library} ${link_flags} -o ${AST_OUTPUT} ${objs})
     add_custom_target(${target}
                       ALL
                       DEPENDS
@@ -163,6 +161,26 @@
                          ${target}-static
                          ${module}
                          ${documentation})
+  endif()
+
+  if(AST_RESOURCES)
+    add_custom_command(TARGET
+                         ${target}
+                       POST_BUILD
+                       COMMAND
+                         ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${target}
+                       COMMAND
+                         ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${target}
+                       COMMAND
+                         ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources
+                       COMMAND
+                         ${CMAKE_COMMAND} -E copy ${AST_RESOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources)
+  else()
+    add_custom_command(TARGET
+                         ${target}
+                       POST_BUILD
+                       COMMAND
+                         ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR})
   endif()
 endfunction()


Add 'utf8' version v2.3.4-p0

Add 'utf8' version v2.3.4-p0

--- cmake/projects/utf8/hunter.cmake
+++ cmake/projects/utf8/hunter.cmake
@@ -19,6 +19,17 @@
     438b70b0c6ee3f674e068ebbc19a4d04a5a4ca56
 )

+hunter_add_version(
+    PACKAGE_NAME
+    utf8
+    VERSION
+    2.3.4-p0
+    URL
+    "https://github.com/hunter-packages/utf8/archive/v2.3.4-p0.tar.gz"
+    SHA1
+    73116d453d4fb2ab4b46159095baeeb319f1ae28
+)
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(utf8)
 hunter_download(PACKAGE_NAME utf8)


Fix overriding of CMAKE_MODULE_PATH

Fix overriding of CMAKE_MODULE_PATH

--- OTF2XX.cmake
+++ OTF2XX.cmake
@@ -31,7 +31,7 @@

 cmake_minimum_required(VERSION 3.0)

-SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake;${CMAKE_CURRENT_LIST_DIR}")
+SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake;${CMAKE_MODULE_PATH}")

 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")


emscripten: new FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML override usable from custom fips configs

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -61,6 +61,12 @@
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "emscripten: how to represent initial memory content (0..2)")
 set(FIPS_EMSCRIPTEN_SHELL_HTML "${EMSCRIPTEN_ROOT_PATH}/src/shell_minimal.html" CACHE STRING "emscripten: path to shell html file")
 set(EMSCRIPTEN_TOTAL_MEMORY_WORKER 16777216)
+
+if (FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML)
+    message("FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML: ${FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML}")
+    set(FIPS_EMSCRIPTEN_SHELL_HTML "${CMAKE_SOURCE_DIR}/${FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML}")
+endif()
+message("FIPS_EMSCRIPTEN_SHELL_HTML: ${FIPS_EMSCRIPTEN_SHELL_HTML}")

 set(EMSC_COMMON_FLAGS)
 set(EMSC_CXX_FLAGS)


Update FW: zero out uninitialized DDR memory

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "a6ed5f116c68dfd4514533867411b479a2fdfea1")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "48fca4a443d841221c94c70d5c05e7e946168636")

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


Update FW: fix some OV7251 flickering, change stereo res to 480p, improve IMX214 focusing

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "9cbd496b930bb28a3d6642c156c60c6f158943ca")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "8ebbc98374f6970e227804c235e87e8801043bf1")

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


Revert "Minor indentation fixes to SearchInstalledSoftware.cmake"

This reverts commit 8fb665ae9369a14dfcb373b5de05c6377b59beaf.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1261,8 +1261,8 @@
   else()
     find_package(Vc 1.3.0 CONFIG QUIET)
     if(NOT Vc_FOUND)
-      message(STATUS "Vc library not found, support for it disabled.")
-      message(STATUS "Please enable the option 'builtin_vc' to build Vc internally.")
+      message(STATUS  "Vc library not found, support for it disabled.")
+      message(STATUS  "Please enable the option 'builtin_vc' to build Vc internally.")
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
   endif()
@@ -1311,8 +1311,8 @@
 endif()

 if(Vc_FOUND)
-  # Missing from VcConfig.cmake
-  set(Vc_INCLUDE_DIRS ${Vc_INCLUDE_DIR})
+	# Missing from VcConfig.cmake
+	set(Vc_INCLUDE_DIRS ${Vc_INCLUDE_DIR})
 endif()

 #---Check for Vdt--------------------------------------------------------------------


vigra.cmake: Only apply patch for mac, and use variable to determine dylib extension (.dylib for mac, .so for linux)

--- vigra.cmake
+++ vigra.cmake
@@ -9,6 +9,7 @@
 include (ExternalProject)
 include (ExternalSource)
 include (BuildSupport)
+include (PatchSupport)

 include (libjpeg)
 include (libtiff)
@@ -45,6 +46,18 @@
 #    vigra-flyem-1.7.1.tar.gz
 #    7325a6fed78383807fd553fc5ee30190)

+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    # The vigra 1.9.0 release assumes all mac builds are "Framework" builds.
+    # This patch allows us to build vigra against non-Framework builds, too.
+    # NOTE: This issue will be fixed in vigra-HEAD on github soon, so this patch
+    #       won't be necessary soon.  The patch may fail to apply when you upgrade
+    #       vigra beyond 1.9.0.
+    set (vigra_PATCH ${FLYEM_ENV_STRING} ${PATCH_EXE}
+        ${vigra_SRC_DIR}/config/FindVIGRANUMPY_DEPENDENCIES.cmake ${PATCH_DIR}/vigra.patch )
+else()
+    set (vigra_PATCH "")
+endif()
+
 message ("Installing ${vigra_NAME} into FlyEM build area: ${FLYEM_BUILD_DIR} ...")
 ExternalProject_Add(${vigra_NAME}
     DEPENDS             ${libjpeg_NAME} ${libtiff_NAME} ${libpng_NAME} ${openexr_NAME} ${libfftw_NAME}
@@ -53,8 +66,7 @@
     URL                 ${vigra_URL}
     URL_MD5             ${vigra_MD5}
     UPDATE_COMMAND      ""
-    PATCH_COMMAND       ${FLYEM_ENV_STRING} ${PATCH_EXE}
-        ${vigra_SRC_DIR}/config/FindVIGRANUMPY_DEPENDENCIES.cmake ${PATCH_DIR}/vigra.patch
+    PATCH_COMMAND       ${vigra_PATCH}
     LIST_SEPARATOR      ^^
     CONFIGURE_COMMAND   ${FLYEM_ENV_STRING} ${CMAKE_COMMAND} ${vigra_SRC_DIR}
         -DCMAKE_INSTALL_PREFIX=${FLYEM_BUILD_DIR}
@@ -62,19 +74,19 @@
         -DCMAKE_EXE_LINKER_FLAGS=${FLYEM_LDFLAGS}
         -DDEPENDENCY_SEARCH_PREFIX=${FLYEM_BUILD_DIR}
         -DBoost_LIBRARY_DIRS=${FLYEM_BUILD_DIR}/lib
- #       -DBoost_PYTHON_LIBRARY=${FLYEM_BUILD_DIR}/lib/libboost_python-mt.dylib
- #       -DBoost_PYTHON_LIBRARY_RELEASE=${FLYEM_BUILD_DIR}/lib/libboost_python-mt.dylib
- #       -DBoost_PYTHON_LIBRARY_DEBUG=${FLYEM_BUILD_DIR}/lib/libboost_python-mt.dylib
- #       -DVIGRANUMPY_LIBRARIES=${FLYEM_BUILD_DIR}/lib/libpython2.7.dylib^^${FLYEM_BUILD_DIR}/lib/libboost_python.dylib
+ #       -DBoost_PYTHON_LIBRARY=${FLYEM_BUILD_DIR}/lib/libboost_python-mt.${FLYEM_PLATFORM_DYLIB_EXTENSION}
+ #       -DBoost_PYTHON_LIBRARY_RELEASE=${FLYEM_BUILD_DIR}/lib/libboost_python-mt.${FLYEM_PLATFORM_DYLIB_EXTENSION}
+ #       -DBoost_PYTHON_LIBRARY_DEBUG=${FLYEM_BUILD_DIR}/lib/libboost_python-mt.${FLYEM_PLATFORM_DYLIB_EXTENSION}
+ #       -DVIGRANUMPY_LIBRARIES=${FLYEM_BUILD_DIR}/lib/libpython2.7.${FLYEM_PLATFORM_DYLIB_EXTENSION}^^${FLYEM_BUILD_DIR}/lib/libboost_python.${FLYEM_PLATFORM_DYLIB_EXTENSION}
         -DJPEG_INCLUDE_DIR=${FLYEM_BUILD_DIR}/include
-        -DJPEG_LIBRARY=${FLYEM_BUILD_DIR}/lib/libjpeg.dylib
-        -DHDF5_CORE_LIBRARY=${FLYEM_BUILD_DIR}/lib/libhdf5.dylib
-        -DHDF5_HL_LIBRARY=${FLYEM_BUILD_DIR}/lib/libhdf5_hl.dylib
+        -DJPEG_LIBRARY=${FLYEM_BUILD_DIR}/lib/libjpeg.${FLYEM_PLATFORM_DYLIB_EXTENSION}
+        -DHDF5_CORE_LIBRARY=${FLYEM_BUILD_DIR}/lib/libhdf5.${FLYEM_PLATFORM_DYLIB_EXTENSION}
+        -DHDF5_HL_LIBRARY=${FLYEM_BUILD_DIR}/lib/libhdf5_hl.${FLYEM_PLATFORM_DYLIB_EXTENSION}
         -DHDF5_INCLUDE_DIR=${FLYEM_BUILD_DIR}/include
         -DFFTW3F_INCLUDE_DIR=
         -DFFTW3F_LIBRARY=
         -DFFTW3_INCLUDE_DIR=${FLYEM_BUILD_DIR}/include
-        -DFFTW3_LIBRARY=${FLYEM_BUILD_DIR}/lib/libfftw3.dylib
+        -DFFTW3_LIBRARY=${FLYEM_BUILD_DIR}/lib/libfftw3.${FLYEM_PLATFORM_DYLIB_EXTENSION}
         -DCMAKE_CXX_FLAGS=-pthread
         -DCMAKE_CXX_LINK_FLAGS=-pthread
     BUILD_COMMAND       ${FLYEM_ENV_STRING} make


Modifed FindParMoonolith.cmake for supporting previously installed moonolith codes and use automatic installation as a fallback.

--- config/cmake/modules/FindParMoonolith.cmake
+++ config/cmake/modules/FindParMoonolith.cmake
@@ -1,59 +1,94 @@
 cmake_minimum_required(VERSION 2.8)
-include(ExternalProject)

-set(STAGE_DIR 				"${CMAKE_BINARY_DIR}/stage")
-set(MOONOLITH_URL 			https://zulianp@bitbucket.org/zulianp/par_moonolith.git)
-set(MOONOLITH_SOURCE_DIR 	${STAGE_DIR}/par_moonolith)
-set(MOONOLITH_BIN_DIR 		${STAGE_DIR}/par_moonolith/bin)
+if(MOONOLITH_DIR OR DEFINED ENV{MOONOLITH_DIR})

-if(DEFINED ENV{MOONOLITH_INSTALL_PREFIX})
-	set(MOONOLITH_INSTALL_DIR $ENV{MOONOLITH_INSTALL_PREFIX})
-elseif(MOONOLITH_INSTALL_PREFIX)
-	set(MOONOLITH_INSTALL_DIR ${MOONOLITH_INSTALL_PREFIX})
-else()
-	set(MOONOLITH_INSTALL_DIR ${CMAKE_BINARY_DIR}/external)
-	message(STATUS "Moonolith will be installed in ${MOONOLITH_INSTALL_DIR}.\nIf you want a different location set MOONOLITH_INSTALL_PREFIX")
+	find_path(MOONOLITH_INSTALLATION_PATH
+		NAME config/moonolith_config.cmake
+		HINTS ${MOONOLITH_DIR}
+		$ENV{MOONOLITH_DIR}
+		)
+
+
+	if(MOONOLITH_INSTALLATION_PATH)
+		message(STATUS "Found moonolith installation at ${MOONOLITH_INSTALLATION_PATH}")
+		include(${MOONOLITH_INSTALLATION_PATH}/config/moonolith_config.cmake)
+		include(FindPackageHandleStandardArgs)
+
+		find_package_handle_standard_args(MOONOLITH
+		  REQUIRED_VARS MOONOLITH_LIBRARIES MOONOLITH_INCLUDES
+		)
+
+		mark_as_advanced(MOONOLITH_INCLUDES MOONOLITH_LIBRARIES)
+
+		if(MOONOLITH_FOUND)
+			add_custom_target(par_moonolith)
+		endif()
+	else()
+
+	endif()
+
 endif()

-list(APPEND MOONOLITH_CMAKE_ARGS
-	"-DCMAKE_INSTALL_PREFIX=${MOONOLITH_INSTALL_DIR}"
-	"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
-	"-DENABLE_SANITIZER=${ENABLE_SANITIZER}"
-	"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
-	# "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
-	"-DENABLE_MOONOLITH_PROFILER=${ENABLE_MOONOLITH_PROFILER}"
+if(NOT MOONOLITH_FOUND)
+	#Automatically download
+	include(ExternalProject)
+
+	set(STAGE_DIR 				"${CMAKE_BINARY_DIR}/stage")
+	set(MOONOLITH_URL 			https://zulianp@bitbucket.org/zulianp/par_moonolith.git)
+	set(MOONOLITH_SOURCE_DIR 	${STAGE_DIR}/par_moonolith)
+	set(MOONOLITH_BIN_DIR 		${STAGE_DIR}/par_moonolith/bin)
+
+	if(MOONOLITH_INSTALL_PREFIX)
+		set(MOONOLITH_INSTALL_DIR ${MOONOLITH_INSTALL_PREFIX})
+	elseif(DEFINED ENV{MOONOLITH_INSTALL_PREFIX})
+		set(MOONOLITH_INSTALL_DIR $ENV{MOONOLITH_INSTALL_PREFIX})
+	else()
+		set(MOONOLITH_INSTALL_DIR ${CMAKE_BINARY_DIR}/external)
+		message(STATUS "Moonolith will be installed in ${MOONOLITH_INSTALL_DIR}.\nIf you want a different location set MOONOLITH_INSTALL_PREFIX")
+	endif()
+
+
+	list(APPEND MOONOLITH_CMAKE_ARGS
+		"-DCMAKE_INSTALL_PREFIX=${MOONOLITH_INSTALL_DIR}"
+		"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
+		"-DENABLE_SANITIZER=${ENABLE_SANITIZER}"
+		"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
+		# "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
+		"-DENABLE_MOONOLITH_PROFILER=${ENABLE_MOONOLITH_PROFILER}"
+		)
+
+	message(STATUS "${MOONOLITH_CMAKE_ARGS}")
+
+	ExternalProject_Add(
+		par_moonolith
+		UPDATE_COMMAND		"" #FIXME
+		PREFIX ${STAGE_DIR}
+		GIT_REPOSITORY 		${MOONOLITH_URL}
+		DOWNLOAD_DIR 		${STAGE_DIR}
+		INSTALL_DIR         ${MOONOLITH_INSTALL_DIR}
+		BINARY_DIR 			${MOONOLITH_SOURCE_DIR}
+		CMAKE_ARGS 			"${MOONOLITH_CMAKE_ARGS}"
+		LOG_CONFIGURE		1
+		LOG_BUILD 			1
 	)

-ExternalProject_Add(
-	par_moonolith
-	UPDATE_COMMAND		"" #FIXME
-	PREFIX ${STAGE_DIR}
-	GIT_REPOSITORY 		${MOONOLITH_URL}
-	DOWNLOAD_DIR 		${STAGE_DIR}
-	INSTALL_DIR         ${MOONOLITH_INSTALL_DIR}
-	BINARY_DIR 			${MOONOLITH_SOURCE_DIR}
-	CMAKE_ARGS 			"${MOONOLITH_CMAKE_ARGS}"
-	LOG_CONFIGURE		1
-	LOG_BUILD 			1
-)
+	list(APPEND MOONOLITH_INCLUDES
+		${MOONOLITH_INSTALL_DIR}/include
+		${MOONOLITH_INSTALL_DIR}/include/kernels
+		)

-list(APPEND MOONOLITH_INCLUDES
-	${MOONOLITH_INSTALL_DIR}/include
-	${MOONOLITH_INSTALL_DIR}/include/kernels
-	)
+	set(MOONOLITH_LIBRARIES "")
+	list(APPEND MOONOLITH_LIBRARIES
+		"-L${MOONOLITH_INSTALL_DIR}/lib"
+		"-lmoonolith_opencl"
+		"-lpar_moonolith"
+		"-lpar_moonolith_intersection"
+		"-lpar_moonolith_mpi"
+		"-lpar_moonolith_tree"
+		"-lpar_moonolith_utils"
+		)

-set(MOONOLITH_LIBRARIES "")
-list(APPEND MOONOLITH_LIBRARIES
-	"-L${MOONOLITH_INSTALL_DIR}/lib"
-	"-lmoonolith_opencl"
-	"-lpar_moonolith"
-	"-lpar_moonolith_intersection"
-	"-lpar_moonolith_mpi"
-	"-lpar_moonolith_tree"
-	"-lpar_moonolith_utils"
-	)
+	set(MOONOLITH_FOUND TRUE)

-
-set(MOONOLITH_FOUND TRUE)
-
+endif()


COMP: Added QtAdapters/test/CMakeList.txt to fix otbQtAdaptersExport.h file not found error.

--- Modules/Adapters/QtAdapters/otb-module.cmake
+++ Modules/Adapters/QtAdapters/otb-module.cmake
@@ -5,6 +5,9 @@
   DEPENDS
     OTBQt4

+  # TEST_DEPENDS
+  #   OTBCommon
+
   DESCRIPTION
     "${DOCUMENTATION}"
 )


lxqt_translate_desktop: Updates code to cope with the cmake-policy CMP0054

This policy was introduced in CMake version 3.1. In any case the use of the
cmake_make_parse_arguments() function is the standard way of handle options.

Updates the documentation.

--- cmake/LXQtTranslateDesktop.cmake
+++ cmake/LXQtTranslateDesktop.cmake
@@ -4,39 +4,53 @@
 #
 # Original Author: Alexander Sokolov <sokoloff.a@gmail.com>
 #
+# funtion lxqt_translate_desktop(_RESULT
+#                           SOURCES <sources>
+#                           [TRANSLATION_DIR] translation_directory
+#                    )
+#     Output:
+#       _RESULT The generated .desktop (.desktop) files
+#
+#     Input:
+#
+#       SOURCES List of input desktop files (.destktop.in) to be translated
+#               (merged), relative to the CMakeList.txt.
+#
+#       TRANSLATION_DIR Optional path to the directory with the .ts files,
+#                        relative to the CMakeList.txt. Defaults to
+#                        "translations".
+#
 #=============================================================================

 function(lxqt_translate_desktop _RESULT)
-    set(_translationDir "translations")
+    # Parse arguments ***************************************
+    set(oneValueArgs TRANSLATION_DIR)
+    set(multiValueArgs SOURCES)

-    # Parse arguments ***************************************
-    set(_state "")
-    foreach (_arg ${ARGN})
-        if (
-            ("${_arg}_I_HATE_CMAKE" STREQUAL "SOURCES_I_HATE_CMAKE") OR
-            ("${_arg}_I_HATE_CMAKE" STREQUAL "TRANSLATION_DIR_I_HATE_CMAKE")
-           )
+    cmake_parse_arguments(_ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

-            set(_state ${_arg})
+    # check for unknown arguments
+    set(_UNPARSED_ARGS ${_ARGS_UNPARSED_ARGUMENTS})
+    if (NOT ${_UNPARSED_ARGS} STREQUAL "")
+        MESSAGE(FATAL_ERROR
+          "Unknown arguments '${_UNPARSED_ARGS}'.\n"
+          "See lxqt_translate_desktop() documenation for more information.\n"
+        )
+    endif()

-        else()
-            if("${_state}" STREQUAL "SOURCES")
-                get_filename_component (__file ${_arg} ABSOLUTE)
-                set(_sources  ${_sources} ${__file})
-                #set(_sources  ${_sources} ${_arg})
+    if (NOT DEFINED _ARGS_SOURCES)
+        set(${_RESULT} "" PARENT_SCOPE)
+        return()
+    else()
+        set(_sources ${_ARGS_SOURCES})
+    endif()

-            elseif("${_state}" STREQUAL "TRANSLATION_DIR")
-                set(_translationDir ${_arg})
-                set(_state "")
+    if (NOT DEFINED _ARGS_TRANSLATION_DIR)
+        set(_translationDir "translations")
+    else()
+        set(_translationDir ${_ARGS_TRANSLATION_DIR})
+    endif()

-            else()
-                MESSAGE(FATAL_ERROR
-                  "Unknown argument '${_arg}'.\n"
-                  "See ${CMAKE_CURRENT_LIST_FILE} for more information.\n"
-                )
-            endif()
-        endif()
-    endforeach(_arg)

     get_filename_component (_translationDir ${_translationDir} ABSOLUTE)


Add Plugin: Add documentation for new options

--- cmake/Modules/LibAddPlugin.cmake
+++ cmake/Modules/LibAddPlugin.cmake
@@ -226,6 +226,12 @@
 #
 # INSTALL_TEST_DATA:
 #  Install a directory with test data which has the same name as the plugin.
+#
+# TEST_README:
+#  Add a Markdown Shell Recorder test for the ReadMe of the plugin
+#
+# ENVIRONMENT:
+#   Specifies environment variables for the Markdown Shell Recorder test
 #
 function (add_plugin PLUGIN_SHORT_NAME)
 	cmake_parse_arguments (ARG


Add new files to cmake scripts

Add new files to cmake scripts

--- add-sources.cmake
+++ add-sources.cmake
@@ -131,6 +131,7 @@
     ${LOMSE_SRC_DIR}/internal_model/lomse_im_figured_bass.cpp
     ${LOMSE_SRC_DIR}/internal_model/lomse_im_note.cpp
     ${LOMSE_SRC_DIR}/internal_model/lomse_internal_model.cpp
+    ${LOMSE_SRC_DIR}/internal_model/lomse_measures_table.cpp
     ${LOMSE_SRC_DIR}/internal_model/lomse_score_utilities.cpp
 )


Check for cuda only if configured with cuda support.

--- cmake/macros/macro_deal_ii_add_test.cmake
+++ cmake/macros/macro_deal_ii_add_test.cmake
@@ -250,9 +250,11 @@
           COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/${_target}/interrupt_guard.cc
           )

-        FIND_PACKAGE(CUDA)
-        CUDA_INCLUDE_DIRECTORIES("${DEAL_II_INCLUDE_DIRS}")
-        CUDA_WRAP_SRCS( ${_target} OBJ _generated_files ${_source_file} )
+        IF(DEAL_II_WITH_CUDA)
+          FIND_PACKAGE(CUDA)
+          CUDA_INCLUDE_DIRECTORIES("${DEAL_II_INCLUDE_DIRS}")
+          CUDA_WRAP_SRCS( ${_target} OBJ _generated_files ${_source_file} )
+        ENDIF()

         ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL
           ${_generated_files}


[FIX] Activating exception semantics for MSVC

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

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -209,12 +209,12 @@
 if (WIN32)
   # Always set NOMINMAX such that <Windows.h> does not define min/max as
   # macros.
-  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /EHsc")
   add_definitions (-DNOMINMAX)
 endif (WIN32)

 # Visual Studio Setup
 if (MSVC)
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /EHsc")
   # Warning level 3 for MSVC is disabled for now to see how much really bad warnings there are.
   #set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W3)


Improve cmake toolchain file

Improve cmake toolchain file

--- misc/toolchain.cmake
+++ misc/toolchain.cmake
@@ -47,8 +47,8 @@

 set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

-set(CMAKE_C_COMPILER ${MCU_COMPILER})
-set(CMAKE_CXX_COMPILER ${MCU_COMPILER})
+set(CMAKE_C_COMPILER ${MCU_COMPILER} CACHE INTERNAL "" FORCE)
+set(CMAKE_CXX_COMPILER ${MCU_COMPILER} CACHE INTERNAL "" FORCE)
 set(UTIL_OBJCOPY ${MCU_TOOLCHAIN_PREFIX}objcopy)
 set(UTIL_SIZE ${MCU_TOOLCHAIN_PREFIX}size)

@@ -69,7 +69,7 @@
 	set(MCU_FLAGS "${MCU_FLAGS} -Tscript.ld")
 endif()

-set(CMAKE_C_FLAGS "${MCU_FLAGS}" CACHE INTERNAL "")
-set(CMAKE_CXX_FLAGS "${MCU_FLAGS}" CACHE INTERNAL "")
-set(CMAKE_EXE_LINKER_FLAGS "${MCU_FLAGS}" CACHE INTERNAL "")
+set(CMAKE_C_FLAGS "${MCU_FLAGS}" CACHE INTERNAL "" FORCE)
+set(CMAKE_CXX_FLAGS "${MCU_FLAGS}" CACHE INTERNAL "" FORCE)
+set(CMAKE_EXE_LINKER_FLAGS "${MCU_FLAGS}" CACHE INTERNAL "" FORCE)
 include_directories("${CMAKE_CURRENT_BINARY_DIR}")


BUG: Removed the system include directories.

Removed the system include directories from the VTK_INCLUDE_DIRS
variable. This adds include directories for third party libraries such
as Boost, which is not normally expected in an INCLUDE_DIRS variable.

Change-Id: I414643bcaf4760491ab35f349e698503f6f60b93

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -84,7 +84,6 @@
 SET(VTK_INCLUDE_DIRS_CONFIG
   ${VTK_INCLUDE_DIRS_BUILD_TREE}
   ${VTK_INCLUDE_DIRS_SOURCE_TREE}
-  ${VTK_INCLUDE_DIRS_SYSTEM}
 )

 # Executable locations.
@@ -189,7 +188,6 @@
 # Include directories.
 SET(VTK_INCLUDE_DIRS_CONFIG
   ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_INCLUDE_DIR}
-  ${VTK_INCLUDE_DIRS_SYSTEM}
 )

 # Link directories.


fix luajit.cmake, dasm_x64 is not equal dasm_x86

--- deps/luajit.cmake
+++ deps/luajit.cmake
@@ -184,9 +184,6 @@
     SET(DASM_FLAGS ${DASM_FLAGS} -D SSE)
   ENDIF()
 ENDIF()
-IF(TARGET_LJARCH STREQUAL "x64")
-  SET(DASM_ARCH "x86")
-ENDIF()
 IF(TARGET_LJARCH STREQUAL "ppc")
   LJ_TEST_ARCH_VALUE(LJ_ARCH_SQRT 1)
   IF(NOT LJ_ARCH_SQRT_1)


cmake: Add java_deploy and java_native_deploy target


CMake: cleanup reference to /usr (failing test on pkg)

--- CMake/FindLibSVM.cmake
+++ CMake/FindLibSVM.cmake
@@ -14,7 +14,7 @@
 #  LIBSVM_MINOR_VERSION - minor version
 #  LIBSVM_PATCH_VERSION - patch version
 #  LIBSVM_VERSION_STRING - version (ex. 2.9.0)
-#  LIBSVM_ROOT_DIR - root dir (ex. /usr/local)
+#  LIBSVM_ROOT_DIR - libsvm install directory

 #=============================================================================
 # Copyright 2000-2009 Kitware, Inc., Insight Software Consortium


BUG: Bump ITKv3 version to bring in tube reader fixes.

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -132,7 +132,7 @@
     set( proj Insight )
     ExternalProject_Add( ${proj}
       GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Kitware/ITK.git"
-      GIT_TAG "v3.20.1"
+      GIT_TAG "3f5d32015df46591fde9c4656b59842f11efe9e4"
       SOURCE_DIR "${CMAKE_BINARY_DIR}/Insight"
       BINARY_DIR Insight-Build
       CMAKE_GENERATOR ${gen}


Set dev build flags.

Set dev build flags.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -1,4 +1,15 @@
 include(PrecompiledHeader)
+
+
+function(string_starts_with str search)
+  string(FIND "${str}" "${search}" out)
+  if("${out}" EQUAL 0)
+    return(true)
+  endif()
+  return(false)
+endfunction()
+
+set(DEV_BUILD 1)

 # Gitlab CI support
@@ -10,6 +21,13 @@
 endif()
 if ($ENV{CI_COMMIT_REF_SLUG})
 	add_definitions(-DCI_COMMIT_REF_SLUG=$ENV{CI_COMMIT_REF_SLUG})
+	if (string_starts_with($ENV{CI_COMMIT_REF_SLUG} release))
+		set(DEV_BUILD 0)
+	endif()
+endif()
+
+if (DEV_BUILD EQUAL 1)
+	add_definitions(-DDEV_BUILD)
 endif()

@@ -33,7 +51,12 @@
 	endif ()
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /sdl /Oi /Ot /Oy /Ob2 /Zi")
 	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /sdl /Oi /Ot /Ob2")
-	set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /DEBUG")
+	set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
+
+	if(DEV_BUILD EQUAL 0)
+		set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
+	endif()
+
 	set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
 	set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
 	set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")


Remove version requirements of unused libraries

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -1,4 +1,2 @@
 hunter_config(GTest VERSION 1.8.0-hunter-p5)
-hunter_config(glog VERSION 0.3.4-p2)
 hunter_config(Boost VERSION 1.63.0)
-hunter_config(OpenSSL VERSION 1.1.0e)


Bump version of develop branch

Bump version of develop branch

--- cmake/build-version.cmake
+++ cmake/build-version.cmake
@@ -19,7 +19,7 @@
   endif( )
   if( POLICY CMP0048 )
     cmake_policy( SET CMP0048 NEW )
-    project( ${PV_NAME} VERSION 0.4.0.0 LANGUAGES ${PV_LANGUAGES} )
+    project( ${PV_NAME} VERSION 0.5.0.0 LANGUAGES ${PV_LANGUAGES} )

   else( )
     project( ${PV_NAME} ${PV_LANGUAGES} )
@@ -29,7 +29,7 @@
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_MINOR )
-      set( ${PV_NAME}_VERSION_MINOR 4 )
+      set( ${PV_NAME}_VERSION_MINOR 5 )
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_PATCH )


Fix NGRAPH_CPU_MLIR_ENABLE build issue. (#4913)

--- cmake/external_llvm.cmake
+++ cmake/external_llvm.cmake
@@ -117,7 +117,7 @@
     target_link_libraries(libllvm INTERFACE clangHandleCXX clangHandleLLVM)
 endif()

-if(NGRAPH_MLIR_ENABLE)
+if(NGRAPH_MLIR_ENABLE OR NGRAPH_CPU_MLIR_ENABLE)
     # MLIR environment variables. Some of them are used by LIT tool.

     # Only used in this file


Install ocaml packages in
  ${CMAKE_INSTALL_PREFIX}/lib/ocaml/${OCAML_VERSION}
rather than
  ${CMAKE_INSTALL_PREFIX}/lib/${OCAML_VERSION}
which is now consistent with Debian (as the comment suggests) and also
follows what we do for other languages.

svn path=/trunk/; revision=9670

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -99,7 +99,7 @@

   # Installation follows the Debian ocaml policy for want of a better
   # standard.
-  set(OCAML_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib/${OCAML_VERSION}
+  set(OCAML_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib/ocaml/${OCAML_VERSION}
     CACHE PATH "install location for ocaml files"
     )


Removed a stray comma in the Android toolchain file.

It was actually acting as an additional argument, breaking the error message.

--- platforms/android/android.toolchain.cmake
+++ platforms/android/android.toolchain.cmake
@@ -715,7 +715,7 @@
 # verify that target ABI is supported
 list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx )
 if( __androidAbiIdx EQUAL -1 )
- string( REPLACE ";" "\", \"", PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
+ string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
  message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain.
    Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\"
    " )


Correction du cmake de génération de webservice pour effectivement permettre de générer à la fois le webservice et la version debug

git-svn-id: d30e9ebd5e731d506e3e731e014b27e1f54e3bfc@103 a734f7ea-df10-47d3-a172-9f42111c9061

--- source/cmake_modules/FindWS_Commons.cmake
+++ source/cmake_modules/FindWS_Commons.cmake
@@ -44,25 +44,24 @@
   CDR(WS_SOURCES ${WS_DEFAULT_ARGS})

   IF(WS_FCGI)
-    ADD_DEFINITIONS(-DWS_TYPE=1)
+    #ADD_DEFINITIONS(-DWS_TYPE=1)
     MESSAGE("Cration du webservice ${WS_NAME} en FastCGI")
   ELSEIF(WS_ISAPI)
-    ADD_DEFINITIONS(-DWS_TYPE=2)
+    #ADD_DEFINITIONS(-DWS_TYPE=2)
     MESSAGE("Cration du webservice ${WS_NAME} en ISAPI")
   ELSEIF(WS_DUMMY)
-    ADD_DEFINITIONS(-DWS_TYPE=3)
+    #ADD_DEFINITIONS(-DWS_TYPE=3)
     MESSAGE("Cration du webservice ${WS_NAME} en DUMMY")
   ELSE(WS_FCGI)
     IF(WIN32)
-      ADD_DEFINITIONS(-DWS_TYPE=2)
+      #ADD_DEFINITIONS(-DWS_TYPE=2)
       SET(WS_ISAPI TRUE)
       MESSAGE("Cration du webservice ${WS_NAME} en ISAPI (choix par dfaut)")
     ELSE(WIN32)
-      ADD_DEFINITIONS(-DWS_TYPE=1)
+      #ADD_DEFINITIONS(-DWS_TYPE=1)
       SET(WS_FCGI TRUE)
       MESSAGE("Cration du webservice ${WS_NAME} en FastCGI (choix par dfaut)")
     ENDIF(WIN32)
-	REMOVE_DEFINITIONS(-DWS_TYPE=1)
   ENDIF(WS_FCGI)

   FIND_PACKAGE(Boost 1.40.0 COMPONENTS system thread REQUIRED)
@@ -74,20 +73,22 @@
     include_directories (${CMAKE_SOURCE_DIR}/WS_commons ${FCGI_INCLUDE_DIRS})
     add_executable(${WS_NAME} ${WS_SOURCES})
     target_link_libraries(${WS_NAME} ${WS_LIBS} ${FCGI_LIBRARY} ${Boost_LIBRARIES})
+	SET_TARGET_PROPERTIES(${WS_NAME} PROPERTIES COMPILE_FLAGS -DWS_TYPE=1)
   ELSEIF(WS_ISAPI)
     FIND_LIBRARY(LIB_WS2 Ws2_32  REQUIRED)
     include_directories (${CMAKE_SOURCE_DIR}/WS_commons)
     add_library(${WS_NAME} SHARED ${WS_SOURCES} ${CMAKE_SOURCE_DIR}/WS_Commons/export.def)
+	SET_TARGET_PROPERTIES(${WS_NAME} PROPERTIES COMPILE_FLAGS -DWS_TYPE=2)
     IF(MSVC)
-      target_link_libraries(${WS_NAME} ${WS_LIBS} Ws2_32 )
+      target_link_libraries(${WS_NAME} ${WS_LIBS})
     ELSE(MSVC)
       target_link_libraries(${WS_NAME} ws2_32 ${WS_LIBS} ${Boost_LIBRARIES})
     ENDIF(MSVC)
-	REMOVE_DEFINITIONS(-DWS_TYPE=2)
+	# REMOVE_DEFINITIONS(-DWS_TYPE=1)
   ENDIF(WS_FCGI)

   # On cr systmatiquement une version Qt pour dboggage
-  ADD_DEFINITIONS(-DWS_TYPE=4)
+  # ADD_DEFINITIONS(-DWS_TYPE=4)
   FIND_PACKAGE(Qt4 REQUIRED)
   include(${QT_USE_FILE})
   QT4_WRAP_UI(qt_UI ${CMAKE_SOURCE_DIR}/WS_commons/qt/mainwindow.ui)
@@ -95,5 +96,6 @@
   add_executable(q${WS_NAME} ${WS_SOURCES} ${qt_UI} ${qt_MOC} ${CMAKE_SOURCE_DIR}/WS_commons/qt/main.h)
   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/WS_commons)
   target_link_libraries(q${WS_NAME} ${QT_LIBRARIES} ${WS_LIBS} ${Boost_LIBRARIES})
-
+  SET_TARGET_PROPERTIES(q${WS_NAME} PROPERTIES COMPILE_FLAGS -DWS_TYPE=4)
+
 ENDMACRO(MAKE_WS)


CMake: Edit salome macro - Now it's possible to accumulate environment without checked. - Native directories were not accumulated. - Is possible to add target to environment.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -655,23 +655,42 @@
 # 2. Full list of environment variable names is stored in CMake variable
 #    _${PROJECT_NAME}_EXTRA_ENV.
 #
+# Notes:
+# - If in arguments is set keyword CHECK all argument after checked for directory,
+#   else if NOT_CHECK macro accumulates arguments without checking.
+#   By default all arguments without keyword must be checked.
+#
 MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
+  SET(_is_check ON)
   FOREACH(_item ${ARGN})
-    IF(EXISTS ${_item})
-      IF(IS_DIRECTORY ${_item})
+    IF(${_item} STREQUAL "NOT_CHECK")
+      SET(_is_check OFF)
+    ELSEIF(${_item} STREQUAL "CHECK")
+      SET(_is_check ON)
+    ELSE()
+      IF(_is_check)
+        IF(NOT IS_DIRECTORY ${_item})
+          IF(TARGET ${_item})
+            GET_TARGET_PROPERTY(_item ${_item} LOCATION)
+          ENDIF()
+          GET_FILENAME_COMPONENT(_item ${_item} PATH)
+        ENDIF()
+        IF(EXISTS ${_item})
+          STRING(REGEX MATCH "^/usr" _usr_find ${_item})
+          LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
+          IF(NOT _usr_find AND _res EQUAL -1)
+              LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
+          ENDIF()
+        ENDIF()
+      ELSE(_is_check)
         LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
-        IF(_res EQUAL -1)
+        IF( _res EQUAL -1)
           LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
-        ENDIF()
-      ELSE()
-        GET_FILENAME_COMPONENT(_path_dir ${_item} PATH)
-        LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_path_dir} _res)
-        IF(_res EQUAL -1)
-          LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_path_dir})
-        ENDIF()
-      ENDIF()
-    ENDIF()
+        ENDIF()
+      ENDIF(_is_check)
+    ENDIF()
   ENDFOREACH()
+
   LIST(FIND _${PROJECT_NAME}_EXTRA_ENV ${envvar} _res)
   IF(_res EQUAL -1)
     LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV ${envvar})


Fixing TIMESTAMP mechanism for PY file compilation

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -129,9 +129,9 @@
       ELSE(${CMAKE_VERSION} VERSION_LESS "2.8.11")
         GET_FILENAME_COMPONENT(file_we ${file_name} NAME_WE)
         INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file_name}')\")")
-        INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"            py_time)")
-        INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyc\" pyc_time)")
-        INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyo\" pyo_time)")
+        INSTALL(CODE "FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_name}\"            py_time)")
+        INSTALL(CODE "IF(EXISTS \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyc\") \n  FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyc\" pyc_time) \n ELSE()\n  SET(pyc_time 0) \n ENDIF() ")
+        INSTALL(CODE "IF(EXISTS \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyo\") \n  FILE(TIMESTAMP \"${CMAKE_INSTALL_PREFIX}/${path}/${file_we}.pyo\" pyo_time) \n ELSE()\n  SET(pyo_time 0) \n ENDIF() ")
         #INSTALL(CODE "MESSAGE(STATUS \"\${py_time} \${pyc_time} \")")
         INSTALL(CODE "STRING(COMPARE LESS \${pyc_time} \${py_time} to_install_pyc)")
         INSTALL(CODE "STRING(COMPARE LESS \${pyo_time} \${py_time} to_install_pyo)")


CMake: Bugfix, use the same Generator for when querying for language support.

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

--- deal.II/cmake/macros/macro_enable_language_optional.cmake
+++ deal.II/cmake/macros/macro_enable_language_optional.cmake
@@ -48,8 +48,9 @@
     FILE(WRITE ${_tmp}/CMakeLists.txt
       "PROJECT(foobar ${_language})"
       )
+
     EXECUTE_PROCESS(
-      COMMAND ${CMAKE_COMMAND} ${_hint} .
+      COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_hint} .
       WORKING_DIRECTORY ${_tmp}
       RESULT_VARIABLE _result
       OUTPUT_QUIET


CI: remove ssh config step in prepare_superbuild

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -208,21 +208,21 @@
   # setting up the repo
   # StrictHostKeyChecking so we don't have to add the host as a known key
   # -F /dev/null so the agent is not taking a default file ~/.ssh/..
-  execute_process(
-    COMMAND ${GIT} "config" "core.sshCommand"
-    "ssh -o StrictHostKeyChecking=no -F /dev/null"
-    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-    RESULT_VARIABLE ssh_res
-    OUTPUT_VARIABLE ssh_out
-    ERROR_VARIABLE ssh_err
-    )
-
-  if ( DEBUG )
-    message( "Step 1: ssh")
-    message( "ssh_res = ${ssh_res}" )
-    message( "ssh_out = ${ssh_out}" )
-    message( "ssh_err = ${ssh_err}" )
-  endif()
+  #~ execute_process(
+    #~ COMMAND ${GIT} "config" "core.sshCommand"
+    #~ "ssh -o StrictHostKeyChecking=no -F /dev/null"
+    #~ WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    #~ RESULT_VARIABLE ssh_res
+    #~ OUTPUT_VARIABLE ssh_out
+    #~ ERROR_VARIABLE ssh_err
+    #~ )
+  #~
+  #~ if ( DEBUG )
+    #~ message( "Step 1: ssh")
+    #~ message( "ssh_res = ${ssh_res}" )
+    #~ message( "ssh_out = ${ssh_out}" )
+    #~ message( "ssh_err = ${ssh_err}" )
+  #~ endif()

   #~ execute_process(
     #~ COMMAND ${GIT} "config" "user.mail" "otbbot@orfeo-toolbox.org"


PolysquareToolingUtil: Don't use -x c++ on Windows

--- PolysquareToolingUtil.cmake
+++ PolysquareToolingUtil.cmake
@@ -649,14 +649,15 @@
         # Compiler and language options
         if (LANGUAGE STREQUAL "CXX")

-            list (APPEND COMPILER_COMMAND_LINE
-                  "\\\"${CMAKE_CXX_COMPILER}\\\""
-                  -x
-                  c++)
+            list (APPEND COMPILER_COMMAND_LINE "\\\"${CMAKE_CXX_COMPILER}\\\"")

             if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")

                 list (APPEND COMPILER_COMMAND_LINE "--driver-mode=cl")
+
+            else ()
+
+                list (APPEND COMPILER_COMMAND_LINE -x c++)

             endif ()


Workaround for cmake bug that prevented build in Win64+MSVC+static libs

--- adm/cmake/OccBuildKit.cmake
+++ adm/cmake/OccBuildKit.cmake
@@ -95,6 +95,12 @@
 	SET_SOURCE_FILES_PROPERTIES("${${PROJECT_NAME}_SOURCE_DIR}/src/OSD/OSD_FontMgr.cxx" PROPERTIES COMPILE_FLAGS "-DX11_FONT_PATH=\"${X11_FONT_PATH}\"")
 ENDIF(DEFINED X11_FONT_PATH)

+# Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240)
+# Win64+MSVC+static libs = linker error
+IF(MSVC AND (NOT ${PROJECT_NAME}_BUILD_SHARED_LIB) AND (BIT EQUAL 64))
+  set_target_properties(${TOOLKIT} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
+ENDIF()
+
 # Set dependencies for thit ToolKit
 IF ( NOT "${TOOLKIT}" STREQUAL "TKernel" )
 	LIST(REMOVE_DUPLICATES TOOLKIT_DEPENDS)


Fix issue with MPI link flags -- mvapich2 works now

--- cmake/mpi.cmake
+++ cmake/mpi.cmake
@@ -50,8 +50,8 @@
     ENDIF()

     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}")
+    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS}")
     INCLUDE_DIRECTORIES(SYSTEM ${MPI_CXX_INCLUDE_PATH})
-    LINK_DIRECTORIES(${MPI_CXX_LINK_FLAGS})

     IF (THIS_IS_MIC)
       SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmic")


Updating the cmake hash and location in master.

--- tensorflow/contrib/cmake/external/gemmlowp.cmake
+++ tensorflow/contrib/cmake/external/gemmlowp.cmake
@@ -14,8 +14,8 @@
 # ==============================================================================
 include (ExternalProject)

-set(gemmlowp_URL http://github.com/google/gemmlowp/archive/010bb3e71a26ca1d0884a167081d092b43563996.tar.gz)
-set(gemmlowp_HASH SHA256=861cc6d9d902861f54fd77e1ab79286477dcc559b2a283e75b9c22d37b61f6ae)
+set(gemmlowp_URL http://mirror.bazel.build/github.com/google/gemmlowp/archive/a6f29d8ac48d63293f845f2253eccbf86bc28321.tar.gz)
+set(gemmlowp_HASH SHA256=75d40ea8e68b0d1644f052fffe8f14a410b2a73d40ccb859a95c0578d194ec26)
 set(gemmlowp_BUILD ${CMAKE_CURRENT_BINARY_DIR}/gemmlowp/src/gemmlowp)
 set(gemmlowp_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/gemmlowp/src/gemmlowp)


:mute: suppress unsigned integer warnings

--- cmake/ci.cmake
+++ cmake/ci.cmake
@@ -486,7 +486,7 @@
 # Sanitizers.
 ###############################################################################

-set(CLANG_CXX_FLAGS_SANITIZER "-g -O1 -fsanitize=address -fsanitize=undefined -fsanitize=integer -fsanitize=nullability -fno-omit-frame-pointer -fno-sanitize-recover=all -fsanitize-recover=unsigned-integer-overflow")
+set(CLANG_CXX_FLAGS_SANITIZER "-g -O1 -fsanitize=address -fsanitize=undefined -fsanitize=integer -fsanitize=nullability -fno-omit-frame-pointer -fno-sanitize-recover=all -fno-sanitize=unsigned-integer-overflow -fno-sanitize=unsigned-shift-base")

 add_custom_target(ci_test_clang_sanitizer
     COMMAND CXX=${CLANG_TOOL} CXXFLAGS=${CLANG_CXX_FLAGS_SANITIZER} ${CMAKE_COMMAND}


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -547,7 +547,6 @@
 	cmaki_find_package(python)
 	cmaki_find_package(boost-python)
 	cmaki_parse_parameters(${ARGV})
-	cmaki_install_file(${_SOURCES})
 	add_test(	NAME ${_MAIN_NAME}_test
 			COMMAND ./bin/python3 ${_SOURCES}
 			WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})


build: don't play with LINK_INTERFACE_LIBRARIES

Fixes: #298

Looks like we don't use this target property

Signed-off-by: Dmitry Rogozhkin <01f0df9cc32cbf6a7f0faa5c8376e6cf28354d70@intel.com>

--- builder/FindFunctions.cmake
+++ builder/FindFunctions.cmake
@@ -218,7 +218,7 @@
       target_link_libraries( ${target} ${lib} )
     endforeach()

-    set_target_properties( ${target} PROPERTIES LINK_INTERFACE_LIBRARIES "" )
+#    set_target_properties( ${target} PROPERTIES LINK_INTERFACE_LIBRARIES "" )
   endif()

   configure_build_variant( ${target} ${ARGV1} )


Move macOS-specific code inside if(APPLE) block

--- projects/python.cmake
+++ projects/python.cmake
@@ -1,10 +1,12 @@
-set(_proc_env "MACOSX_DEPLOYMENT_TARGET" "10.9")
+set(_proc_env)
+
+if (APPLE)
+  list(APPEND _proc_env "MACOSX_DEPLOYMENT_TARGET" "10.9")

 # Horrible hack to force the configure step not to find getentropy and clock_gettime.
 # If we build on a version that has these defined ( even as weak symbols ) they will
 # be used and then we will get run time link errors when running on versions that
 # don't actually have them defined ( such as 10.11 )
-if (APPLE)
   list(APPEND _proc_env "ac_cv_func_getentropy" "no" "ac_cv_func_clock_gettime" "no")
 endif()


Delete FindGflags.cmake

Delete FindGflags.cmake

--- ros_control_boilerplate/cmake/FindGflags.cmake
+++ ros_control_boilerplate/cmake/FindGflags.cmake
@@ -1,52 +0,0 @@
-###############################################################################
-#
-# CMake script for finding the GFlags library.
-#
-# https://gflags.github.io/gflags/
-#
-# Redistribution and use is allowed according to the terms of the 3-clause BSD
-# license.
-#
-# Input variables:
-#
-# - Gflags_FIND_REQUIRED: throws an error if gflags is not found but it is required
-#
-# Output variables:
-#
-# - Gflags_FOUND: Boolean that indicates if the package was found
-# - Gflags_LIBRARIES: Package libraries
-# - Gflags_INCLUDE_DIRS: Absolute path to package headers
-#
-# Example usage:
-#
-#   find_package(Gflags REQUIRED)
-#
-#   include_directories(
-#     ${Gflags_INCLUDE_DIRS}
-#   )
-#
-#   add_executable(main src/main.cpp)
-#   target_link_libraries(main
-#     ${Gflags_LIBRARIES}
-#   )
-###############################################################################
-
-
-find_path(Gflags_INCLUDE_PATH gflags/gflags.h)
-
-find_library(Gflags_LIBRARY NAMES gflags libgflags)
-
-if(Gflags_INCLUDE_PATH AND Gflags_LIBRARY)
-  set(Gflags_FOUND TRUE)
-endif(Gflags_INCLUDE_PATH AND Gflags_LIBRARY)
-
-if(Gflags_FOUND)
-  message(STATUS "Found gflags: ${Gflags_LIBRARY}")
-  # Output variables
-  set(Gflags_INCLUDE_DIRS ${Gflags_INCLUDE_DIR})
-  set(Gflags_LIBRARIES ${Gflags_LIBRARY})
-else(Gflags_FOUND)
-  if(Gflags_FIND_REQUIRED)
-    message(FATAL_ERROR "Could not find gflags library.")
-  endif(Gflags_FIND_REQUIRED)
-endif(Gflags_FOUND)


there is no such file

there is no such file

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

--- libstreams/ConfigureChecks.cmake
+++ libstreams/ConfigureChecks.cmake
@@ -120,7 +120,7 @@
   SET(strigi_extra_config_output ${libstreams_BINARY_DIR}/include/strigi/strigiconfig.h)

   CONFIGURE_FILE(
-    ${libstreams_SOURCE_DIR}/strigiconfig.h.win32.cmake
+    ${libstreams_SOURCE_DIR}/strigiconfig.h.cmake
     ${strigi_extra_config_output}
   )
 else(WIN32)


allow some build warnings thanks to Simmetrix

grumble.

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -90,7 +90,14 @@
   endif()
 endfunction(setup_repo)

-function(check_current_branch BRANCH_NAME CONFIG_OPTS ERRVAR)
+# NUM_ALLOWED_WARNINGS EXISTS BECAUSE SIMMETRIX, INC. REFUSE TO FIX
+# THEIR USE OF `tmpnam`, WHICH IS SO DANGEROUS (see here:
+#http://stackoverflow.com/questions/3299881/tmpnam-warning-saying-it-is-dangerous
+# ) THAT THE GNU LINKER EMITS AN UNSILENCEABLE WARNING ABOUT IT.
+# SCOREC CODE DOES NOT HAVE WARNINGS.
+
+function(check_current_branch BRANCH_NAME CONFIG_OPTS
+    NUM_ALLOWED_WARNINGS ERRVAR)
   file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}/${BRANCH_NAME}")

   ctest_configure(
@@ -109,7 +116,8 @@
       NUMBER_ERRORS NUM_BUILD_ERRORS
       NUMBER_WARNINGS NUM_BUILD_WARNINGS
       RETURN_VALUE BUILD_RET)
-  if(NUM_BUILD_WARNINGS OR NUM_BUILD_ERRORS OR BUILD_RET)
+  if((NUM_BUILD_WARNINGS GREATER NUM_ALLOWED_WARNINGS) OR
+      NUM_BUILD_ERRORS OR BUILD_RET)
     message(WARNING "
 ${BRANCH_NAME} build failed!
   ${NUM_BUILD_WARNINGS} warnings
@@ -129,7 +137,8 @@
   endif()

   if(CONFIG_RET OR
-     BUILD_RET OR NUM_BUILD_WARNINGS OR NUM_BUILD_ERRORS OR
+     (NUM_BUILD_WARNINGS GREATER NUM_ALLOWED_WARNINGS) OR
+     NUM_BUILD_ERRORS OR BUILD_RET OR
      TEST_RET)
     message(WARNING "some ${BRANCH_NAME} checks failed!")
     set(${ERRVAR} True PARENT_SCOPE)
@@ -151,7 +160,8 @@
   endif()
 endfunction(check_current_branch)

-function(check_tracking_branch BRANCH_NAME CONFIG_OPTS ERRVAR)
+function(check_tracking_branch BRANCH_NAME CONFIG_OPTS
+    NUM_ALLOWED_WARNINGS ERRVAR)
   checkout_branch("${BRANCH_NAME}")
   set_property(GLOBAL PROPERTY SubProject "${BRANCH_NAME}")
   set_property(GLOBAL PROPERTY Label "${BRANCH_NAME}")
@@ -161,14 +171,17 @@
     message(FATAL_ERROR "Could not update ${BRANCH_NAME} branch!")
   endif()
   message("Updated ${NUM_UPDATES} files")
-  check_current_branch(${BRANCH_NAME} "${CONFIG_OPTS}" ERRVAL2)
+  check_current_branch(${BRANCH_NAME} "${CONFIG_OPTS}"
+      ${NUM_ALLOWED_WARNINGS} ERRVAL2)
   set(${ERRVAR} ${ERRVAL2} PARENT_SCOPE)
 endfunction(check_tracking_branch)

-function(check_merge_branch BRANCH_NAME CONFIG_OPTS ERRVAR)
+function(check_merge_branch BRANCH_NAME CONFIG_OPTS
+    NUM_ALLOWED_WARNINGS ERRVAR)
   set_property(GLOBAL PROPERTY SubProject "${BRANCH_NAME}")
   set_property(GLOBAL PROPERTY Label "${BRANCH_NAME}")
-  check_current_branch(${BRANCH_NAME} "${CONFIG_OPTS}" ERRVAL2)
+  check_current_branch(${BRANCH_NAME} "${CONFIG_OPTS}"
+      ${NUM_ALLOWED_WARNINGS} ERRVAL2)
   set(${ERRVAR} ${ERRVAL2} PARENT_SCOPE)
 endfunction(check_merge_branch)

@@ -240,7 +253,8 @@
   cleanup_merge(${FIRST_NAME} ${SECOND_NAME})
 endfunction(abort_merge)

-function(try_merge FIRST_BASE REPO_SUFFIX SECOND_NAME CONFIG)
+function(try_merge FIRST_BASE REPO_SUFFIX SECOND_NAME CONFIG
+    NUM_ALLOWED_WARNINGS)
   set(FIRST_NAME ${FIRST_BASE}${REPO_SUFFIX})
   start_merge(${FIRST_BASE} "${REPO_SUFFIX}" ${SECOND_NAME} NEXT_ACTION)
   if("${NEXT_ACTION}" STREQUAL "CLEANUP")
@@ -251,7 +265,8 @@
     return()
   endif()
   set(NEW_NAME "${SECOND_NAME}-into-${FIRST_NAME}")
-  check_merge_branch("${NEW_NAME}" "${CONFIG}" CHECK_ERR)
+  check_merge_branch("${NEW_NAME}" "${CONFIG}"
+      ${NUM_ALLOWED_WARNINGS} CHECK_ERR)
   if(CHECK_ERR)
     abort_merge(${FIRST_NAME} ${SECOND_NAME})
     return()
@@ -292,13 +307,17 @@
   "-DSIM_MPI=mpich3.1.2"
 )

+SET(ALLOWED_WARNINGS 0)
+SET(ALLOWED_WARNINGS-sim 0)
+
 setup_repo()
 foreach(REPO_SUFFIX IN LISTS REPO_SUFFIXES)
   foreach(BRANCH_BASE IN LISTS BRANCH_BASES)
     check_tracking_branch("${BRANCH_BASE}${REPO_SUFFIX}"
-        "${CONFIGURE_OPTIONS${REPO_SUFFIX}}" CHECK_ERR)
+        "${CONFIGURE_OPTIONS${REPO_SUFFIX}}"
+        "${ALLOWED_WARNINGS${REPO_SUFFIX}" CHECK_ERR)
   endforeach()
 endforeach()
-try_merge(master "" develop "${CONFIGURE_OPTIONS}")
-try_merge(master "-sim" master "${CONFIGURE_OPTIONS-sim}")
-try_merge(master "-sim" develop-sim "${CONFIGURE_OPTIONS-sim}")
+try_merge(master "" develop "${CONFIGURE_OPTIONS}" ${ALLOWED_WARNINGS})
+try_merge(master "-sim" master "${CONFIGURE_OPTIONS-sim}" ${ALLOWED_WARNINGS-sim})
+try_merge(master "-sim" develop-sim "${CONFIGURE_OPTIONS-sim}" ${ALLOWED_WARNINGS-sim})


Add some documentation

Add some documentation

--- cmake-modules/omniidl.cmake
+++ cmake-modules/omniidl.cmake
@@ -1,3 +1,23 @@
+# Copyright (c) 2019, Joseph Mirabel
+# Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
+#
+# This file is part of hpp-core.
+# hpp-core is free software: you can redistribute it
+# and/or modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation, either version
+# 3 of the License, or (at your option) any later version.
+#
+# hpp-core is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Lesser Public License for more details.  You should have
+# received a copy of the GNU Lesser General Public License along with
+# hpp-core. If not, see <http://www.gnu.org/licenses/>.
+
+# Generate servant implementation of the IDL interface for the corresponding HPP class.
+#
+# Assumes the following has been called before:
+# ADD_REQUIRED_DEPENDENCY("hpp-corbaserver")
 MACRO(GENERATE_IDL_CPP_IMPL FILENAME DIRECTORY)
   SET(oneValueArgs HH_SUFFIX HPP_SUFFIX HXX_SUFFIX CC_SUFFIX)
   SET(multiValueArgs ARGUMENTS)


cleanup

cleanup

--- cmake/ArangoDBInstall.cmake
+++ cmake/ArangoDBInstall.cmake
@@ -136,7 +136,6 @@
 set(IS_SYSTEMD_INSTALL 0)
 set(SYSTEMD_UNIT_DIR "")
 if (UNIX)
-
   if (${USE_ENTERPRISE})
     set(SERVICE_NAME "arangodb3e")
   else ()
@@ -170,7 +169,6 @@
       DESTINATION ${SYSTEMD_UNIT_DIR}/
       RENAME ${SERVICE_NAME})

-    endif()
   endif()
 endif()
 ################################################################################


Updated

Updated

--- cmake/CMakeBuildFlags.cmake
+++ cmake/CMakeBuildFlags.cmake
@@ -1,4 +1,8 @@
 include(CheckCXXCompilerFlag)
+
+if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
+	SET(CMAKE_COMPILER_IS_WINDOWS 1)
+endif()

 if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
 	SET(CMAKE_COMPILER_IS_CLANG 1)


Set minimum required version of OpenSSL to 0.9.7

This is consistent with the requirements of python 2.7.3 to at least
python 3.5.1.

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -45,7 +45,7 @@
 endif()

 if(USE_SYSTEM_OpenSSL)
-    find_package(OpenSSL)
+    find_package(OpenSSL 0.9.7)
 endif()

 if(USE_SYSTEM_TCL)


loader: Fixed issue with Linux when ImageMagick-5 installed.

Last changes made ImageMagick-6 work, but broke ImageMagick-5.
The issue is that the _ARCH_INCLUDE directories are only present
for ImageMagick-6 and newer.  So, Cmake was attempting to use an
undefined variable.

--- cmake/FindImageMagick.cmake
+++ cmake/FindImageMagick.cmake
@@ -155,9 +155,11 @@
     LIST(APPEND ImageMagick_INCLUDE_DIRS
       ${ImageMagick_${component}_INCLUDE_DIR}
       )
-    LIST(APPEND ImageMagick_INCLUDE_DIRS
-      ${ImageMagick_${component}_ARCH_INCLUDE_DIR}
-      )
+    IF(EXISTS ${ImageMagick_${component}_ARCH_INCLUDE_DIR})
+      LIST(APPEND ImageMagick_INCLUDE_DIRS
+        ${ImageMagick_${component}_ARCH_INCLUDE_DIR}
+        )
+    ENDIF(EXISTS ${ImageMagick_${component}_ARCH_INCLUDE_DIR})
     LIST(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
     SET(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)


Use GNU install directories, and rpath

Use GNU install directories, and rpath

Use the GNU install directories, and ensure the install rpath is set to
match. Warning - the prefix directory will need to be removed as lib is
always found before any other location (with CMake 2.8.11.1 at least).

Change-Id: I03e8fcd4a18a20bf5f8723c971faa90b50d31dd9

--- cmake/InstallLocation.cmake
+++ cmake/InstallLocation.cmake
@@ -4,23 +4,29 @@
 #
 # These paths attempt to adhere to the FHS, and are similar to those provided
 # by autotools and used in many Linux distributions.
+#
+# Use GNU install directories
+include(GNUInstallDirs)
 if(NOT INSTALL_RUNTIME_DIR)
-  set(INSTALL_RUNTIME_DIR "bin")
+  set(INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}")
 endif()
 if(NOT INSTALL_LIBRARY_DIR)
-  set(INSTALL_LIBRARY_DIR "lib")
+  set(INSTALL_LIBRARY_DIR "${CMAKE_INSTALL_LIBDIR}")
 endif()
 if(NOT INSTALL_ARCHIVE_DIR)
-  set(INSTALL_ARCHIVE_DIR "lib")
+  set(INSTALL_ARCHIVE_DIR "${CMAKE_INSTALL_LIBDIR}")
 endif()
 if(NOT INSTALL_INCLUDE_DIR)
-  set(INSTALL_INCLUDE_DIR "include")
+  set(INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
 endif()
 if(NOT INSTALL_DATA_DIR)
-  set(INSTALL_DATA_DIR "share")
+  set(INSTALL_DATA_DIR "${CMAKE_INSTALL_DATAROOTDIR}")
 endif()
 if(NOT INSTALL_DOC_DIR)
-  set(INSTALL_DOC_DIR "${INSTALL_DATA_DIR}/doc")
+  set(INSTALL_DOC_DIR "${CMAKE_INSTALL_DOCDIR}")
+endif()
+if(NOT INSTALL_MAN_DIR)
+  set(INSTALL_MAN_DIR "${CMAKE_INSTALL_MANDIR}")
 endif()
 if(UNIX AND NOT APPLE)
   if(NOT INSTALL_XDG_APP_DIR)
@@ -33,6 +39,12 @@

 # Set up RPATH for the project too.
 option(ENABLE_RPATH "Enable rpath support on Linux and Mac" ON)
+if(NOT CMAKE_INSTALL_RPATH)
+  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
+endif()
+if(APPLE AND NOT CMAKE_INSTALL_NAME_DIR)
+  set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
+endif()
 if(UNIX AND ENABLE_RPATH)
   set(CMAKE_SKIP_BUILD_RPATH FALSE)
   set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)


Looks like the projects per target were needed to set C++11 mode.  There may be some way to make it work but since not having as many projects didn't seem to reduce the IDE clutter I'm fine just using a bunch of them.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -88,9 +88,6 @@
 endmacro(create_library)

 macro(create_executable target)
-  if (NOT "${PROJECT_NAME}" STREQUAL ${target})
-    project(${target})
-  endif ()
   create_target(${target} TRUE)
 endmacro(create_executable)

@@ -122,7 +119,7 @@
   if (NOT MSVC)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   endif ()
-
+  project(${project_name})
   if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${project_name}-config.cmake")
     set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR})
     set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)
@@ -286,8 +283,8 @@
         add_dependencies(${CURRENT_TARGET} ${library_name})
       endif ()

-#      list(APPEND "${CURRENT_TARGET}_dependencies" "${library_name}")
-#      set(${CURRENT_TARGET}_dependencies ${${CURRENT_TARGET}_dependencies} PARENT_SCOPE)
+      #      list(APPEND "${CURRENT_TARGET}_dependencies" "${library_name}")
+      #      set(${CURRENT_TARGET}_dependencies ${${CURRENT_TARGET}_dependencies} PARENT_SCOPE)
     endforeach ()

     list(APPEND "${CURRENT_TARGET}_dependencies" "${ARGN}")


Support for clang compiler packaging.

Support for clang compiler packaging.

--- cmake/PackageFilename.cmake
+++ cmake/PackageFilename.cmake
@@ -6,19 +6,19 @@
 ## This file is part of the CAMP library.
 ##
 ## The MIT License (MIT)
-##
+##
 ## Copyright (c) 2009-2014 TEGESO/TEGESOFT
-##
+##
 ## Permission is hereby granted, free of charge, to any person obtaining a copy
 ## of this software and associated documentation files (the "Software"), to deal
 ## in the Software without restriction, including without limitation the rights
 ## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 ## copies of the Software, and to permit persons to whom the Software is
 ## furnished to do so, subject to the following conditions:
-##
+##
 ## The above copyright notice and this permission notice shall be included in
 ## all copies or substantial portions of the Software.
-##
+##
 ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 ## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -66,6 +66,9 @@
         string(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" GCC_VERSION "${GCC_VERSION_OUTPUT}")
         set(PACKAGE_COMPILER_NAME ${PACKAGE_COMPILER_NAME}${GCC_VERSION})
     endif()
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+    # using regular Clang or AppleClang
+    set(PACKAGE_COMPILER_NAME "clang")
 elseif(MSVC_VERSION EQUAL 1400)
     set(PACKAGE_COMPILER_NAME "vc2005")
 elseif(MSVC_VERSION EQUAL 1500)


Teach LAPACK.cmake to find OpenBLAS

Teach LAPACK.cmake to find OpenBLAS

--- cmake/Packages/LAPACK.cmake
+++ cmake/Packages/LAPACK.cmake
@@ -12,7 +12,22 @@
 #   LAPACK_LDFLAGS                                                             #
 ################################################################################

-LIST (APPEND _blas_vendors "Goto" "ATLAS" "Apple" "Generic")
+LIST (APPEND _blas_vendors "OpenBLAS" "Goto" "ATLAS" "Apple" "Generic")
+
+# old CMake doesn't know that OpenBLAS is a BLAS
+IF (${CMAKE_VERSION} VERSION_LESS 3.6)
+  IF (NOT LAPACK_FOUND)
+    set(_vendor OpenBLAS)
+    FIND_PACKAGE(${_vendor} QUIET)
+    IF (OpenBLAS_FOUND)
+      SET (LAPACK_LIBRARIES "${${_vendor}_LIBRARIES}")
+      MESSAGE (STATUS "LAPACK found (${_vendor})")
+      MESSAGE (STATUS "  * libs:     ${${_vendor}_LIBRARIES}")
+      SET (LAPACK_FOUND TRUE)
+      SET (BLAS_FOUND TRUE)
+    ENDIF ()
+  ENDIF ()
+ENDIF ()

 IF (NOT LAPACK_FOUND)

@@ -20,7 +35,6 @@
     SET (BLA_VENDOR ${_vendor})
     FIND_PACKAGE (LAPACK QUIET)
     IF (LAPACK_FOUND)
-      SET (LAPACK_LDFLAGS "${LAPACK_LIBRARIES}")
       MESSAGE (STATUS "LAPACK found (${_vendor})")
       MESSAGE (STATUS "  * libs:     ${LAPACK_LIBRARIES}")
       BREAK ()


cmake: fix git describe command line

cmake: fix git describe command line

The "git describe" call for setting the boot banner is broken. The
--work-tree option sets the checked out work tree, not the directory
containing .git, which is where git describe needs to look for
information on tags.

Use -C instead so it's as if Git were run from the zephyr base
directory instead.

Signed-off-by: Marti Bolivar <fd5da480b758a78208111e6ae5c6806e1f887137@opensourcefoundries.com>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -251,8 +251,7 @@

 find_package(Git QUIET)
 if(GIT_FOUND)
-  execute_process(COMMAND ${GIT_EXECUTABLE} --work-tree=${ZEPHYR_BASE} describe
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  execute_process(COMMAND ${GIT_EXECUTABLE} -C ${ZEPHYR_BASE} describe
     OUTPUT_VARIABLE BUILD_VERSION
     OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif()


Update to newer version of MKLDNN with verbose debug output. Pull from github.com/intel/mkl-dnn instead of github.com/01org/mkl-dnn

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -19,8 +19,8 @@

 if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

-    set(MKLDNN_GIT_REPO_URL https://github.com/01org/mkl-dnn)
-    set(MKLDNN_GIT_TAG "144e0db")
+    set(MKLDNN_GIT_REPO_URL https://github.com/intel/mkl-dnn)
+    set(MKLDNN_GIT_TAG "3e1f8f5")
     set(MKLDNN_INSTALL_DIR ${EXTERNAL_INSTALL_DIR}/mkldnn)

     # The 'BUILD_BYPRODUCTS' argument was introduced in CMake 3.2.


Fixed options

Fixed options

--- cmake/megamol_options.cmake
+++ cmake/megamol_options.cmake
@@ -69,8 +69,8 @@
   find_package(OpenMP)
 endif()
 if(OPENMP_FOUND OR WIN32)
-  list(APPEND CMAKE_C_FLAGS ${OpenMP_C_FLAGS})
-  list(APPEND CMAKE_CXX_FLAGS ${OpenMP_CXX_FLAGS})
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
 endif()

 # OpenGL


[cmake] Add a simple function to dump all variables.

This is useful when debugging CMake problems.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1187,6 +1187,13 @@
   endif()
 endfunction()

+function(dump_all_cmake_variables)
+  get_cmake_property(_variableNames VARIABLES)
+  foreach (_variableName ${_variableNames})
+    message(STATUS "${_variableName}=${${_variableName}}")
+  endforeach()
+endfunction()
+
 function(get_llvm_lit_path base_dir file_name)
   cmake_parse_arguments(ARG "ALLOW_EXTERNAL" "" "" ${ARGN})


cmake: linking against static MKL is not supported -> error+msg

print error message and hint to set `CRAYPE_LINK_TYPE=dynamic` if one attempts to link
against static MKL.

--- cmake/modules/FindMKL.cmake
+++ cmake/modules/FindMKL.cmake
@@ -37,6 +37,10 @@
 if (MKL_INCLUDE_DIRS AND MKL_LIBRARIES AND MKL_INTERFACE_LIBRARY AND
     MKL_SEQUENTIAL_LAYER_LIBRARY AND MKL_CORE_LIBRARY)
   set (MKL_FIND_QUIETLY TRUE)
+endif()
+
+if(CMAKE_FIND_LIBRARY_SUFFIXES STREQUAL ".a")
+  message(FATAL_ERROR "Attempting to find static MKL libraries. SIRIUS supports only shared linking against MKL. NOTE: On Cray systems you must set `CRAYPE_LINK_TYPE=dynamic`.")
 endif()

 if(NOT USE_MKL_SHARED_LIBS)