add TIMEOUT argument to ament_cmake_clang_tidy (#298)

Signed-off-by: Miaofei <6e53936583871c0279484d43aabec0ca10b65647@amazon.com>

--- ament_cmake_clang_tidy/cmake/ament_clang_tidy.cmake
+++ ament_cmake_clang_tidy/cmake/ament_clang_tidy.cmake
@@ -25,16 +25,17 @@
 #
 # :param TESTNAME: the name of the test, default: "clang_tidy"
 # :type TESTNAME: string
-# :param CONFIG_FILE: the path of the configuration file
-#                     for clang-tidy to consider
+# :param CONFIG_FILE: the path of the configuration file for clang-tidy to consider
 # :type CONFIG_FILE: string
 # :param ARGN: the files or directories to check
 # :type ARGN: list of strings
+# :param TIMEOUT: the test timeout in seconds, default: 300
+# :type TIMEOUT: integer
 #
 # @public
 #
 function(ament_clang_tidy)
-  cmake_parse_arguments(ARG "" "TESTNAME;CONFIG_FILE" "" ${ARGN})
+  cmake_parse_arguments(ARG "" "TESTNAME;CONFIG_FILE;TIMEOUT" "" ${ARGN})
   if(NOT ARG_TESTNAME)
     set(ARG_TESTNAME "clang_tidy")
   endif()
@@ -54,6 +55,10 @@
     list(APPEND cmd "--config" "${ament_cmake_clang_tidy_CONFIG_FILE}")
   endif()

+  if(NOT ARG_TIMEOUT)
+    set(ARG_TIMEOUT 300)
+  endif()
+
   file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/ament_clang_tidy")
   ament_add_test(
     "${ARG_TESTNAME}"
@@ -61,6 +66,7 @@
     OUTPUT_FILE "${CMAKE_BINARY_DIR}/ament_clang_tidy/${ARG_TESTNAME}.txt"
     RESULT_FILE "${result_file}"
     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+    TIMEOUT "${ARG_TIMEOUT}"
   )
   set_tests_properties(
     "${ARG_TESTNAME}"


Disable builtin FTGL with minimal=ON

Disable builtin FTGL with minimal=ON

FTGL is only needed when building ROOT with support for
OpenGL, which is not the case when -Dminimal=ON is used.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -309,7 +309,7 @@

 #---Apply minimal or gminimal------------------------------------------------------------------
 foreach(opt ${root_build_options})
-  if(NOT opt MATCHES "thread|cling|builtin_llvm|builtin_clang|builtin_ftgl|shared|explicitlink")
+  if(NOT opt MATCHES "thread|cling|builtin_llvm|builtin_clang|shared|explicitlink")
     if(minimal)
       set(${opt}_defvalue OFF)
     elseif(gminimal AND NOT opt MATCHES "x11|cocoa")


Fix protobuf hash

Fix protobuf hash

--- cmake/projects/Protobuf/hunter.cmake
+++ cmake/projects/Protobuf/hunter.cmake
@@ -14,7 +14,7 @@
     URL
     "https://github.com/hunter-packages/protobuf/archive/v3.0.0-hunter-3.tar.gz"
     SHA1
-    e3d5ab642e0295d16b86a4a55e06c3ee026ff249
+    242443553ca20ab279427330e175a3c33ecbf265
 )

 hunter_add_version(
@@ -25,7 +25,7 @@
     URL
     "https://github.com/hunter-packages/protobuf/archive/v3.0.0-hunter-2.tar.gz"
     SHA1
-    6fb368b171aa10f612d777f079d6896f37b85c55
+    d1fa1592e05ab6ff3e4dbbcd9dfd9768a26ba94a
 )

 hunter_add_version(
@@ -36,7 +36,7 @@
     URL
     "https://github.com/hunter-packages/protobuf/archive/v3.0.0-beta-2-hunter-1.tar.gz"
     SHA1
-    15752454ef0cf119b58136e2f4ffe97baeaf07cd
+    d43d0d6bbfd3b65539ca467e2bcb0f7eeeb6a9d9
 )

 hunter_add_version(
@@ -47,7 +47,7 @@
     URL
     "https://github.com/hunter-packages/protobuf/archive/v3.0.0-beta-2-hunter-2.tar.gz"
     SHA1
-    dbae4995254f351918d0462b308b561dbab71b3f
+    f91766a391284b7ccd192fa36bc3f09449b3c202
 )

 if(ANDROID OR IOS)


Added creation of interchange working directory

Signed-off-by: Maciej Kurc <572803cc6e8d7bb35033942e4b03254951a2e0d6@antmicro.com>

--- xc/common/cmake/vivado.cmake
+++ xc/common/cmake/vivado.cmake
@@ -602,6 +602,7 @@

   add_custom_command(
       OUTPUT ${WORK_DIR}/${NAME}.dcp
+      COMMAND ${CMAKE_COMMAND} -E make_directory ${WORK_DIR}
       COMMAND ${CMAKE_COMMAND} -E env
         JAVA=${JAVA}
         RAPIDWRIGHT_PATH=${RAPIDWRIGHT_PATH}
@@ -634,6 +635,7 @@

   add_custom_command(
     OUTPUT ${WORK_DIR}/${NAME}_runme.tcl
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORK_DIR}
     COMMAND ${CMAKE_COMMAND} -E echo "open_checkpoint ${NAME}.dcp"                                     >  ${RUNME}
     COMMAND ${CMAKE_COMMAND} -E echo "${XDC_EXTRA_ARGS}"                                               >> ${RUNME}
     COMMAND ${CMAKE_COMMAND} -E echo "set_property CFGBVS VCCO [current_design]"                       >> ${RUNME}


Fix #923 - support CMAKE_CROSSCOMPILING_EMULATOR for tests

Replaced legacy syntax of cmake add_test() with more modern syntax.
This allows running gtests's own tests on remote (cross) systems
using CMAKE_CROSSCOMPILING_EMULATOR with cmake-3.3 or newer.

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -216,7 +216,7 @@
 # from the given source files with the given compiler flags.
 function(cxx_test_with_flags name cxx_flags libs)
   cxx_executable_with_flags(${name} "${cxx_flags}" "${libs}" ${ARGN})
-  add_test(${name} ${name})
+  add_test(NAME ${name} COMMAND ${name})
 endfunction()

 # cxx_test(name libs srcs...)


Bump TubeTK to bring fix for the Tube Visibility toggle

See Issue #87

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


tpu contrib fix

tpu contrib fix

--- tensorflow/contrib/cmake/tf_core_framework.cmake
+++ tensorflow/contrib/cmake/tf_core_framework.cmake
@@ -126,7 +126,9 @@
 file(GLOB_RECURSE tf_protos_cc_srcs RELATIVE ${tensorflow_source_dir}
     "${tensorflow_source_dir}/tensorflow/core/*.proto"
     "${tensorflow_source_dir}/tensorflow/contrib/boosted_trees/proto/*.proto"
-)
+    "${tensorflow_source_dir}/tensorflow/contrib/tpu/proto/*.proto"
+)
+
 RELATIVE_PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS
     ${tensorflow_source_dir} ${tf_protos_cc_srcs}
 )


Minorst: Fix commented out debug output format.

--- add_dependencies.cmake
+++ add_dependencies.cmake
@@ -98,8 +98,8 @@

 if(UNIX)
   if (${CUDA_VERSION} VERSION_GREATER "6")
-    #message(status "Cuda version > 6 found: ${CUDA_VERSION}")
-    #message(status "CudaRT libraries ${CUDA_CUDART_LIBRARY} dir:${CUDA_TOOLKIT_ROOT_DIR}")
+    #message(STATUS "Cuda version > 6 found: ${CUDA_VERSION}")
+    #message(STATUS "CudaRT libraries ${CUDA_CUDART_LIBRARY} dir:${CUDA_TOOLKIT_ROOT_DIR}")
     find_library(CUDA_CUDARTDEV_LIBRARY cudadevrt PATHS ${CUDA_TOOLKIT_ROOT_DIR} PATH_SUFFIXES lib64 lib NO_DEFAULT_PATH)
   else()
     set(CUDA_CUDARTDEV_LIBRARY)


fix patch

fix patch

--- CMakeExternals/PatchVTK.cmake
+++ CMakeExternals/PatchVTK.cmake
@@ -1,3 +1,5 @@
 set(path "Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx")
 file(STRINGS ${path} contents NEWLINE_CONSUME)
 string(REPLACE "//#define GLX_GLXEXT_LEGACY" "#define GLX_GLXEXT_LEGACY" contents ${contents})
+set(CONTENTS ${contents})
+configure_file(${TEMPLATE_FILE} ${path} @ONLY)


Make AVX instruction set opt-out Resolves ddiakopoulos/libnyquist#52

--- cmake/CXXhelpers.cmake
+++ cmake/CXXhelpers.cmake
@@ -15,7 +15,9 @@

 function(_set_compile_options proj)
     if(MSVC)
-        target_compile_options(${proj} PRIVATE /arch:AVX /Zi )
+		option(LIBNYQUIST_ENABLE_AVX "Enable the use of the AVX instruction set (MSVC only)" ON)
+
+        target_compile_options(${proj} PRIVATE $<$<BOOL:${LIBNYQUIST_ENABLE_AVX}>:/arch:AVX>  /Zi )
     endif()
 endfunction()


fixed dsound linking to the wrong arch

fixed dsound linking to the wrong arch

--- cmake/FindDSound.cmake
+++ cmake/FindDSound.cmake
@@ -8,17 +8,33 @@
 #   DSOUND_LIBRARY     - the dsound library
 #

+if( ${CMAKE_CL_64} )
+    SET (DIRECTX_ARCH "x64")
+else()
+    SET (DIRECTX_ARCH "x86")
+endif()
+
 find_path(DSOUND_INCLUDE_DIR
-          NAMES dsound.h D3D10.h
-          PATHS "${DXSDK_DIR}"
+          NAMES dsound.h
+          PATHS
+          "${DXSDK_DIR}"
+          "$ENV{DXSDK_DIR}"
+          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK"
+          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)"
+          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)"
           PATH_SUFFIXES include
           DOC "The DirectSound include directory"
 )

 find_library(DSOUND_LIBRARY
              NAMES dsound
-             PATHS "${DXSDK_DIR}"
-             PATH_SUFFIXES lib lib/x86 lib/x64
+             PATHS
+             "${DXSDK_DIR}"
+             "$ENV{DXSDK_DIR}"
+             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK"
+             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)"
+             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)"
+             PATH_SUFFIXES lib/${DIRECTX_ARCH}
              DOC "The DirectSound library"
 )


use system variable instead of custom one

--- cmake/FindEigen2.cmake
+++ cmake/FindEigen2.cmake
@@ -1,4 +1,9 @@
 # - Try to find Eigen2 lib
+#
+# This module supports requiring a minimum version, e.g. you can do
+#   find_package(Eigen2 2.0.3)
+# to require version 2.0.3 to newer of Eigen2.
+#
 # Once done this will define
 #
 #  EIGEN2_FOUND - system has eigen lib with correct version
@@ -9,7 +14,7 @@
 # Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
 # Redistribution and use is allowed according to the terms of the BSD license.

-if(NOT EIGEN2_MIN_VERSION)
+if(NOT Eigen2_FIND_VERSION)
   if(NOT Eigen2_FIND_VERSION_MAJOR)
     set(Eigen2_FIND_VERSION_MAJOR 2)
   endif(NOT Eigen2_FIND_VERSION_MAJOR)
@@ -20,8 +25,8 @@
     set(Eigen2_FIND_VERSION_PATCH 0)
   endif(NOT Eigen2_FIND_VERSION_PATCH)

-  set(EIGEN2_MIN_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
-endif(NOT EIGEN2_MIN_VERSION)
+  set(Eigen2_FIND_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
+endif(NOT Eigen2_FIND_VERSION)

 macro(_eigen2_check_version)
   file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000)
@@ -34,16 +39,16 @@
   set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")

   set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
-  if(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+  if(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})
     set(EIGEN2_VERSION_OK FALSE)
-  else(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+  else(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})
     set(EIGEN2_VERSION_OK TRUE)
-  endif(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+  endif(${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION})

   if(NOT EIGEN2_VERSION_OK)

     message(STATUS "Eigen2 version ${EIGEN2_VERSION} found in ${EIGEN2_INCLUDE_DIR}, "
-                   "but at least version ${EIGEN2_MIN_VERSION} is required")
+                   "but at least version ${Eigen2_FIND_VERSION} is required")
   endif(NOT EIGEN2_VERSION_OK)
 endmacro(_eigen2_check_version)


cmake/Findlua534.cmake

--- cmake/Findlua534.cmake
+++ cmake/Findlua534.cmake
@@ -1,287 +0,0 @@
-# Module for locating lua534, based on ICU module.
-#
-# Cutomizable variables:
-#   LUA534_ROOT_DIR
-#     This variable points to the lua534 root directory. On Windows the
-#     library location typically will have to be provided explicitly using the
-#     -D command-line option. Alternatively, an environment variable can be set.
-#
-# Read-Only variables:
-#   LUA534_FOUND
-#     Indicates whether the library has been found.
-#
-#   LUA534_INCLUDE_DIRS
-#     Points to the lua534 include directory.
-#
-#   LUA534_LIBRARIES
-#     Points to the lua534 libraries that should be passed to
-#     target_link_libraries in dynamic mode.
-#
-#   LUA534_STATIC_LIBRARIES
-#     Points to the lua534 libraries static that should be passed to
-#     target_link_libraries in static mode.
-#
-#   LUA534_LINK_FLAGS
-#     Linker flags when building linking against lua534. Defaults to "liblua534". Take care, this is a list.
-#
-#   LUA534_STATIC_LINK_FLAGS
-#     Linker flags when building linking against static lua534. Defaults to "liblua534_static". Take care, this is a list.
-#
-#   LUA534_LDFLAGS
-#     Stringified version of LUA534_LINK_FLAGS
-#
-#   LUA534_STATIC_LDFLAGS
-#     Stringified version of LUA534_STATIC_LINK_FLAGS
-#
-INCLUDE (CMakeParseArguments)
-INCLUDE (FindPackageHandleStandardArgs)
-
-SET (_PF86 "ProgramFiles(x86)")
-SET (_LUA534_POSSIBLE_DIRS
-  ${LUA534_ROOT_DIR}
-  "$ENV{LUA534_ROOT_DIR}"
-  "C:/lua534"
-  "$ENV{PROGRAMFILES}/lua534"
-  "$ENV{${_PF86}}/lua534")
-
-SET (_LUA534_POSSIBLE_INCLUDE_SUFFIXES include)
-
-IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
-  SET (_LUA534_POSSIBLE_LIB_SUFFIXES lib64)
-  SET (_LUA534_POSSIBLE_BIN_SUFFIXES bin64)
-
-  IF (NOT WIN32)
-    LIST (APPEND _LUA534_POSSIBLE_LIB_SUFFIXES lib)
-    LIST (APPEND _LUA534_POSSIBLE_BIN_SUFFIXES bin)
-  ENDIF (NOT WIN32)
-ELSE (CMAKE_SIZEOF_VOID_P EQUAL 8)
-  SET (_LUA534_POSSIBLE_LIB_SUFFIXES lib)
-  SET (_LUA534_POSSIBLE_BIN_SUFFIXES bin)
-ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 8)
-
-FIND_PATH (LUA534_ROOT_DIR
-  NAMES include/lua534.h
-  PATHS ${_LUA534_POSSIBLE_DIRS}
-  DOC "lua534 root directory")
-
-IF (LUA534_ROOT_DIR)
-  # Re-use the previous path:
-  FIND_PATH (LUA534_INCLUDE_DIR
-    NAMES lua534.h
-    PATHS ${LUA534_ROOT_DIR}
-    PATH_SUFFIXES ${_LUA534_POSSIBLE_INCLUDE_SUFFIXES}
-    DOC "lua534 include directory"
-    # NO_DEFAULT_PATH
-    )
-ELSE (LUA534_ROOT_DIR)
-  # Use default path search
-  FIND_PATH (LUA534_INCLUDE_DIR
-    NAMES lua534.h
-    DOC "lua534 include directory"
-    )
-ENDIF (LUA534_ROOT_DIR)
-
-IF (NOT LUA534_FIND_COMPONENTS)
-  SET (LUA534_FIND_COMPONENTS lua534)
-ENDIF (NOT LUA534_FIND_COMPONENTS)
-
-IF (LUA534_INCLUDE_DIR)
-  # Loop over each components
-  FOREACH (_LUA534_COMPONENT ${LUA534_FIND_COMPONENTS})
-    SET (_LUA534_COMPONENT_BASE ${_LUA534_COMPONENT})
-    SET (_LUA534_COMPONENT_POSSIBLE_DEBUG_NAMES ${_LUA534_COMPONENT_BASE}d)
-    SET (_LUA534_COMPONENT_POSSIBLE_RELEASE_NAMES ${_LUA534_COMPONENT_BASE})
-
-    SET (_LUA534_STATIC_COMPONENT_BASE "${_LUA534_COMPONENT}_static")
-    SET (_LUA534_STATIC_COMPONENT_POSSIBLE_DEBUG_NAMES ${_LUA534_STATIC_COMPONENT_BASE}d)
-    SET (_LUA534_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES ${_LUA534_STATIC_COMPONENT_BASE})
-
-    STRING (TOUPPER ${_LUA534_COMPONENT} _LUA534_COMPONENT_UPPER)
-    SET (_LUA534_LIBRARY_BASE LUA534_${_LUA534_COMPONENT_UPPER}_LIBRARY)
-    SET (_LUA534_STATIC_LIBRARY_BASE LUA534_STATIC_${_LUA534_COMPONENT_UPPER}_LIBRARY)
-
-    IF (LUA534_ROOT_DIR)
-      FIND_LIBRARY (${_LUA534_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUA534_COMPONENT_POSSIBLE_DEBUG_NAMES}
-	PATHS ${LUA534_ROOT_DIR} PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	# NO_DEFAULT_PATH
-	)
-      FIND_LIBRARY (${_LUA534_STATIC_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUA534_STATIC_COMPONENT_POSSIBLE_DEBUG_NAMES}
-	PATHS ${LUA534_ROOT_DIR} PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	# NO_DEFAULT_PATH
-	)
-    ELSE (LUA534_ROOT_DIR)
-      FIND_LIBRARY (${_LUA534_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUA534_COMPONENT_POSSIBLE_DEBUG_NAMES}
-	PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	)
-      FIND_LIBRARY (${_LUA534_STATIC_LIBRARY_BASE}_DEBUG
-	NAMES ${_LUA534_COMPONENT_STATIC_POSSIBLE_DEBUG_NAMES}
-	PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	)
-    ENDIF (LUA534_ROOT_DIR)
-
-    IF (LUA534_ROOT_DIR)
-      FIND_LIBRARY (${_LUA534_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUA534_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATHS ${LUA534_ROOT_DIR} PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	# NO_DEFAULT_PATH
-	)
-      FIND_LIBRARY (${_LUA534_STATIC_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUA534_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATHS ${LUA534_ROOT_DIR} PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	# NO_DEFAULT_PATH
-	)
-    ELSE (ICU_ROOT_DIR)
-      FIND_LIBRARY (${_LUA534_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUA534_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	)
-      FIND_LIBRARY (${_LUA534_STATIC_LIBRARY_BASE}_RELEASE
-	NAMES ${_LUA534_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
-	PATH_SUFFIXES ${_LUA534_POSSIBLE_LIB_SUFFIXES}
-	)
-    ENDIF (LUA534_ROOT_DIR)
-
-    SET (LUA534_${_LUA534_COMPONENT_UPPER}_FOUND TRUE)
-
-    # Debug and release
-    IF (${_LUA534_LIBRARY_BASE}_DEBUG AND ${_LUA534_LIBRARY_BASE}_RELEASE)
-      SET (${_LUA534_LIBRARY_BASE}
-        debug ${${_LUA534_LIBRARY_BASE}_DEBUG}
-        optimized ${${_LUA534_LIBRARY_BASE}_RELEASE})
-      # Debug only
-    ELSEIF (${_LUA534_LIBRARY_BASE}_DEBUG)
-      SET (${_LUA534_LIBRARY_BASE} ${${_LUA534_LIBRARY_BASE}_DEBUG})
-      # Release only
-    ELSEIF (${_LUA534_LIBRARY_BASE}_RELEASE)
-      SET (${_LUA534_LIBRARY_BASE} ${${_LUA534_LIBRARY_BASE}_RELEASE})
-    ELSE (${_LUA534_LIBRARY_BASE}_DEBUG AND ${_LUA534_LIBRARY_BASE}_RELEASE)
-      # Component missing: record it for a later report
-      LIST (APPEND _LUA534_MISSING_COMPONENTS ${_LUA534_COMPONENT})
-      SET (LUA534_${__COMPONENT_UPPER}_FOUND FALSE)
-    ENDIF (${_LUA534_LIBRARY_BASE}_DEBUG AND ${_LUA534_LIBRARY_BASE}_RELEASE)
-
-    IF (${_LUA534_STATIC_LIBRARY_BASE}_DEBUG AND ${_LUA534_STATIC_LIBRARY_BASE}_RELEASE)
-      SET (${_LUA534_STATIC_LIBRARY_BASE}
-        debug ${${_LUA534_STATIC_LIBRARY_BASE}_DEBUG}
-        optimized ${${_LUA534_STATIC_LIBRARY_BASE}_RELEASE})
-      # Debug only
-    ELSEIF (${_LUA534_STATIC_LIBRARY_BASE}_DEBUG)
-      SET (${_LUA534_STATIC_LIBRARY_BASE} ${${_LUA534_STATIC_LIBRARY_BASE}_DEBUG})
-      # Release only
-    ELSEIF (${_LUA534_STATIC_LIBRARY_BASE}_RELEASE)
-      SET (${_LUA534_STATIC_LIBRARY_BASE} ${${_LUA534_STATIC_LIBRARY_BASE}_RELEASE})
-    ELSE (${_LUA534_STATIC_LIBRARY_BASE}_DEBUG AND ${_LUA534_STATIC_LIBRARY_BASE}_RELEASE)
-      # Component missing: record it for a later report
-      LIST (APPEND _LUA534_STATIC_MISSING_COMPONENTS ${_LUA534_COMPONENT})
-      SET (LUA534_STATIC_${__COMPONENT_UPPER}_FOUND FALSE)
-    ENDIF (${_LUA534_STATIC_LIBRARY_BASE}_DEBUG AND ${_LUA534_STATIC_LIBRARY_BASE}_RELEASE)
-
-    MARK_AS_ADVANCED (${_LUA534_LIBRARY_BASE}_DEBUG ${_LUA534_LIBRARY_BASE}_RELEASE)
-    MARK_AS_ADVANCED (${_LUA534_STATIC_LIBRARY_BASE}_DEBUG ${_LUA534_STATIC_LIBRARY_BASE}_RELEASE)
-
-    # Make sure only libraries that have been actually found are registered
-    IF (${_LUA534_LIBRARY_BASE})
-      LIST (APPEND _LUA534_LIBRARIES ${${_LUA534_LIBRARY_BASE}})
-    ENDIF (${_LUA534_LIBRARY_BASE})
-
-    IF (${_LUA534_STATIC_LIBRARY_BASE})
-      LIST (APPEND _LUA534_STATIC_LIBRARIES ${${_LUA534_STATIC_LIBRARY_BASE}})
-    ENDIF (${_LUA534_STATIC_LIBRARY_BASE})
-
-  ENDFOREACH (_LUA534_COMPONENT)
-
-  IF (NOT DEFINED _LUA534_MISSING_COMPONENTS AND NOT DEFINED _LUA534_STATIC_MISSING_COMPONENTS)
-    # Success: all components were found
-    SET (LUA534_INCLUDE_DIRS "${LUA534_INCLUDE_DIR}")
-    SET (LUA534_LIBRARIES ${_LUA534_LIBRARIES})
-    SET (LUA534_STATIC_LIBRARIES ${_LUA534_STATIC_LIBRARIES} ${CMAKE_DL_LIBS})
-  ELSE ()
-    MESSAGE (STATUS "Several LUA534 components were not found:")
-
-    # Display missing components indented, each on a separate line
-    FOREACH (_LUA534_MISSING_COMPONENT ${_LUA534_MISSING_COMPONENTS})
-      MESSAGE (STATUS "  " ${_LUA534_MISSING_COMPONENT})
-    ENDFOREACH ()
-    FOREACH (_LUA534_STATIC_MISSING_COMPONENT ${_LUA534_STATIC_MISSING_COMPONENTS})
-      MESSAGE (STATUS "  " ${_LUA534_STATIC_MISSING_COMPONENT})
-    ENDFOREACH ()
-  ENDIF ()
-
-  #
-  # Simulate hopefully correct flags based on heuristic discovery
-  #
-  IF (NOT _LUA534_C_FLAGS_SHARED)
-    SET (_LUA534_C_FLAGS_SHARED "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
-  ENDIF ()
-
-  IF (NOT _LUA534_CXX_FLAGS_SHARED)
-    SET (_LUA534_CXX_FLAGS_SHARED "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
-  ENDIF ()
-
-  IF (NOT _LUA534_LINK_FLAGS)
-    SET (_LUA534_LINK_FLAGS ${LUA534_LIBRARIES})
-  ENDIF ()
-
-  IF (NOT _LUA534_STATIC_LINK_FLAGS)
-    SET (_LUA534_STATIC_LINK_FLAGS ${LUA534_STATIC_LIBRARIES})
-  ENDIF ()
-
-ENDIF (LUA534_INCLUDE_DIR)
-
-SET (_LUA534_LDFLAGS " ")
-FOREACH (_lua534_link_flag ${_LUA534_LINK_FLAGS})
-  SET (_LUA534_LDFLAGS "${_LUA534_LDFLAGS} ${_lua534_link_flag}")
-ENDFOREACH ()
-
-SET (_LUA534_STATIC_LDFLAGS " ")
-FOREACH (_lua534_static_link_flag ${_LUA534_STATIC_LINK_FLAGS})
-  SET (_LUA534_STATIC_LDFLAGS "${_LUA534_STATIC_LDFLAGS} ${_lua534_static_link_flag}")
-ENDFOREACH ()
-
-MARK_AS_ADVANCED (LUA534_ROOT_DIR LUA534_INCLUDE_DIR)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS (LUA534
-  REQUIRED_VARS
-  LUA534_INCLUDE_DIR
-  LUA534_LIBRARIES)
-
-IF (_LUA534_LINK_FLAGS AND _LUA534_STATIC_LINK_FLAGS)
-  SET (LUA534_FOUND 1 CACHE STRING "LUA534 is found")
-ENDIF ()
-
-SET (LUA534_C_FLAGS_SHARED    "${_LUA534_C_FLAGS_SHARED}"    CACHE STRING "C flags when compiling against shared LUA534")
-SET (LUA534_CXX_FLAGS_SHARED  "${_LUA534_CXX_FLAGS_SHARED}"  CACHE STRING "C flags when compiling against shared LUA534")
-SET (LUA534_LINK_FLAGS        "${_LUA534_LINK_FLAGS}"        CACHE STRING "Linker flags when linking against LUA534")
-SET (LUA534_LDFLAGS           "${_LUA534_LDFLAGS}"           CACHE STRING "Stringified version of LUA534_LINK_FLAGS")
-SET (LUA534_STATIC_LINK_FLAGS "${_LUA534_STATIC_LINK_FLAGS}" CACHE STRING "Linker flags when linking against static LUA534")
-SET (LUA534_STATIC_LDFLAGS    "${_LUA534_STATIC_LDFLAGS}"    CACHE STRING "Stringified version of LUA534_STATIC_LINK_FLAGS")
-
-IF(LUA534_FOUND)
-  MESSAGE(STATUS "-----------------------------------------")
-  MESSAGE(STATUS "Setup LUA534:")
-  MESSAGE(STATUS "")
-  MESSAGE(STATUS "           ROOT_DIR: ${LUA534_ROOT_DIR}")
-  MESSAGE(STATUS "     C_FLAGS_SHARED: ${LUA534_C_FLAGS_SHARED}")
-  MESSAGE(STATUS "   CXX_FLAGS_SHARED: ${LUA534_CXX_FLAGS_SHARED}")
-  MESSAGE(STATUS "        INCLUDE_DIR: ${LUA534_INCLUDE_DIR}")
-  MESSAGE(STATUS "          LIBRARIES: ${LUA534_LIBRARIES}")
-  MESSAGE(STATUS "   STATIC LIBRARIES: ${LUA534_STATIC_LIBRARIES}")
-  MESSAGE(STATUS "         LINK_FLAGS: ${LUA534_LINK_FLAGS}")
-  MESSAGE(STATUS "  STATIC LINK_FLAGS: ${LUA534_STATIC_LINK_FLAGS}")
-  MESSAGE(STATUS "            LDFLAGS: ${LUA534_LDFLAGS}")
-  MESSAGE(STATUS "     STATIC LDFLAGS: ${LUA534_STATIC_LDFLAGS}")
-  MESSAGE(STATUS "-----------------------------------------")
-ENDIF()
-
-MARK_AS_ADVANCED (
-  LUA534_FOUND
-  LUA534_C_FLAGS_SHARED
-  LUA534_CXX_FLAGS_SHARED
-  LUA534_LINK_FLAGS
-  LUA534_LDFLAGS
-  LUA534_STATIC_LINK_FLAGS
-  LUA534_STATIC_LDFLAGS
-  )


cmake: host-tools fixes for DTC

cmake: host-tools fixes for DTC

1. Fix the regular expression used to parse version numbers. This uses
\. and . to parse literal dots; the second one matches any character.
Just use [.] instead in both cases.

2. Don't error out if the installed dtc is too old. It's optional, so
we should just proceed without it. Print a warning instead, and make
it so dts.cmake won't do anything with the installed dtc.

Signed-off-by: Martí Bolívar <9d90ac4c7bf6a305f6bfd81a23c7859bc883380e@nordicsemi.no>

--- cmake/host-tools.cmake
+++ cmake/host-tools.cmake
@@ -53,23 +53,26 @@
   )

 if(DTC)
-# Parse the 'dtc --version' and make sure it is at least MIN_DTC_VERSION
-set(MIN_DTC_VERSION 1.4.6)
-execute_process(
-  COMMAND
-  ${DTC} --version
-  OUTPUT_VARIABLE dtc_version_output
-  )
-string(REGEX MATCH "Version: DTC ([0-9]+\.[0-9]+.[0-9]+).*" out_var ${dtc_version_output})
-if(${CMAKE_MATCH_1} VERSION_LESS ${MIN_DTC_VERSION})
-  assert(0 "The detected dtc version is unsupported.                                 \n\
-    The version was found to be ${CMAKE_MATCH_1}                                   \n\
-    But the minimum supported version is ${MIN_DTC_VERSION}                        \n\
-    See https://docs.zephyrproject.org/latest/getting_started/                     \n\
-    for how to use the SDK's dtc alongside a custom toolchain."
-  )
+  # Parse the 'dtc --version' output to find the installed version.
+  set(MIN_DTC_VERSION 1.4.6)
+  execute_process(
+    COMMAND
+    ${DTC} --version
+    OUTPUT_VARIABLE dtc_version_output
+    )
+  string(REGEX MATCH "Version: DTC ([0-9]+[.][0-9]+[.][0-9]+).*" out_var ${dtc_version_output})
+
+  # Since it is optional, an outdated version is not an error. If an
+  # outdated version is discovered, print a warning and proceed as if
+  # DTC were not installed.
+  if(${CMAKE_MATCH_1} VERSION_GREATER ${MIN_DTC_VERSION})
+    message(STATUS "Found dtc: ${DTC} (found suitable version \"${CMAKE_MATCH_1}\", minimum required is \"${MIN_DTC_VERSION}\")")
+  else()
+    message(WARNING
+      "Could NOT find dtc: Found unsuitable version \"${CMAKE_MATCH_1}\", but required is at least \"${MIN_DTC_VERSION}\" (found ${DTC}). Optional devicetree error checking with dtc will not be performed.")
+    set(DTC DTC-NOTFOUND)
+  endif()
 endif()
-endif(DTC)

 # gperf is an optional dependency
 find_program(


don't version the include/ installation

don't version the include/ installation

--- cmake/pdal_utils.cmake
+++ cmake/pdal_utils.cmake
@@ -81,8 +81,8 @@
     set(PDAL_LIB_DIR "lib")
   endif (NOT DEFINED LIB_INSTALL_DIR)
     set(PDAL_INCLUDE_ROOT
-        "include/${PROJECT_NAME_LOWER}-${PDAL_VERSION_MAJOR}.${PDAL_VERSION_MINOR}")
-    set(PDAL_INCLUDE_DIR "${PDAL_INCLUDE_ROOT}/pdal")
+        "include/")
+    set(PDAL_INCLUDE_DIR "${PDAL_INCLUDE_ROOT}/${PROJECT_NAME_LOWER}/")
     set(PDAL_DOC_DIR "share/doc/${PROJECT_NAME_LOWER}-${PDAL_VERSION_MAJOR}.${PDAL_VERSION_MINOR}")
     set(PDAL_BIN_DIR "bin")
     set(PDAL_PKGCFG_DIR "${PDAL_LIB_DIR}/pkgconfig")


Added -O3 nvcc option for release builds and -fPIC for shared library builds.

git-svn-id: 9be72bd8b79bf6944680671de68cae08993c9086@1799 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/FindCuda.cmake
+++ src/CMake/cuda/FindCuda.cmake
@@ -103,8 +103,13 @@
   SET(nvcc_flags --device-emulation -D_DEVICEEMU -g --host-compilation C++)
 ELSE(CUDA_BUILD_TYPE MATCHES "Emulation")
   # Device present.
-  SET(nvcc_flags --host-compilation C++)
+  SET(nvcc_flags --host-compilation C++ -O3)
 ENDIF(CUDA_BUILD_TYPE MATCHES "Emulation")
+
+# support shared library builds
+if (NOT ENABLE_STATIC)
+set(nvcc_flags ${nvcc_flags} "-Xcompiler" ${CMAKE_SHARED_LIBRARY_C_FLAGS})
+endif (NOT ENABLE_STATIC)

 # nvcc 64-bit build workaround
 if (CMAKE_CL_64)


cmake: fix for travis detection always evaluating to true

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -48,7 +48,9 @@

 	if(APPLE)
 		if(BUILD_JAMOMAMAX)
-			if(!$ENV{TRAVIS})
+			if($ENV{TRAVIS})
+				message("no copy for travis")
+			else()
 				# TODO there appears to be some ambiguity when building because some things are build into debug/release even though CMAKE_BUILD_TYPE is the other here... [tap]

 				# ADD_CUSTOM_COMMAND(
@@ -201,7 +203,9 @@

 	if(APPLE)
 		if(BUILD_JAMOMAMAX)
-			if(!$ENV{TRAVIS})
+			if($ENV{TRAVIS})
+				message("no copy for travis")
+			else()
 				ADD_CUSTOM_COMMAND(
 				  TARGET ${PROJECT_NAME}
 				  POST_BUILD


Enable FileWatcher on desktop

Enable FileWatcher on desktop

--- CMake/Modules/AtomicDesktop.cmake
+++ CMake/Modules/AtomicDesktop.cmake
@@ -1,4 +1,4 @@

-add_definitions( -DATOMIC_TBUI )
+add_definitions( -DATOMIC_TBUI -DATOMIC_FILEWATCHER )

 set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} LibCpuId SQLite TurboBadger)


Fix setting of compiler definition for RTM (#821)

--- CMake/toolchain.ChibiOS.GCC.cmake
+++ CMake/toolchain.ChibiOS.GCC.cmake
@@ -135,7 +135,7 @@

     # set compiler definition for RTM build option
     if(NF_BUILD_RTM)
-        target_compile_definitions(${TARGET} PUBLIC BUILD_RTM)
+        target_compile_definitions(${TARGET} PUBLIC -DBUILD_RTM)
     endif()

     # set compiler definition for using Application Domains feature


- fix compilation on ubuntu

- fix compilation on ubuntu

--- CMakeModules/FindLIBCOMBINE.cmake
+++ CMakeModules/FindLIBCOMBINE.cmake
@@ -22,6 +22,8 @@
 # Modified by Ralph Gauges

 # message (STATUS "$ENV{COMBINE_DIR}")
+
+
 set(COMBINE_LIBRARY_NAME)
 if (UNIX)
   set(COMBINE_LIBRARY_NAME Combine-static)
@@ -30,11 +32,11 @@
 endif()

-find_package(combine CONFIG REQUIRED
-  CONFIGS Combine-config.cmake
-          Combine-static-config.cmake
-          libCombine-config.cmake
-          libCombine-static-config.cmake
+find_package(${COMBINE_LIBRARY_NAME} CONFIG QUIET)
+
+if (NOT ${COMBINE_LIBRARY_NAME}_FOUND)
+  find_package(${COMBINE_LIBRARY_NAME} CONFIG QUIET
+  CONFIGS ${COMBINE_LIBRARY_NAME}-config.cmake
   PATHS $ENV{COMBINE_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake
         ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake
         /usr/${CMAKE_INSTALL_LIBDIR}/cmake
@@ -42,17 +44,93 @@
         ${COPASI_DEPENDENCY_DIR}/lib/cmake
         /usr/lib/cmake
   )
+endif()

-set(COMBINE_FOUND ${combine_FOUND})
+if (NOT ${COMBINE_LIBRARY_NAME}_FOUND)
+  message(FATAL_ERROR "not found yet
+
+
+")
+
+endif()
+
+
+if (${COMBINE_LIBRARY_NAME}_FOUND)

 get_target_property(COMBINE_INCLUDE_DIR ${COMBINE_LIBRARY_NAME} INTERFACE_INCLUDE_DIRECTORIES)
-get_target_property(COMBINE_LIBRARY ${COMBINE_LIBRARY_NAME} IMPORTED_LOCATION_RELEASE)
+get_target_property(COMBINE_LIBRARY ${COMBINE_LIBRARY_NAME} IMPORTED_LOCATION)
+if (NOT COMBINE_LIBRARY)
+get_target_property(COMBINE_LIBRARY ${COMBINE_LIBRARY_NAME} IMPORTED_LOCATION_DEBUG)
+endif()
+
+if (NOT COMBINE_LIBRARY)
+set(COMBINE_LIBRARY)
+endif()

 get_target_property(COMBINE_INTERFACE_LINK_LIBRARIES ${COMBINE_LIBRARY_NAME} INTERFACE_LINK_LIBRARIES)
 if (COMBINE_INTERFACE_LINK_LIBRARIES)
   set(COMBINE_LIBRARY ${COMBINE_LIBRARY} ${COMBINE_INTERFACE_LINK_LIBRARIES})
 endif (COMBINE_INTERFACE_LINK_LIBRARIES)

+else()
+
+
+find_path(COMBINE_INCLUDE_DIR combine/combinearchive.h
+    PATHS $ENV{COMBINE_DIR}/include
+          $ENV{COMBINE_DIR}
+          ${COPASI_DEPENDENCY_DIR}/include
+          ${COPASI_DEPENDENCY_DIR}
+          ~/Library/Frameworks
+          /Library/Frameworks
+          /sw/include        # Fink
+          /opt/local/include # MacPorts
+          /opt/csw/include   # Blastwave
+          /opt/include
+          /usr/freeware/include
+    NO_DEFAULT_PATH)
+
+if (NOT COMBINE_INCLUDE_DIR)
+    message(FATAL_ERROR "COMBINE include dir not found not found!")
+endif (NOT COMBINE_INCLUDE_DIR)
+
+if (NOT COMBINE_INCLUDE_DIR)
+    find_path(COMBINE_INCLUDE_DIR combine/combinearchive.h)
+endif (NOT COMBINE_INCLUDE_DIR)
+
+find_library(COMBINE_LIBRARY
+    NAMES ${COMBINE_LIBRARY_NAME}
+    PATHS $ENV{COMBINE_DIR}/lib
+          $ENV{COMBINE_DIR}
+          ${COPASI_DEPENDENCY_DIR}/lib
+          ${COPASI_DEPENDENCY_DIR}
+          ~/Library/Frameworks
+          /Library/Frameworks
+          /sw/lib         Fink
+          /opt/local/lib  MacPorts
+          /opt/csw/lib    Blastwave
+          /opt/lib
+          /usr/freeware/lib64
+    NO_DEFAULT_PATH)
+
+if (NOT COMBINE_LIBRARY)
+    find_library(COMBINE_LIBRARY
+        NAMES ${COMBINE_LIBRARY_NAME})
+endif (NOT COMBINE_LIBRARY)
+
+
+endif()
+
+if (NOT COMBINE_LIBRARY)
+    message(FATAL_ERROR "COMBINE library not found!")
+endif (NOT COMBINE_LIBRARY)
+
+set(COMBINE_FOUND "NO")
+if(COMBINE_LIBRARY)
+    if   (COMBINE_INCLUDE_DIR)
+        SET(COMBINE_FOUND "YES")
+    endif(COMBINE_INCLUDE_DIR)
+endif(COMBINE_LIBRARY)
+
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COMBINE REQUIRED COMBINE_INCLUDE_DIR COMBINE_LIBRARY)


Convert tabs to spaces.

Convert tabs to spaces.

git-svn-id: 437764123c2e69732731433a8073bc2f24523c07@77 574e1c32-2fce-11df-82ed-5f3c927ac887

--- CMakeModules/FindVorbisFile.cmake
+++ CMakeModules/FindVorbisFile.cmake
@@ -8,7 +8,7 @@
 SET(VORBISFILE_SEARCH_PATHS
 	~/Library/Frameworks
 	/Library/Frameworks
-	/usr/local
+    /usr/local
 	/usr
 	/sw # Fink
 	/opt/local # DarwinPorts


Use latest conan

Use latest conan

--- CMake/External.cmake
+++ CMake/External.cmake
@@ -4,7 +4,7 @@
   # Download automatically, you can also just copy the conan.cmake  file
   if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
     message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
-    file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake"
+    file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/develop/conan.cmake"
          "${CMAKE_BINARY_DIR}/conan.cmake"
     )
   endif()


Fix WITH_CYCLES_OPENSUBDIV not enabling OpenSubdiv.

--- src/cmake/external_libs.cmake
+++ src/cmake/external_libs.cmake
@@ -149,6 +149,7 @@
 	# OpenSubdiv
 	if(WITH_CYCLES_OPENSUBDIV)
 		find_package(OpenSubdiv REQUIRED)
+		set(WITH_OPENSUBDIV ON)
 	endif()

 	unset(_lib_DIR)


Fix packaging documentation.

Fix packaging documentation.

--- cmake/ConfigurePackaging.cmake
+++ cmake/ConfigurePackaging.cmake
@@ -118,13 +118,12 @@

 # Sets up binary package metadata
 macro(SetPackageMetadata)
-    set(CPACK_PACKAGE_VENDOR "Lawrence Berkeley National Laboratory")
-    set(CPACK_PACKAGE_CONTACT "info@bro-ids.org")
-    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
-        "The Bro Network Intrusion Detection System")
+    set(CPACK_PACKAGE_VENDOR "International Computer Science Institute")
+    set(CPACK_PACKAGE_CONTACT "vallentin@icir.org")
+    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "VAST")

     # CPack may enforce file name extensions for certain package generators
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README.md
                    ${CMAKE_CURRENT_BINARY_DIR}/README.txt
                     COPYONLY)
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/COPYING


typo in FindOpenNI.cmake

typo in FindOpenNI.cmake

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -58,7 +58,7 @@

 mark_as_advanced(OPENNI_LIBRARY OPENNI_INCLUDE_DIR)
 if(NOT WIN32 AND NOT USB_10_FOUND)
-  message(STATUS "OpeNI disabled because libusb-1.0 not found.")
+  message(STATUS "OpenNI disabled because libusb-1.0 not found.")
   set(HAVE_OPENNI OFF)
   return()
 else(NOT WIN32 AND NOT USB_10_FOUND)


Fix for issue #506

Fix for issue #506

Quit earlier if libusb-1.0 is not found to prevent OPENNI_FOUND from being set

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -23,15 +23,22 @@
                PATH_SUFFIXES lib)
    include(FindPackageHandleStandardArgs)
    find_package_handle_standard_args(USB_10 DEFAULT_MSG USB_10_LIBRARY USB_10_INCLUDE_DIR)
+   if(NOT USB_10_FOUND)
+     message(STATUS "OpeNI disabled because libusb-1.0 not found.")
+     set(HAVE_OPENNI OFF)
+     return()
+   else(NOT USB_10_FOUND)
+     include_directories(${USB_10_INCLUDE_DIR})
+   endif(NOT USB_10_FOUND)
 endif(NOT WIN32)
-
+
 if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
   pkg_check_modules(PC_OPENNI openni-dev)
 else()
   pkg_check_modules(PC_OPENNI QUIET openni-dev)
 endif()

-set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER} ${PC_USB_10_CFLAGS_OTHER})
+set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
@@ -43,7 +50,7 @@
              NAMES OpenNI64 OpenNI
              HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
              PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib" "$ENV{PROGRAMW6432}/OpenNI/Lib64"
-			 PATH_SUFFIXES lib Lib Lib64)
+             PATH_SUFFIXES lib Lib Lib64)

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@@ -57,14 +64,6 @@
     OPENNI_LIBRARY OPENNI_INCLUDE_DIR)

 mark_as_advanced(OPENNI_LIBRARY OPENNI_INCLUDE_DIR)
-if(NOT WIN32 AND NOT USB_10_FOUND)
-  message(STATUS "OpenNI disabled because libusb-1.0 not found.")
-  set(HAVE_OPENNI OFF)
-  set(OPENNI_FOUND OFF)
-  return()
-else(NOT WIN32 AND NOT USB_10_FOUND)
-	include_directories(${USB_10_INCLUDE_DIR})
-endif(NOT WIN32 AND NOT USB_10_FOUND)

 if(OPENNI_FOUND)
   set(HAVE_OPENNI ON)


fix a bug of detect opencl

fix a bug of detect opencl

--- cmake/OpenCVDetectOpenCL.cmake
+++ cmake/OpenCVDetectOpenCL.cmake
@@ -16,14 +16,14 @@
             else()
                 set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_AMDSTREAMSDKROOT}/lib/x86_64)
             endif()
-        elif(ENV_CUDAPATH AND WIN32)
+        elseif(ENV_CUDAPATH AND WIN32)
             set(OPENCL_INCLUDE_SEARCH_PATH ${ENV_CUDA_PATH}/include)
             if(CMAKE_SIZEOF_VOID_P EQUAL 4)
                 set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_CUDA_PATH}/lib/Win32)
             else()
                 set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_CUDA_PATH}/lib/x64)
             endif()
-        elif(ENV_OPENCLROOT AND UNIX)
+        elseif(ENV_OPENCLROOT AND UNIX)
             set(OPENCL_INCLUDE_SEARCH_PATH ${ENV_OPENCLROOT}/inc)
             if(CMAKE_SIZEOF_VOID_P EQUAL 4)
                 set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} /usr/lib)
@@ -57,8 +57,11 @@

         if(OPENCL_FOUND)
             set(OPENCL_LIBRARIES ${OPENCL_LIBRARY})
+			set(HAVE_OPENCL 1)
         else()
             set(OPENCL_LIBRARIES)
         endif()
+	else()
+		set(HAVE_OPENCL 1)
     endif()
 endif()


Bump required firebase-ios-sdk version to include #5027

PiperOrigin-RevId: 299228432

--- cmake/external/firestore.cmake
+++ cmake/external/firestore.cmake
@@ -18,10 +18,14 @@
   return()
 endif()

-# Pin to the first revision that including
-# https://github.com/firebase/firebase-ios-sdk/pull/4984, that contains all the
-# fixes required to operate as an external build from within this repo.
-set(version d4e86ba091b0aeccfcdcf9d344338564f45c21c1)
+# Pin to the first revision that includes these changes:
+# https://github.com/firebase/firebase-ios-sdk/pull/4984
+# https://github.com/firebase/firebase-ios-sdk/pull/5027
+#
+# These changes are required for the firebase-ios-sdk build to interoperate
+# well with a wrapper build. Once M67 iOS releases this should point to the
+# Firestore release tag.
+set(version fb0fc07609a55cd2e5acf47fe034bf0c8e8419ad)

 ExternalProject_Add(
   firestore


Fix windows-x86-debug compilation with python enabled using multi-target generator

[Patch by Leonid Mashinskiy]

Visual Studio CMake generator is multi-target and does not define
CMAKE_BUILD_TYPE, so Debug build on VS was failing due selection of release
python library. This patch reverts back some of latest changes and fixes
building by raw VS using CMake expression generators.

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

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@371090 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -134,6 +134,48 @@
 #    locate 64-bit Python libraries.
 # This function is designed to address those limitations.  Currently it only partially
 # addresses them, but it can be improved and extended on an as-needed basis.
+function(find_python_libs_windows_helper LOOKUP_DEBUG OUT_EXE_PATH_VARNAME OUT_LIB_PATH_VARNAME OUT_DLL_PATH_VARNAME OUT_VERSION_VARNAME)
+  if(LOOKUP_DEBUG)
+      set(POSTFIX "_d")
+  else()
+      set(POSTFIX "")
+  endif()
+
+  file(TO_CMAKE_PATH "${PYTHON_HOME}/python${POSTFIX}.exe"                       PYTHON_EXE)
+  file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}${POSTFIX}.lib" PYTHON_LIB)
+  file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}${POSTFIX}.dll"      PYTHON_DLL)
+
+  foreach(component PYTHON_EXE;PYTHON_LIB;PYTHON_DLL)
+    if(NOT EXISTS ${${component}})
+      message(WARNING "Unable to find ${component}")
+      unset(${component})
+    endif()
+  endforeach()
+
+  if (NOT PYTHON_EXE OR NOT PYTHON_LIB OR NOT PYTHON_DLL)
+    message(WARNING "Unable to find all Python components.  Python support will be disabled for this build.")
+    set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+    return()
+  endif()
+
+  # Find the version of the Python interpreter.
+  execute_process(COMMAND "${PYTHON_EXE}" -c
+                  "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]]))"
+                  OUTPUT_VARIABLE PYTHON_VERSION_OUTPUT
+                  RESULT_VARIABLE PYTHON_VERSION_RESULT
+                  ERROR_QUIET)
+
+  if(PYTHON_VERSION_RESULT)
+    message(WARNING "Unable to retrieve Python executable version")
+    set(PYTHON_VERSION_OUTPUT "")
+  endif()
+
+  set(${OUT_EXE_PATH_VARNAME} ${PYTHON_EXE} PARENT_SCOPE)
+  set(${OUT_LIB_PATH_VARNAME} ${PYTHON_LIB} PARENT_SCOPE)
+  set(${OUT_DLL_PATH_VARNAME} ${PYTHON_DLL} PARENT_SCOPE)
+  set(${OUT_VERSION_VARNAME}  ${PYTHON_VERSION_OUTPUT} PARENT_SCOPE)
+endfunction()
+
 function(find_python_libs_windows)
   if ("${PYTHON_HOME}" STREQUAL "")
     message(WARNING "LLDB embedded Python on Windows requires specifying a value for PYTHON_HOME.  Python support disabled.")
@@ -161,55 +203,65 @@
   file(TO_CMAKE_PATH "${PYTHON_HOME}" PYTHON_HOME)
   # TODO(compnerd) when CMake Policy `CMP0091` is set to NEW, we should use
   # if(CMAKE_MSVC_RUNTIME_LIBRARY MATCHES MultiThreadedDebug)
-  if(CMAKE_BUILD_TYPE STREQUAL Debug)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_EXE)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}_d.lib" PYTHON_LIB)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}_d.dll" PYTHON_DLL)
-  else()
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_EXE)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" PYTHON_LIB)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" PYTHON_DLL)
-  endif()
-
-  foreach(component PYTHON_EXE;PYTHON_LIB;PYTHON_DLL)
-    if(NOT EXISTS ${${component}})
-      message(WARNING "unable to find ${component}")
-      unset(${component})
-    endif()
-  endforeach()
-
-  if (NOT PYTHON_EXE OR NOT PYTHON_LIB OR NOT PYTHON_DLL)
-    message(WARNING "Unable to find all Python components.  Python support will be disabled for this build.")
-    set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
-    return()
-  endif()
-
-  # Find the version of the Python interpreter.
-  execute_process(COMMAND "${PYTHON_EXE}" -c
-                  "import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))"
-                  OUTPUT_VARIABLE PYTHON_VERSION_OUTPUT
-                  RESULT_VARIABLE PYTHON_VERSION_RESULT
-                  ERROR_QUIET)
-  if(NOT PYTHON_VERSION_RESULT)
-    string(REPLACE ";" "." PYTHON_VERSION_STRING "${PYTHON_VERSION_OUTPUT}")
-    list(GET PYTHON_VERSION_OUTPUT 0 PYTHON_VERSION_MAJOR)
-    list(GET PYTHON_VERSION_OUTPUT 1 PYTHON_VERSION_MINOR)
-    list(GET PYTHON_VERSION_OUTPUT 2 PYTHON_VERSION_PATCH)
+  if(NOT DEFINED CMAKE_BUILD_TYPE)
+    # Multi-target generator was selected (like Visual Studio or Xcode) where no concrete build type was passed
+    # Lookup for both debug and release python installations
+    find_python_libs_windows_helper(TRUE  PYTHON_DEBUG_EXE   PYTHON_DEBUG_LIB   PYTHON_DEBUG_DLL   PYTHON_DEBUG_VERSION_STRING)
+    find_python_libs_windows_helper(FALSE PYTHON_RELEASE_EXE PYTHON_RELEASE_LIB PYTHON_RELEASE_DLL PYTHON_RELEASE_VERSION_STRING)
+    if(LLDB_DISABLE_PYTHON)
+      set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+      return()
+    endif()
+
+    # We should have been found both debug and release python here
+    # Now check that their versions are equal
+    if(NOT PYTHON_DEBUG_VERSION_STRING STREQUAL PYTHON_RELEASE_VERSION_STRING)
+      message(FATAL_ERROR "Python versions for debug (${PYTHON_DEBUG_VERSION_STRING}) and release (${PYTHON_RELEASE_VERSION_STRING}) are different."
+                          "Python installation is corrupted")
+    endif ()
+
+    set(PYTHON_EXECUTABLE $<$<CONFIG:Debug>:${PYTHON_DEBUG_EXE}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_EXE}>)
+    set(PYTHON_LIBRARY    $<$<CONFIG:Debug>:${PYTHON_DEBUG_LIB}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_LIB}>)
+    set(PYTHON_DLL        $<$<CONFIG:Debug>:${PYTHON_DEBUG_DLL}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_DLL}>)
+    set(PYTHON_VERSION_STRING ${PYTHON_RELEASE_VERSION_STRING})
+  else()
+    # Lookup for concrete python installation depending on build type
+    if (CMAKE_BUILD_TYPE STREQUAL Debug)
+      set(LOOKUP_DEBUG_PYTHON TRUE)
+    else()
+      set(LOOKUP_DEBUG_PYTHON FALSE)
+    endif()
+    find_python_libs_windows_helper(${LOOKUP_DEBUG_PYTHON} PYTHON_EXECUTABLE PYTHON_LIBRARY PYTHON_DLL PYTHON_VERSION_STRING)
+    if(LLDB_DISABLE_PYTHON)
+      set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+      return()
+    endif()
+  endif()
+
+  if(PYTHON_VERSION_STRING)
+    string(REPLACE "." ";" PYTHON_VERSION_PARTS "${PYTHON_VERSION_STRING}")
+    list(GET PYTHON_VERSION_PARTS 0 PYTHON_VERSION_MAJOR)
+    list(GET PYTHON_VERSION_PARTS 1 PYTHON_VERSION_MINOR)
+    list(GET PYTHON_VERSION_PARTS 2 PYTHON_VERSION_PATCH)
+  else()
+    unset(PYTHON_VERSION_MAJOR)
+    unset(PYTHON_VERSION_MINOR)
+    unset(PYTHON_VERSION_PATCH)
   endif()

   # Set the same variables as FindPythonInterp and FindPythonLibs.
-  set(PYTHON_EXECUTABLE ${PYTHON_EXE} PARENT_SCOPE)
-  set(PYTHON_LIBRARY ${PYTHON_LIB} PARENT_SCOPE)
-  set(PYTHON_DLL ${PYTHON_DLL} PARENT_SCOPE)
-  set(PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR} PARENT_SCOPE)
-  set(PYTHONLIBS_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}" PARENT_SCOPE)
-  set(PYTHON_VERSION_STRING ${PYTHON_VERSION_STRING} PARENT_SCOPE)
-  set(PYTHON_VERSION_MAJOR ${PYTHON_VERSION_MAJOR} PARENT_SCOPE)
-  set(PYTHON_VERSION_MINOR ${PYTHON_VERSION_MINOR} PARENT_SCOPE)
-  set(PYTHON_VERSION_PATCH ${PYTHON_VERSION_PATCH} PARENT_SCOPE)
+  set(PYTHON_EXECUTABLE         "${PYTHON_EXECUTABLE}"          PARENT_SCOPE)
+  set(PYTHON_LIBRARY            "${PYTHON_LIBRARY}"             PARENT_SCOPE)
+  set(PYTHON_DLL                "${PYTHON_DLL}"                 PARENT_SCOPE)
+  set(PYTHON_INCLUDE_DIR        "${PYTHON_INCLUDE_DIR}"         PARENT_SCOPE)
+  set(PYTHONLIBS_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}"  PARENT_SCOPE)
+  set(PYTHON_VERSION_STRING     "${PYTHON_VERSION_STRING}"      PARENT_SCOPE)
+  set(PYTHON_VERSION_MAJOR      "${PYTHON_VERSION_MAJOR}"       PARENT_SCOPE)
+  set(PYTHON_VERSION_MINOR      "${PYTHON_VERSION_MINOR}"       PARENT_SCOPE)
+  set(PYTHON_VERSION_PATCH      "${PYTHON_VERSION_PATCH}"       PARENT_SCOPE)

   message(STATUS "LLDB Found PythonExecutable: ${PYTHON_EXECUTABLE} (${PYTHON_VERSION_STRING})")
-  message(STATUS "LLDB Found PythonLibs: ${PYTHON_LIB} (${PYTHONLIBS_VERSION_STRING})")
+  message(STATUS "LLDB Found PythonLibs: ${PYTHON_LIBRARY} (${PYTHONLIBS_VERSION_STRING})")
   message(STATUS "LLDB Found PythonDLL: ${PYTHON_DLL}")
   message(STATUS "LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIR}")
 endfunction(find_python_libs_windows)


cmake: fix out of tree hal build fail

cmake: fix out of tree hal build fail

Fix out of tree building hal fail with different drive on windows.

Signed-off-by: Jim Tan <bc3afe8b929036c6fe07f34e95d1cf431d146197@ite.com.tw>

--- cmake/modules/extensions.cmake
+++ cmake/modules/extensions.cmake
@@ -403,6 +403,9 @@

   # Replace / with __ (driver/serial => driver__serial)
   string(REGEX REPLACE "/" "__" name ${name})
+
+  # Replace : with __ (C:/zephyrproject => C____zephyrproject)
+  string(REGEX REPLACE ":" "__" name ${name})

   set(${lib_name} ${name})
 endmacro()


Python binding doesn't need to link to the python lib on Linux

--- cmake/onnxruntime_python.cmake
+++ cmake/onnxruntime_python.cmake
@@ -117,7 +117,7 @@
     BUILD_WITH_INSTALL_RPATH TRUE
     INSTALL_RPATH_USE_LINK_PATH FALSE)
 else()
-  target_link_libraries(onnxruntime_pybind11_state PRIVATE ${onnxruntime_pybind11_state_libs} ${PYTHON_LIBRARY} ${onnxruntime_EXTERNAL_LIBRARIES})
+  target_link_libraries(onnxruntime_pybind11_state PRIVATE ${onnxruntime_pybind11_state_libs} ${onnxruntime_EXTERNAL_LIBRARIES})
   set_property(TARGET onnxruntime_pybind11_state APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker -rpath=\$ORIGIN")
 endif()


Remove unused (nonexistant?) library

Remove unused (nonexistant?) library

--- lib/FindAtomSpace.cmake
+++ lib/FindAtomSpace.cmake
@@ -38,9 +38,6 @@
    PATH ${ATOMSPACE_LIBPATH})

 find_library(ATOMSPACE_persist-zmq_LIBRARY persist-zmq
-   PATH ${ATOMSPACE_LIBPATH})
-
-find_library(ATOMSPACE_zmqatoms_LIBRARY zmqatoms
    PATH ${ATOMSPACE_LIBPATH})

 find_library(ATOMSPACE_PythonEval_LIBRARY PythonEval


Added missing ORYOL_SAMPLE_URL option

Added missing ORYOL_SAMPLE_URL option

--- fips-include.cmake
+++ fips-include.cmake
@@ -1,4 +1,5 @@
-# platform identification
+# cmake options
+set(ORYOL_SAMPLE_URL "http://floooh.github.com/oryol/" CACHE STRING "Sample data URL")

 # POSIX platforms
 if (FIPS_POSIX)


WIP: Hopefully fixed "fatal: Not a git repository (or any of the parent directories): .git" at https://stingray.researchlumc.nl/job/SuperElastix/job/SuperElastix/job/SELX-126-Make-compilation-logs-public/23/console  (2nd attempt)

--- CTest.cmake
+++ CTest.cmake
@@ -17,8 +17,9 @@
 #
 #=========================================================================

-set(CTEST_SOURCE_DIRECTORY "$ENV{HOME}/src")
-set(CTEST_BINARY_DIRECTORY "$ENV{HOME}/build")
+# Directories relative to the current directory (either src or build).
+set(CTEST_SOURCE_DIRECTORY "../src")
+set(CTEST_BINARY_DIRECTORY "../build")

 set(CTEST_SITE "lkeb-selx01")


fixed handling of BOOST_ROOT in detection of boost: Add it as a HINT to finc library if given

--- cmake/boost.cmake
+++ cmake/boost.cmake
@@ -39,9 +39,14 @@
 endif( APPLE)

 else( BOOST_INSTALL_PATH )
+
+if( BOOST_ROOT )
+MESSAGE( STATUS "Search for Boost in BOOST_ROOT=${BOOST_ROOT}" )
+find_package( Boost 1.57.0 COMPONENTS atomic QUIET HINTS "${BOOST_ROOT}" )
+else( BOOST_ROOT )
 MESSAGE( STATUS "Search for Boost ..." )
-
 find_package( Boost 1.57.0 COMPONENTS atomic QUIET)
+endif( BOOST_ROOT )
 if( Boost_ATOMIC_FOUND )
 	if( APPLE OR WIN32 )
 		if( HAS_CXX11_REGEX )


Set configuration values directly

Set configuration values directly

The `git remote add` command fails if the origin already exists. Also,
`git remote rm` fails if the remote doesn't exist. With shared source
trees, build trees all try to run the hooks-init target, failing because
they can't set the remote properly.

The solution implemented here is to just set the configuration values
that are cared about instead of using the convenience targets.

--- cmake/hooks.cmake
+++ cmake/hooks.cmake
@@ -7,8 +7,13 @@
           init
           --quiet
   COMMAND "${GIT_EXECUTABLE}"
-          remote add origin
+          config
+          remote.origin.url
           ../..
+  COMMAND "${GIT_EXECUTABLE}"
+          config
+          remote.origin.fetch
+          +refs/heads/hooks:refs/remotes/origin/hooks
   WORKING_DIRECTORY
           "${hooks_directory}"
   COMMENT "Initializing the hooks repository")


cleanup

cleanup

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -78,8 +78,8 @@
         CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_GOLD)

         if(COMPILER_SUPPORTS_GOLD)
-                set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags" PARENT_SCOPE)
-                set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags" PARENT_SCOPE)
+                set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold" PARENT_SCOPE)
+                set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold" PARENT_SCOPE)
         endif()
 endfunction()


Better message output for standalone build

--- math/minuit2/StandAlone.cmake
+++ math/minuit2/StandAlone.cmake
@@ -59,15 +59,19 @@

 # OpenMP support
 if(minuit2_omp)
+    if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+        message(STATUS "Building Minuit2 with OpenMP support")
+    endif()
     target_link_libraries(Common INTERFACE OpenMP::OpenMP_CXX)
-    message(STATUS "Building Minuit2 with OpenMP support")
 endif()

 # MPI support
 # Uses the old CXX bindings (deprecated), probably do not activate
 if(minuit2_mpi)
-    message(STATUS "Building Minuit2 with MPI support")
-    message(STATUS "Run: ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS")
+    if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+        message(STATUS "Building Minuit2 with MPI support")
+        message(STATUS "Run: ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS")
+    endif()
     target_compile_definitions(Common INTERFACE MPIPROC)
     target_link_libraries(Common INTERFACE MPI::MPI_CXX)
 endif()


Fix MSVC generator errors about generate_nativeexec

We have splitfile asm targets for nativeexec.c and nativexec.appdll.c,
so I'm using NAME instead of NAME_WE to distinguish them.

Review URL: https://codereview.appspot.com/7388062

git-svn-id: ed337ca7cdb08c0ba29d8fe58632bb7686892c2d@1948 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6

--- make/cpp2asm_support.cmake
+++ make/cpp2asm_support.cmake
@@ -282,7 +282,7 @@
 # dependencies.
 function (add_asm_target source output_out tgt_out extra_suffix extra_defs extra_deps)
   if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
-    get_filename_component(srcbase "${source}" NAME_WE)
+    get_filename_component(srcbase "${source}" NAME)

     set(s_file "${CMAKE_CURRENT_BINARY_DIR}/${srcbase}${extra_suffix}.s")
     set_source_files_properties("${s_file}" PROPERTIES GENERATED true)


Improve FindJsonCpp.cmake

Improve FindJsonCpp.cmake

Add /src/lib_json directory to the list of directories searches for the
json library. This is the default build directory for the jsoncpp library.

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -27,7 +27,13 @@
     string( REGEX REPLACE "[^=]+[=]" "" _source_dir "${_source_dir_def}" )
     set( _jsoncpp_include_dir "${_source_dir}/include" )
   endif()
-  set( _jsoncpp_library ${JsonCpp_DIR}/lib
+  set( _jsoncpp_library
+    ${JsonCpp_DIR}/src/lib_json
+    ${JsonCpp_DIR}/src/lib_json/Release
+    ${JsonCpp_DIR}/src/lib_json/MinSizeRel
+    ${JsonCpp_DIR}/src/lib_json/RelWithDebInfo
+    ${JsonCpp_DIR}/src/lib_json/Debug
+    ${JsonCpp_DIR}/lib
     ${JsonCpp_DIR}/lib/Release
     ${JsonCpp_DIR}/lib/MinSizeRel
     ${JsonCpp_DIR}/lib/RelWithDebInfo


Recent UMFPACK library requires to link to libSuiteSparse

--- cmake/FindUmfpack.cmake
+++ cmake/FindUmfpack.cmake
@@ -39,9 +39,12 @@
   find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
   if (COLAMD_LIBRARY)
     set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})
-  #else (COLAMD_LIBRARY)
-  #  set(UMFPACK_LIBRARIES FALSE)
   endif (COLAMD_LIBRARY)
+
+  find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
+  if (SUITESPARSE_LIBRARY)
+    set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${SUITESPARSE_LIBRARY})
+  endif (SUITESPARSE_LIBRARY)

 endif(UMFPACK_LIBRARIES)


cmake: avoid timestamp change of version_string.inc file

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -519,16 +519,29 @@

 if(NOT DEFINED CMAKE_ARGC) # Guard CMake standalone invocations

-set(OPENCV_BUILD_INFO_FILE "${CMAKE_BINARY_DIR}/version_string.tmp")
-file(REMOVE "${OPENCV_BUILD_INFO_FILE}")
+set(OPENCV_BUILD_INFO_STR "" CACHE INTERNAL "")
 function(ocv_output_status msg)
   message(STATUS "${msg}")
   string(REPLACE "\\" "\\\\" msg "${msg}")
   string(REPLACE "\"" "\\\"" msg "${msg}")
-  file(APPEND "${OPENCV_BUILD_INFO_FILE}" "\"${msg}\\n\"\n")
+  set(OPENCV_BUILD_INFO_STR "${OPENCV_BUILD_INFO_STR}\"${msg}\\n\"\n" CACHE INTERNAL "")
 endfunction()

 macro(ocv_finalize_status)
+  set(OPENCV_BUILD_INFO_FILE "${CMAKE_BINARY_DIR}/version_string.tmp")
+  if(EXISTS "${OPENCV_BUILD_INFO_FILE}")
+    file(READ "${OPENCV_BUILD_INFO_FILE}" __content)
+  else()
+    set(__content "")
+  endif()
+  if("${__content}" STREQUAL "${OPENCV_BUILD_INFO_STR}")
+    #message(STATUS "${OPENCV_BUILD_INFO_FILE} contains the same content")
+  else()
+    file(WRITE "${OPENCV_BUILD_INFO_FILE}" "${OPENCV_BUILD_INFO_STR}")
+  endif()
+  unset(__content)
+  unset(OPENCV_BUILD_INFO_STR CACHE)
+
   if(NOT OPENCV_SKIP_STATUS_FINALIZATION)
     if(DEFINED OPENCV_MODULE_opencv_core_BINARY_DIR)
       execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENCV_BUILD_INFO_FILE}" "${OPENCV_MODULE_opencv_core_BINARY_DIR}/version_string.inc" OUTPUT_QUIET)


Remove tbag_modules__apply_dep_uv() cmake macro.

--- cmake/TbagModules.cmake
+++ cmake/TbagModules.cmake
@@ -425,15 +425,38 @@
     tbag_modules__add_whole_archive ($<TARGET_FILE:sqlite3>)
 endmacro ()

-macro (tbag_modules__apply_dep_uv)
+macro (tbag_modules__apply_dep_z)
+    list (APPEND TBAG_PROJECT_DEPENDENCIES z)
+    list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/dep/zlib)
+    tbag_modules__add_whole_archive ($<TARGET_FILE:z>)
+endmacro ()
+
+macro (tbag_modules__apply_dep_simdpp)
+    list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/dep/simdpp)
+endmacro ()
+
+macro (tbag_modules__build_dep_simdpp)
+    if (DEFINED SIMDPP_RUNNABLE_ARCHS)
+        foreach (__simd_cusor ${ARGN})
+            simdpp_multiarch (__simd_object "${__simd_cusor}" ${SIMDPP_RUNNABLE_ARCHS})
+            list (APPEND TBAG_PROJECT_OBJECTS ${__simd_object})
+        endforeach ()
+    endif ()
+endmacro ()
+
+## -------------------
+## External libraries.
+## -------------------
+
+macro (tbag_modules__apply_ext_uv)
     list (APPEND TBAG_PROJECT_DEPENDENCIES uv)
-    list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/dep/uv/include)
-    tbag_modules__add_whole_archive ($<TARGET_FILE:uv>)
+    list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${uv_EXT_INCLUDE_DIR})
+    tbag_modules__add_whole_archive (${uv_EXT_STATIC_LIB})

     ## external libraries.
     if (WIN32)
         list (APPEND TBAG_PROJECT_LDFLAGS advapi32.lib iphlpapi.lib psapi.lib shell32.lib
-                                          user32.lib userenv.lib winmm.lib ws2_32.lib)
+                                          user32.lib userenv.lib ws2_32.lib)
     else ()
         list (APPEND TBAG_PROJECT_LDFLAGS -lpthread)
         if (APPLE)
@@ -441,47 +464,6 @@
         else ()
             list (APPEND TBAG_PROJECT_LDFLAGS -lnsl -ldl -lrt)
         endif ()
-    endif ()
-endmacro ()
-
-macro (tbag_modules__apply_dep_z)
-    list (APPEND TBAG_PROJECT_DEPENDENCIES z)
-    list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/dep/zlib)
-    tbag_modules__add_whole_archive ($<TARGET_FILE:z>)
-endmacro ()
-
-macro (tbag_modules__apply_dep_simdpp)
-    list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/dep/simdpp)
-endmacro ()
-
-macro (tbag_modules__build_dep_simdpp)
-    if (DEFINED SIMDPP_RUNNABLE_ARCHS)
-        foreach (__simd_cusor ${ARGN})
-            simdpp_multiarch (__simd_object "${__simd_cusor}" ${SIMDPP_RUNNABLE_ARCHS})
-            list (APPEND TBAG_PROJECT_OBJECTS ${__simd_object})
-        endforeach ()
-    endif ()
-endmacro ()
-
-## -------------------
-## External libraries.
-## -------------------
-
-macro (tbag_modules__apply_ext_uv)
-    list (APPEND TBAG_PROJECT_DEPENDENCIES uv)
-    list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${uv_EXT_INCLUDE_DIR})
-    tbag_modules__add_whole_archive (${uv_EXT_STATIC_LIB})
-
-    ## external libraries.
-    if (WIN32)
-        list (APPEND TBAG_PROJECT_LDFLAGS advapi32.lib iphlpapi.lib psapi.lib shell32.lib
-                                          user32.lib userenv.lib ws2_32.lib)
-    else ()
-        list (APPEND TBAG_PROJECT_LDFLAGS -lpthread -dl)
-    endif ()
-
-    if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
-        list (APPEND TBAG_PROJECT_LDFLAGS -lrt)
     endif ()
 endmacro ()


Fixed bug of COMPILE_LANGUAGE cmake version checker.

--- cmake/TbagModules.cmake
+++ cmake/TbagModules.cmake
@@ -681,7 +681,7 @@
 macro (tbag_modules__update_cxx_flags_property)
     list (LENGTH TBAG_PROJECT_CXXFLAGS __project_cxxflags_length)
     if (${__project_cxxflags_length} GREATER 0)
-        if ("${CMAKE_VERSION}" VERSION_GREATER "3.0.2")
+        if ("${CMAKE_VERSION}" VERSION_GREATER "3.3.0")
             target_compile_options (${TBAG_PROJECT_CONST_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${TBAG_PROJECT_CXXFLAGS}>)
         else ()
             target_compile_options (${TBAG_PROJECT_CONST_NAME} PRIVATE ${TBAG_PROJECT_CXXFLAGS})


Disable Perl/PDL if BUILD_SHARED_LIBS=OFF.

svn path=/trunk/; revision=9103

--- cmake/modules/pdl.cmake
+++ cmake/modules/pdl.cmake
@@ -25,6 +25,14 @@
 else(DEFAULT_NO_BINDINGS)
   option(ENABLE_pdl "Enable Perl/PDL examples in tests" ON)
 endif(DEFAULT_NO_BINDINGS)
+
+if(ENABLE_pdl)
+  if(NOT BUILD_SHARED_LIBS)
+    message(STATUS "WARNING: "
+    "Disabling Perl/PDL examples because BUILD_SHARED_LIBS=OFF")
+    set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
+  endif(NOT BUILD_SHARED_LIBS)
+endif(ENABLE_pdl)

 if(ENABLE_pdl)
   if(PERL_FOUND)


We need multiple component specifications in install command

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -94,10 +94,9 @@
         SOVERSION ${PCL_MAJOR_VERSION}
         DEFINE_SYMBOL "PCLAPI_EXPORTS")
     install(TARGETS ${_name}
-        RUNTIME DESTINATION ${BIN_INSTALL_DIR}
-        LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-        ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-        COMPONENT ${_component})
+        RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT ${_component}
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component}
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component})
 endmacro(PCL_ADD_LIBRARY)


[cmake] copy hdf5 for tests

[cmake] copy hdf5 for tests

--- cmake/tools4tests.cmake
+++ cmake/tools4tests.cmake
@@ -9,8 +9,9 @@
   # find and copy data files : *.mat, *.dat and *.xml, and etc.
   FILE(GLOB_RECURSE _DATA_FILES
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_D}
-    *.mat
+    *.mat
     *.dat
+    *.hdf5
     *.xml
     *.DAT
     *.INI)
@@ -44,6 +45,7 @@
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_D}
     *.mat
     *.dat
+    *.hdf5
     *.xml
     *.DAT
     *.INI)


Removed duplicated linking of boost libraries under OSX.
Cleaned up NektarCommon.cmake.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@2622 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/NektarCommon.cmake
+++ library/NektarCommon.cmake
@@ -13,7 +13,8 @@
 	# Needed for M_PI to be visible in visual studio.
 	ADD_DEFINITIONS(-D_USE_MATH_DEFINES)

-	# Removes the warnings about unsafe methods such as strcpy, std::copy, memcmp, etc.
+	# Removes the warnings about unsafe methods such as strcpy, std::copy,
+    # memcmp, etc.
 	ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
 ENDIF( )

@@ -98,7 +99,8 @@
 MACRO(SET_LAPACK_LINK_LIBRARIES name)
     IF( NEKTAR_USE_BLAS_LAPACK )
         IF( NEKTAR_USE_MKL AND MKL_FOUND )
-            TARGET_LINK_LIBRARIES(${name} ${MKL_LAPACK} optimized ${MKL} debug ${MKL} ${MKL_GUIDE})
+            TARGET_LINK_LIBRARIES(${name} ${MKL_LAPACK}
+                optimized ${MKL} debug ${MKL} ${MKL_GUIDE})
         ENDIF( NEKTAR_USE_MKL AND MKL_FOUND )

         IF( NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT AND NIST_SPARSE_BLAS_FOUND )
@@ -128,7 +130,8 @@
         ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )

         IF( NEKTAR_USE_METIS )
-            TARGET_LINK_LIBRARIES(${name} optimized ${METIS_LIB} debug ${METIS_LIB} )
+            TARGET_LINK_LIBRARIES(${name}
+                optimized ${METIS_LIB} debug ${METIS_LIB} )
             ENDIF( NEKTAR_USE_METIS )
     ENDIF( NEKTAR_USE_BLAS_LAPACK )
 ENDMACRO(SET_LAPACK_LINK_LIBRARIES name)
@@ -141,12 +144,16 @@
     SET_TARGET_PROPERTIES(${name} PROPERTIES RELWITHDEBINFO_POSTFIX -rg)

     IF( MSVC )
-        # Disable the warnings about duplicate copy/assignment methods (4521, 4522)
+        # Disable the warnings about duplicate copy/assignment methods
+        #   (4521, 4522)
         # Disable the warning that arrays are default intialized (4351)
-        # Disable "forcing value to bool 'true' or 'false' (performance warning)" warning (4800)
-
-        # /Za is necessary to prevent temporaries being bound to reference parameters.
-        SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/wd4521 /wd4522 /wd4351 /wd4018 /wd4800")
+        # Disable "forcing value to bool 'true' or 'false' (performance
+        #   warning)" warning (4800)
+
+        # /Za is necessary to prevent temporaries being bound to reference
+        #   parameters.
+        SET_TARGET_PROPERTIES(${name}
+            PROPERTIES COMPILE_FLAGS "/wd4521 /wd4522 /wd4351 /wd4018 /wd4800")
     ENDIF(  )

     SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DNEKTAR_DEBUG")
@@ -166,12 +173,6 @@
         # on 64 bit Linux.
         SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "-fPIC")
     ENDIF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
-
-    IF( ${CMAKE_COMPILER_IS_GNUCXX} )
-        IF(NEKTAR_ENABLE_PROFILE)
-            #SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -finstrument-functions")
-        ENDIF(NEKTAR_ENABLE_PROFILE)
-    ENDIF( ${CMAKE_COMPILER_IS_GNUCXX} )

 ENDMACRO(SET_COMMON_PROPERTIES name)

@@ -181,10 +182,12 @@
             # /Yu"stdafx.h"
             #MESSAGE(${${precompiledHeader}})
     	    #MESSAGE(${${sourceFiles}})
-            SET_SOURCE_FILES_PROPERTIES(${${sourceFiles}} PROPERTIES COMPILE_FLAGS "/Yu\"${${precompiledHeader}}\"")
+            SET_SOURCE_FILES_PROPERTIES(${${sourceFiles}}
+                PROPERTIES COMPILE_FLAGS "/Yu\"${${precompiledHeader}}\"")
             LIST(GET ${sourceFiles} 0 OUTVAR)
             #MESSAGE(${OUTVAR})
-            SET_SOURCE_FILES_PROPERTIES(${OUTVAR} PROPERTIES COMPILE_FLAGS "/Yc\"${${precompiledHeader}}\"")
+            SET_SOURCE_FILES_PROPERTIES(${OUTVAR}
+                PROPERTIES COMPILE_FLAGS "/Yc\"${${precompiledHeader}}\"")

         ENDIF()
     ENDIF()
@@ -240,13 +243,16 @@
 	       SET(THE_LINK_FLAGS "")
 	ENDIF(NOT THE_LINK_FLAGS)

-        SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} -pthread")
-        SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "${THE_LINK_FLAGS} -pthread")
+        SET_TARGET_PROPERTIES(${name}
+            PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} -pthread")
+        SET_TARGET_PROPERTIES(${name}
+            PROPERTIES LINK_FLAGS "${THE_LINK_FLAGS} -pthread")

     ENDIF( ${CMAKE_SYSTEM} MATCHES "Linux.*" )

     IF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
-        SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
+        SET_TARGET_PROPERTIES(${name}
+            PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
     ENDIF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")

     INSTALL(TARGETS ${name} RUNTIME DESTINATION ${NEKTAR_BIN_DIR} OPTIONAL
@@ -262,28 +268,21 @@
     TARGET_LINK_LIBRARIES( ${name} ${NIST_SPARSE_BLAS})

     SET_COMMON_PROPERTIES(${name})
-
-    IF( APPLE )
-        SET_LAPACK_LINK_LIBRARIES(${name})
-        TARGET_LINK_LIBRARIES( ${name}
-            ${Boost_THREAD_LIBRARY}
-            ${Boost_IOSTREAMS_LIBRARY}
-            ${Boost_ZLIB_LIBRARY}
-            )
-    ENDIF( APPLE )

     # Set properties for building shared libraries
     IF( ${type} STREQUAL "SHARED" )
         # Properties specific to Mac OSX
         IF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
-            SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
+            # We allow undefined symbols to be looked up dynamically at runtime
+            # from the boost libraries linked by the executables.
+            SET_TARGET_PROPERTIES(${name}
+                PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
         ENDIF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
     ENDIF( ${type} STREQUAL "SHARED" )
-#    INSTALL(TARGETS ${name} RUNTIME DESTINATION ${NEKTAR_BIN_DIR} OPTIONAL
-#		          ARCHIVE DESTINATION ${NEKTAR_LIB_DIR} OPTIONAL
-#			   LIBRARY DESTINATION ${NEKTAR_LIB_DIR} OPTIONAL)
-
-    INSTALL(TARGETS ${name} EXPORT Nektar++Libraries RUNTIME DESTINATION ${NEKTAR_BIN_DIR} OPTIONAL
-		          ARCHIVE DESTINATION ${NEKTAR_LIB_DIR} OPTIONAL
-			   LIBRARY DESTINATION ${NEKTAR_LIB_DIR} OPTIONAL)
+
+    INSTALL(TARGETS ${name} EXPORT Nektar++Libraries
+        RUNTIME DESTINATION ${NEKTAR_BIN_DIR} OPTIONAL
+		ARCHIVE DESTINATION ${NEKTAR_LIB_DIR} OPTIONAL
+		LIBRARY DESTINATION ${NEKTAR_LIB_DIR} OPTIONAL)
+
 ENDMACRO(ADD_NEKTAR_LIBRARY name type)


compile fix for windows

compile fix for windows

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -14,12 +14,12 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

-SET(FLAGS_SSE2  "")
+SET(FLAGS_SSE2  "/D__SSE__ /D__SSE2__")
 SET(FLAGS_SSE42 "${FLAGS_SSE2} /D__SSE3__ /D__SSSE3__ /D__SSE4_1__ /D__SSE4_2__")
 SET(FLAGS_AVX   "${FLAGS_SSE42} /arch:AVX")
 SET(FLAGS_AVX2  "${FLAGS_SSE42} /arch:AVX2")

-SET(COMMON_CXX_FLAGS "/EHsc /MP /GR /GS- /D__SSE__ /D__SSE2__")
+SET(COMMON_CXX_FLAGS "/EHsc /MP /GR /GS- ${FLAGS_SSE2}")

 SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
 SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /Oi /Gy")


Fixed cmake for jansson

Fixed cmake for jansson

--- libs/jansson.cmake
+++ libs/jansson.cmake
@@ -196,12 +196,28 @@
    set(JSON_SNPRINTF _snprintf)
 endif ()

+include(CheckSymbolExists)
+    include(CheckCSourceCompiles)
+
 check_c_source_compiles ("int main() { unsigned long val; __sync_bool_compare_and_swap(&val, 0, 1); return 0; } " HAVE_SYNC_BUILTINS)
 check_c_source_compiles ("int main() { char l; unsigned long v;
         __atomic_test_and_set(&l, __ATOMIC_RELAXED); __atomic_store_n(&v, 1,
             __ATOMIC_RELEASE); __atomic_load_n(&v, __ATOMIC_ACQUIRE); return
         0; }" HAVE_ATOMIC_BUILTINS)

+check_c_source_compiles("int main() { long long test = 0; return test; }" json_have_long_long)
+if(NOT json_have_long_long)
+    set(json_have_long_long 0)
+endif()
+check_c_source_compiles("inline int test() { return 0; }\nint main() { return test(); }" json_inline)
+if(json_inline)
+    set(json_inline inline)
+endif()
+check_symbol_exists(localeconv locale.h json_have_localeconv)
+if(NOT json_have_localeconv)
+    set(json_have_localeconv 0)
+endif()
+
 set(JANSSON libs/jansson)

 include_directories(${JANSSON}/include ${LIBUVDIR}/src)
@@ -212,4 +228,9 @@
 add_definitions(-DHAVE_CONFIG_H)

 include_directories (${JANSSON}/include)
+include_directories (${JANSSON}/src)
 include_directories (${JANSSON}/private_include)
+
+configure_file(${JANSSON}/src/jansson_config.h.in
+    ${JANSSON}/src/jansson_config.h
+    @ONLY)


ENH: check that gdal-config is present before calling test script

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -12,7 +12,10 @@
 if(UNIX)

 	message(STATUS "Check if Gdal qualifies for Orfeo ToolBox")
-
+
+  if("x${GDAL_CONFIG}" STREQUAL "x")
+    message(FATAL_ERROR "Cannot find gdal-config executable. Set GDAL_CONFIG")
+  endif()

 	# Prepare bash script
 	configure_file(${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest.sh.in ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh @ONLY)


Also look in /usr/local/lib(/glib-2.0/include) for glibconfig.h, which is where it is on FreeBSD, when pkg-config is not available.

--- modules/FindGLIB2.cmake
+++ modules/FindGLIB2.cmake
@@ -69,6 +69,7 @@
       /usr/lib64
       /usr/lib
       /usr/local/include
+      /usr/local/lib
       ${CMAKE_LIBRARY_PATH}
     PATH_SUFFIXES
       glib-2.0/include


Revert "Remove comments."

Revert "Remove comments."

This reverts commit 9198422dd2eee7ef402f844e45c9af268b10dfa3.

--- cmake/celix_project/CelixProject.cmake
+++ cmake/celix_project/CelixProject.cmake
@@ -32,6 +32,11 @@
         set(CMAKE_C_FLAGS "-lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_C_FLAGS}")
         set(CMAKE_CXX_FLAGS "-lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_CXX_FLAGS}")
     endif ()
+
+#    if (ENABLE_TESTING)
+#        set(CMAKE_C_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED ${CMAKE_C_FLAGS}")
+#        set(CMAKE_CXX_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED ${CMAKE_CXX_FLAGS}")
+#    endif ()
 endif()

 if (ENABLE_UNDEFINED_SANITIZER)


bugfix

bugfix

--- cmake/configure/configure_1_cuda.cmake
+++ cmake/configure/configure_1_cuda.cmake
@@ -45,9 +45,9 @@
         )
     ENDIF()

-    IF("${DEAL_II_CUDA_FLAGS}" MATCHES "-arch[ ]*sm_([0-9]*)")
+    IF("${DEAL_II_CUDA_FLAGS_SAVED}" MATCHES "-arch[ ]*sm_([0-9]*)")
       SET(CUDA_COMPUTE_CAPABILITY "${CMAKE_MATCH_1}")
-    ELSEIF("${DEAL_II_CUDA_FLAGS}" MATCHES "-arch=sm_([0-9]*)")
+    ELSEIF("${DEAL_II_CUDA_FLAGS_SAVED}" MATCHES "-arch=sm_([0-9]*)")
       SET(CUDA_COMPUTE_CAPABILITY "${CMAKE_MATCH_1}")
     ELSE()
       #


Set GIT_TAG for all externals

Set GIT_TAG for all externals

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -109,6 +109,7 @@

     add_external_headeronly_project(mmpld_io
       GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/mmpld_io.git
+      GIT_TAG 0002c64e0be4dddc137e4fe37db4b96361bc79bd
       INCLUDE_DIR "include")

   # nanoflann
@@ -140,6 +141,7 @@

     add_external_headeronly_project(sim_sort
       GIT_REPOSITORY https://github.com/alexstraub1990/simultaneous-sort.git
+      GIT_TAG 220fdf37fec2d9d3e3f7674194544ee70eb93ee7 # master on 2021-07-26, because nothing was specified here.
       INCLUDE_DIR "include")

   # Built libraries #####################################################
@@ -377,6 +379,7 @@

     add_external_project(IceT STATIC
       GIT_REPOSITORY https://gitlab.kitware.com/icet/icet.git
+      GIT_TAG abf5bf2b92c0531170c8db2621b375065c7da7c4 # master on 2021-07-26, because nothing was specified here.
       BUILD_BYPRODUCTS "<INSTALL_DIR>/${ICET_CORE_LIB}" "<INSTALL_DIR>/${ICET_GL_LIB}" "<INSTALL_DIR>/${ICET_MPI_LIB}"
       CMAKE_ARGS
         -DBUILD_SHARED_LIBS=OFF
@@ -621,6 +624,7 @@

     add_external_headeronly_project(obj-io INTERFACE
       GIT_REPOSITORY https://github.com/thinks/obj-io.git
+      GIT_TAG bfe835200fdff49b45a6de4561741203f85ad028 # master on 2021-07-26, because nothing was specified here.
       INCLUDE_DIR "include/thinks")

   # qhull
@@ -661,6 +665,7 @@

     add_external_project(quickhull STATIC
       GIT_REPOSITORY https://github.com/akuukka/quickhull.git
+      GIT_TAG 4f65e0801b8f60c9a97da2dadbe63c2b46397694 # master on 2021-07-26, because nothing was specified here.
       BUILD_BYPRODUCTS "<INSTALL_DIR>/${QUICKHULL_LIB}"
       PATCH_COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_SOURCE_DIR}/externals/quickhull/CMakeLists.txt"


Don't duplicate flags for the linker

Don't duplicate flags for the linker

--- cmake/Sanitizers.cmake
+++ cmake/Sanitizers.cmake
@@ -17,15 +17,12 @@

 kl_define_build_type(ASan
     COMPILER_FLAGS "-O1 -g -fsanitize=address -fno-omit-frame-pointer -DNDEBUG"
-    LINKER_FLAGS "-fsanitize=address -fuse-ld=gold"
+)
+kl_define_build_type(TSan
+    COMPILER_FLAGS "-O1 -g -fsanitize=thread -DNDEBUG"
 )
 kl_define_build_type(UBSan
     COMPILER_FLAGS "-O1 -g -fsanitize=undefined -fno-omit-frame-pointer -DNDEBUG"
-    LINKER_FLAGS "-fsanitize=undefined"
-)
-kl_define_build_type(TSan
-    COMPILER_FLAGS "-O1 -g -fsanitize=thread -DNDEBUG"
-    LINKER_FLAGS "-fsanitize=thread"
 )

 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")


cmake: Fix missing braces around interface

Error occurred when using target_link_libraries in CMakeLists.txt:

Cannot specify link libraries for target "interface" which is not built
by this project.

Replace "interface" with "${interface}".

Signed-off-by: Ding Tao <07dff04f1a3ec2456623b40cc3a82a04949e5843@qq.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -418,7 +418,7 @@

 function(zephyr_link_interface interface)
-  target_link_libraries(interface INTERFACE zephyr_interface)
+  target_link_libraries(${interface} INTERFACE zephyr_interface)
 endfunction()

 #


submodules.cmake: git returns 128 if not in a repository

It is possible that a .git directory isn't definitive on the
existance of a working git tree. A git worktree over sshfs
for instance will fail to build unless the main repository
also exists in the same directory. Adding this extra test
will make the detection that little more ruggardised for these
odd build environments.

Signed-off-by: Daniel Black <ce6aa2808e3fe4e77f6f1aff6fb988c295097d35@au.ibm.com>

--- cmake/submodules.cmake
+++ cmake/submodules.cmake
@@ -2,8 +2,9 @@
 IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
   EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" config --get cmake.update-submodules
                   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
-                  OUTPUT_VARIABLE cmake_update_submodules)
-  IF(cmake_update_submodules MATCHES no)
+                  OUTPUT_VARIABLE cmake_update_submodules
+                  RESULT_VARIABLE git_config_get_result)
+  IF(git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no)
     SET(update_result 0)
   ELSEIF (cmake_update_submodules MATCHES force)
     MESSAGE("-- Updating submodules (forced)")


update

update

--- share/hugh/cmake/CMakeAddons_DefaultVariables.cmake
+++ share/hugh/cmake/CMakeAddons_DefaultVariables.cmake
@@ -22,7 +22,7 @@
   set(Boost_FIND_QUIETLY ON)
 endif()

-# Cmake 'install'
+# CMake 'install'
 if(VERBOSE)
   set(CMAKE_INSTALL_MESSAGE ALWAYS)
 else()


Disable warning unused-but-set-variable for GCC >= 4.6.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -135,6 +135,12 @@
     set(CMAKE_CXX_FLAGS "-Wno-deprecated ${CMAKE_CXX_FLAGS}")
   endif (${CXX_VERSION_NUMBER} GREATER 429)

+  #<ND> Disable unused-but-set-variable for GCC >= 4.6. It causes a lot of warning/errors all over the source. Fixing that would result in changing a good amount of files.
+  if(${CXX_VERSION_NUMBER} GREATER 460)
+    set(CMAKE_CXX_FLAGS "-Wno-unused-but-set-variable ${CMAKE_CXX_FLAGS}")
+  endif (${CXX_VERSION_NUMBER} GREATER 460)
+  #</ND>
+
   # End of hacks.

   add_definitions(


BUG: Added the new Utilities directory iplExtHdrs to look for include files.

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -36,6 +36,7 @@
   ${ITK_SOURCE_DIR}/Utilities/expat
   ${ITK_SOURCE_DIR}/Utilities/nifti/niftilib
   ${ITK_SOURCE_DIR}/Utilities/nifti/znzlib
+  ${ITK_SOURCE_DIR}/Utilities/itkExtHdrs
   ${ITK_BINARY_DIR}/Utilities
   ${ITK_SOURCE_DIR}/Utilities
 )


SWDEV-263773 : adding CMAKE_TESTING_TOOL cmake argument

Change-Id: I28df2344d000a0dbef07f45971a9dc92fe07fb27

--- tests/hit/HIT.cmake
+++ tests/hit/HIT.cmake
@@ -8,6 +8,7 @@
     set(HIP_LIB_TYPE "static")
 endif()
 message(STATUS "HIP runtime lib type - ${HIP_LIB_TYPE}")
+message(STATUS "CMAKE_TESTING_TOOL: ${CMAKE_TESTING_TOOL}")
 #-------------------------------------------------------------------------------
 # Helper macro to parse BUILD instructions
 macro(PARSE_BUILD_COMMAND _target _sources _hipcc_options _hcc_options _clang_options _nvcc_options _link_options _exclude_platforms _exclude_runtime _exclude_compiler _exclude_lib_type _depends _dir)
@@ -232,26 +233,39 @@
     set(${_value} "${${_map}_${_key}}")
 endmacro()

+
+# Helper macro to generate a test
+macro(GENERATE_TEST _config testname cmdline)
+    set(TEST_CMD_LINE ${cmdline} ${ARGN})
+    if(${_config} STREQUAL ${HIP_CTEST_CONFIG_DEFAULT})
+        add_test(NAME ${testname} COMMAND ${TEST_CMD_LINE})
+    else()
+        add_test(NAME ${testname} CONFIGURATIONS ${_config} COMMAND ${TEST_CMD_LINE})
+    endif()
+    set_tests_properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "PASSED" ENVIRONMENT HIP_PATH=${HIP_ROOT_DIR})
+    set_tests_properties(${testname} PROPERTIES SKIP_RETURN_CODE 127 ENVIRONMENT HIP_PATH=${HIP_ROOT_DIR})
+endmacro()
+
 # Helper macro to create a test
+macro(MAKE_NAMED_TEST _config exe testname)
+    # to generate hip original test
+    set(TEST_CMD_LINE ${PROJECT_BINARY_DIR}/${exe} ${ARGN})
+    generate_test(${_config} ${testname} ${TEST_CMD_LINE})
+
+    # to generate test with tool enabled
+    if(DEFINED CMAKE_TESTING_TOOL)
+        # arguments passing to the testing tool
+        # <source dir>, <build dir>, <test name>, <test args...>
+        set(TOOL_CMD_LINE ${CMAKE_TESTING_TOOL} ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} ${TEST_CMD_LINE})
+        generate_test(${_config} ${testname}.prof ${TOOL_CMD_LINE})
+    endif()
+endmacro()
+
+# Helper macro to create a test with default name
 macro(MAKE_TEST _config exe)
     string(REPLACE " " "" smush_args ${ARGN})
     set(testname ${exe}${smush_args}.tst)
-    if(${_config} STREQUAL ${HIP_CTEST_CONFIG_DEFAULT})
-        add_test(NAME ${testname} COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN})
-    else()
-        add_test(NAME ${testname} CONFIGURATIONS ${_config} COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN})
-    endif()
-    set_tests_properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "PASSED" ENVIRONMENT HIP_PATH=${HIP_ROOT_DIR})
-    set_tests_properties(${testname} PROPERTIES SKIP_RETURN_CODE 127 ENVIRONMENT HIP_PATH=${HIP_ROOT_DIR})
-endmacro()
-
-macro(MAKE_NAMED_TEST _config exe testname)
-    if(${_config} STREQUAL ${HIP_CTEST_CONFIG_DEFAULT})
-        add_test(NAME ${testname} COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN})
-    else()
-        add_test(NAME ${testname} CONFIGURATIONS ${_config} COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN})
-    endif()
-    set_tests_properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "PASSED" ENVIRONMENT HIP_PATH=${HIP_ROOT_DIR})
+    make_named_test(${_config} ${exe} ${testname} ${ARGN})
 endmacro()
 #-------------------------------------------------------------------------------


Remove useless folder.

Remove useless folder.

--- rpi/receiver/rfprotocol/test/CTestTestfile.cmake
+++ rpi/receiver/rfprotocol/test/CTestTestfile.cmake
@@ -1,6 +0,0 @@
-# CMake generated Testfile for
-# Source directory: /home/jedi/domos/lib/rfprotocol/test
-# Build directory: /home/jedi/domos/rpi/receiver/rfprotocol/test
-#
-# This file includes the relevant testing commands required for
-# testing this directory and lists subdirectories to be tested as well.


Update to Ninja 1.10.0.gfb670.kitware.jobserver-1 to include signed windows executable

See #33

--- NinjaUrls.cmake
+++ NinjaUrls.cmake
@@ -22,4 +22,4 @@
 set(win32_binary_sha256 "NA")

 set(win64_binary_url    "https://github.com/Kitware/ninja/releases/download/v1.10.0.gfb670.kitware.jobserver-1/ninja-1.10.0.gfb670.kitware.jobserver-1_i686-pc-windows-msvc.zip")
-set(win64_binary_sha256 "47dc97d6f281108927e2dbeaeb3f61b804a8ed5a7543e7ca9499f807768cf00f")
+set(win64_binary_sha256 "7f54cd8d72306b14bcb3518e21bc0c5f9d8ec31dea7ccd340cbfade070e30019")


changes warn

changes warn

--- cmaki.cmake
+++ cmaki.cmake
@@ -328,6 +328,10 @@
 		add_definitions(-Wno-error=write-strings)
 		add_definitions(-Wno-error=format-nonliteral)

+		# sdl2
+		add_definitions(-Wno-error=sign-conversion)
+		add_definitions(-Wno-error=discarded-qualifiers)
+
 		# TODO: remove
 		add_definitions(-Wno-error=reorder)


fix compiler flag logic

fix compiler flag logic

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -68,26 +68,29 @@

 # If not on Windows, disable some warnings with Connext's generated code
 if(NOT WIN32)
+  set(_connext_compile_flags)
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(_connext_compile_flags
-      "-Wno-deprecated-register "
-      "-Wno-mismatched-tags "
-      "-Wno-return-type-c-linkage "
-      "-Wno-sometimes-uninitialized "
-      "-Wno-tautological-compare "
-      "-Wno-unused-variable "
+      "-Wno-deprecated-register"
+      "-Wno-mismatched-tags"
+      "-Wno-return-type-c-linkage"
+      "-Wno-sometimes-uninitialized"
+      "-Wno-tautological-compare"
+      "-Wno-unused-variable"
     )
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     set(_connext_compile_flags
-      "-Wno-unused-but-set-variable "
-      "-Wno-unused-variable "
+      "-Wno-unused-but-set-variable"
+      "-Wno-unused-variable"
     )
   endif()
-  string(REPLACE ";" " " _connext_compile_flags ${_connext_compile_flags})
-  foreach(_gen_file ${_generated_msg_files} ${_generated_srv_files})
-    set_source_files_properties("${_gen_file}"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
-  endforeach()
+  if(NOT "${_opensplice_compile_flags} " STREQUAL " ")
+    string(REPLACE ";" " " _connext_compile_flags "${_connext_compile_flags}")
+    foreach(_gen_file ${_generated_msg_files} ${_generated_srv_files})
+      set_source_files_properties("${_gen_file}"
+        PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
+    endforeach()
+  endif()
 endif()

 set(_dependency_files "")


remove extra ) from xpmswwix.cmake xpCpackWixMsm()

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

--- modules/xpmswwix.cmake
+++ modules/xpmswwix.cmake
@@ -22,7 +22,7 @@
     if(NOT DEFINED msmDir)
       message(FATAL_ERROR "must define msmDir to a valid merge module directory")
     endif()
-    if(NOT EXISTS ${msmDir} OR NOT IS_DIRECTORY ${msmDir}))
+    if(NOT EXISTS ${msmDir} OR NOT IS_DIRECTORY ${msmDir})
       message(FATAL_ERROR "msmDir ('${msmDir}') does not exist or is not a directory")
     endif()
   else()


Bump to 1.7.16

Bump to 1.7.16

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "15")
+SET(LIBREPO_PATCH "16")


Bumped up wxWidgets version on OSX for X86.

--- deps/wxWidgets/wxWidgets.cmake
+++ deps/wxWidgets/wxWidgets.cmake
@@ -1,4 +1,4 @@
-if (APPLE AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
+if (APPLE)
     # The new OSX 11 (Big Sur) is not compatible with wxWidgets 3.1.3.
     # Let's use patched wxWidgets 3.1.4, even though it is not quite tested.
     set(_wx_git_tag v3.1.4-patched)


todo comment

todo comment

--- cmake/BoostLibInstaller.cmake
+++ cmake/BoostLibInstaller.cmake
@@ -78,6 +78,9 @@

         if (EXISTS "${install_dir}/libs/${lib}/build/")
             # Has source
+
+            # TODO: Command has to be a dummy if the library file is already exists!
+
             set(jam_lib boost_${lib}_jam)
             set(boost_lib boost_${lib})

@@ -142,6 +145,7 @@
     endif()

     # b2 headers
+    # TODO: Generate only if doesn't exists
     message(STATUS "Generating headers ...")
     execute_process(COMMAND ${b2_command} headers WORKING_DIRECTORY ${install_dir} RESULT_VARIABLE err OUTPUT_VARIABLE err_msg)
     if(err)


Fix CI compile (#5526)

Fix CI compile (#5526)

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -86,7 +86,7 @@
         UPDATE_COMMAND      ""
         CONFIGURE_COMMAND   ""
     )
-
+    SET(CBLAS_PROVIDER openblas)
     IF(WITH_C_API)
         INSTALL(DIRECTORY ${CBLAS_INC_DIR} DESTINATION third_party/openblas)
         # Because libopenblas.a is a symbolic link of another library, thus need to


Yet another attempt to fix curl lib issues

--- cmake/modules/BuildCURL.cmake
+++ cmake/modules/BuildCURL.cmake
@@ -7,6 +7,7 @@
     GIT_TAG cb529b713f4882ac65a074ae8d87faa41d19168e
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CURL_INSTALL_DIR} -DBUILD_TESTING=OFF -DHTTP_ONLY=ON
     INSTALL_DIR ${CURL_INSTALL_DIR}
+    BUILD_BYPRODUCTS ${CURL_INSTALL_DIR}/lib/libcurl$<$<CONFIG:Debug>:-d>_imp.lib
   )
 else()
   set(_byproducts
@@ -26,15 +27,15 @@
 ExternalProject_Get_Property(
   curl
   install_dir
+  build_byproducts
 )

 set(CURL_INCLUDE_DIRS "${install_dir}/include")

 if(WIN32)
-  set(CURL_LIBRARY_POSTFIX "$<$<CONFIG:Debug>:-d>")
-  set(CURL_LIBRARY "${install_dir}/lib/libcurl${CURL_LIBRARY_POSTFIX}_imp.lib>")
+  set(CURL_LIBRARY "${build_byproducts}")
   set(CURL_LIBRARIES "${CURL_LIBRARY}")
-  set(CURL_INSTALL_LIBS "${install_dir}/bin/libcurl${CURL_LIBRARY_POSTFIX}.dll")
+  set(CURL_INSTALL_LIBS "${install_dir}/bin/libcurl.dll")
 else()
   set(CURL_LIBRARY "${install_dir}/lib/libcurl.so")
   set(CURL_LIBRARIES "${CURL_LIBRARY}")


CPP-882 - Correct pthread compiler flag for older CMake versions (#11)

--- cmake/modules/CppDriver.cmake
+++ cmake/modules/CppDriver.cmake
@@ -425,13 +425,13 @@
     message(FATAL_ERROR "Unable to Locate libuv: libuv v1.0.0+ is required")
   endif()

-  if (LIBUV_VERSION VERSION_LESS "1.0")
+  if(LIBUV_VERSION VERSION_LESS "1.0")
     message(FATAL_ERROR "Libuv version ${LIBUV_VERSION} is not "
       " supported. Please updgrade to libuv version 1.0 or greater in order to "
       "utilize the driver.")
   endif()

-  if (LIBUV_VERSION VERSION_LESS "1.6")
+  if(LIBUV_VERSION VERSION_LESS "1.6")
     message(WARNING "Libuv version ${LIBUV_VERSION} does not support custom "
     "memory allocators (version 1.6 or greater required)")
   endif()
@@ -441,10 +441,16 @@
   set(CASS_LIBS ${CASS_LIBS} ${LIBUV_LIBRARIES})

   # libuv and gtests require thread library
-  set (THREADS_PREFER_PTHREAD_FLAG 1)
+  set(CMAKE_THREAD_PREFER_PTHREAD 1)
+  set(THREADS_PREFER_PTHREAD_FLAG 1)
   find_package(Threads REQUIRED)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
+  if(NOT WIN32 AND ${CMAKE_VERSION} VERSION_LESS "3.1.0")
+    # FindThreads in CMake versions < v3.1.0 do not have the THREADS_PREFER_PTHREAD_FLAG to prefer -pthread
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+  endif()
 endmacro()

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


Check that Boost.Iostreams is usuable for an external BOOST package

--- cmake/modules/FindBOOST.cmake
+++ cmake/modules/FindBOOST.cmake
@@ -78,6 +78,51 @@
   SET(BOOST_VERSION
     "${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_SUBMINOR}"
     )
+
+  IF(DEAL_II_WITH_ZLIB)
+    #
+    # Test that Boost.Iostreams is usuable.
+    #
+    RESET_CMAKE_REQUIRED()
+    PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
+    PUSH_CMAKE_REQUIRED("-L${Boost_LIBRARY_DIRS}")
+    SET(CMAKE_REQUIRED_LIBRARIES "-lboost_iostreams")
+    CHECK_CXX_SOURCE_COMPILES(
+      "
+      #include <string>
+      #include <boost/iostreams/device/back_inserter.hpp>
+      #include <boost/iostreams/filter/gzip.hpp>
+      #include <boost/iostreams/filtering_stream.hpp>
+
+      int main()
+      {
+        std::string decompressed_buffer;
+        char test[1] = {'c'};
+
+        boost::iostreams::filtering_ostream decompressing_stream;
+        decompressing_stream.push(boost::iostreams::gzip_decompressor());
+        decompressing_stream.push(boost::iostreams::back_inserter(decompressed_buffer));
+        decompressing_stream.write (test, 1);
+      }
+      "
+      DEAL_II_BOOST_IOSTREAMS_USUABLE
+      )
+    MESSAGE(STATUS "${DEAL_II_BOOST_IOSTREAMS_USUABLE}")
+    IF(${DEAL_II_BOOST_IOSTREAMS_USUABLE})
+      MESSAGE(STATUS "Boost.Iostreams is usuable.")
+    ELSE()
+      MESSAGE(STATUS
+              "DEAL_II_WITH_ZLIB=ON requires Boost.Iostreams to be compiled "
+              "with zlib support but a simple test failed! "
+              "Therefore, the bundled boost package is used."
+             )
+      SET(Boost_FOUND FALSE)
+      SET(Boost_LIBRARIES "")
+      SET(Boost_INCLUDE_DIRS "")
+    ENDIF()
+    RESET_CMAKE_REQUIRED()
+  ENDIF()
+
 ENDIF()

 DEAL_II_PACKAGE_HANDLE(BOOST
@@ -85,7 +130,7 @@
   INCLUDE_DIRS REQUIRED Boost_INCLUDE_DIRS
   USER_INCLUDE_DIRS Boost_INCLUDE_DIRS
   CLEAR
-    Boost_DIR Boost_INCLUDE_DIR Boost_IOSTREAMS_LIBRARY_DEBUG
+    Boost_DIR Boost_INCLUDE_DIRS Boost_IOSTREAMS_LIBRARY_DEBUG
     Boost_IOSTREAMS_LIBRARY_RELEASE Boost_LIBRARY_DIR
     Boost_SERIALIZATION_LIBRARY_DEBUG Boost_SERIALIZATION_LIBRARY_RELEASE
     Boost_SYSTEM_LIBRARY_DEBUG Boost_SYSTEM_LIBRARY_RELEASE


Fix for ROOT-7438 - Make configuration fails for centos 6 Make use of command lsb_release to determine the Linux distribution and version

--- cmake/modules/RootCPack.cmake
+++ cmake/modules/RootCPack.cmake
@@ -79,24 +79,22 @@
 elseif(WIN32)
   set(OS_NAME_VERSION win32)
 else()
-  execute_process(COMMAND cat /etc/issue OUTPUT_VARIABLE issue OUTPUT_STRIP_TRAILING_WHITESPACE)
-  if(issue MATCHES Ubuntu)
-    string(REGEX REPLACE ".*Ubuntu ([0-9]+)[.].*" "\\1" osvers "${issue}")
+  execute_process(COMMAND lsb_release -is OUTPUT_VARIABLE osid OUTPUT_STRIP_TRAILING_WHITESPACE)
+  execute_process(COMMAND lsb_release -rs OUTPUT_VARIABLE osvers OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if(osid MATCHES Ubuntu)
+    string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
     set(OS_NAME_VERSION Linux-ubuntu${osvers}-${arch})
-  elseif(issue MATCHES SLC)
-    string(REGEX REPLACE ".*release ([0-9]+)[.].*" "\\1" osvers "${issue}")
+  elseif(osid MATCHES Scientific)
+    string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
     set(OS_NAME_VERSION Linux-slc${osvers}-${arch})
-  elseif(issue MATCHES Fedora)
-    string(REGEX REPLACE ".*release ([0-9]+)[. ].*" "\\1" osvers "${issue}")
+  elseif(osid MATCHES Fedora)
+    string(REGEX REPLACE "([0-9]+)" "\\1" osvers "${osvers}")
     set(OS_NAME_VERSION Linux-fedora${osvers}-${arch})
+  elseif(osid MATCHES CentOS)
+    string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
+    set(OS_NAME_VERSION Linux-cc${osvers}-${arch})
   else()
-    execute_process(COMMAND cat /etc/os-release OUTPUT_VARIABLE os_release OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if(os_release MATCHES "centos")
-      string(REGEX REPLACE ".*VERSION_ID=\"([0-9]+).*" "\\1" osvers "${os_release}")
-      set(OS_NAME_VERSION Linux-cc${osvers}-${arch})
-    else()
-      set(OS_NAME_VERSION Linux-${arch})
-    endif()
+    set(OS_NAME_VERSION Linux-${osid}${osvers}${arch})
   endif()
 endif()
 #---Build type---------------------------------------------------------------------------------------


cpack: add maintainer and missing package dependency

--- scripts/cmake/ElektraPackaging.cmake
+++ scripts/cmake/ElektraPackaging.cmake
@@ -8,6 +8,7 @@
 set (CPACK_DEBIAN_PACKAGE_VERSION "${PROJECT_VERSION}")
 set (CPACK_DEBIAN_PACKAGE_RELEASE "1")
 set (CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
+set (CPACK_DEBIAN_PACKAGE_MAINTAINER "Pino Toscano <pino@debian.org>")

 set (
 	CPACK_COMPONENTS_ALL
@@ -45,7 +46,8 @@
 foreach(component ${CPACK_COMPONENTS_ALL})
 	list(APPEND DBG_PACKAGE_NAMES "${component}-dbgsym")
 endforeach()
-list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^elektra-doc.*") # elektra-doc doesn't contain dbgsym
+# exclude all packages without dbgsym
+list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^elektra-doc.*")
 list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^elektra-dbg.*")
 list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^libelektra-dev.*")
 list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^libelektra4-all.*")
@@ -268,11 +270,11 @@
 		set (CPACK_DEBIAN_LUA-ELEKTRA_PACKAGE_SECTION "interpreters")
 		set (CPACK_DEBIAN_LUA-ELEKTRA_DEBUGINFO_PACKAGE "ON")

-		# maybe add python3:depends? (see control file)
 		set (CPACK_DEBIAN_PYTHON3-ELEKTRA_PACKAGE_NAME "python3-elektra")
 		set (CPACK_COMPONENT_PYTHON3-ELEKTRA_DISPLAY_NAME "python3-elektra")
 		set (CPACK_COMPONENT_PYTHON3-ELEKTRA_DESCRIPTION "This package contains the Python 3 bindings.")
 		set (CPACK_COMPONENT_PYTHON3-ELEKTRA_DEPENDS "libelektra4")
+		set (CPACK_DEBIAN_PYTHON3-ELEKTRA_PACKAGE_DEPENDS "python3")
 		set (CPACK_DEBIAN_PYTHON3-ELEKTRA_PACKAGE_SECTION "python")
 		set (CPACK_DEBIAN_PYTHON3-ELEKTRA_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
 		file (GLOB CONTROL_FILES_PYTHON3-ELEKTRA "${CMAKE_SOURCE_DIR}/scripts/packaging/debian-control/python3-elektra/*")


Update Freetype library names.

Update Freetype library names.

--HG--
branch : v1-8

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


install: Respect installation prefix for systemd unit file

When invoking pkg-config, make sure that we substitute the target root
with the intended location of the installation. Trying to install into a
location where systemd itself lives does not work when:

- installing into any staging dir in general (e.g., package builds)
- the developer is using their own non-system prefixes
- the rootfs is read-only (such as when using ostree)
- on NixOS or any distro which puts each package into a spearate root

Rather than requiring everyone to override this variable, make sure it's
relative to the installation target.

See-also: https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
Bug: https://gitlab.kitware.com/cmake/cmake/-/issues/19632
Fixes: c98389a7 sysrepo-plugind BUGFIX generate systemd service file
Fixes: 832e1428 sysrepo-plugind UPDATE proper systemd service file
Fixes: 040e3964 sysrepo-plugind BUGFIX missing service file

--- CMakeModules/FindLibSystemd.cmake
+++ CMakeModules/FindLibSystemd.cmake
@@ -67,7 +67,7 @@
     )

     if(NOT SYSTEMD_UNIT_DIR)
-        execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=systemdsystemunitdir systemd
+        execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --define-variable=rootprefix=${CMAKE_INSTALL_PREFIX} --variable=systemdsystemunitdir systemd
                 OUTPUT_VARIABLE SYSTEMD_UNIT_DIR)
         string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_UNIT_DIR "${SYSTEMD_UNIT_DIR}")
     endif()


Fix build jit error when interp is disabled (#1008)

When building JIT, interpreter must be enabled, we enabled interpreter
explicitly in config_common.cmake if it is disabled.

--- build-scripts/config_common.cmake
+++ build-scripts/config_common.cmake
@@ -121,6 +121,9 @@
 message ("     CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE})
 if (WAMR_BUILD_INTERP EQUAL 1)
   message ("     WAMR Interpreter enabled")
+elseif (WAMR_BUILD_JIT EQUAL 1)
+  set (WAMR_BUILD_INTERP 1)
+  message ("     WAMR Interpreter enabled due to WAMR JIT is enabled")
 else ()
   message ("     WAMR Interpreter disabled")
 endif ()