MAINT: install the CMake modules in a better place ('/usr/share/cmake/Modules/').

--- cmake/sara_installation_settings.cmake
+++ cmake/sara_installation_settings.cmake
@@ -19,10 +19,10 @@
           DESTINATION ${SARA_INSTALL_DIR}/include/DO/Sara
           COMPONENT Sources)
   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake
-          DESTINATION ${SARA_INSTALL_DIR}/share/DO/Sara
+          DESTINATION ${SARA_INSTALL_DIR}/share/cmake/Modules
           COMPONENT Sources)
   install(DIRECTORY ${DO_Sara_DIR}/src/DO
-          DESTINATION ${SARA_INSTALL_DIR}/include/
+          DESTINATION ${SARA_INSTALL_DIR}/include
           COMPONENT Sources)
   install(FILES ${CMAKE_BINARY_DIR}/src/DO/Sara/Defines.hpp
           DESTINATION ${SARA_INSTALL_DIR}/include/DO/Sara


Fix cmake lock issue in build.cmake.

Fix cmake lock issue in build.cmake.

--- src/inserts/build.cmake
+++ src/inserts/build.cmake
@@ -18,7 +18,11 @@

 set(lock ${BUILD_DIR}/cppan_build.lock)

-file(LOCK ${lock} RESULT_VARIABLE lock_result)
+file(
+    LOCK ${lock}
+    GUARD FILE # CMake bug workaround https://gitlab.kitware.com/cmake/cmake/issues/16295
+    RESULT_VARIABLE lock_result
+)
 if (NOT ${lock_result} EQUAL 0)
     message(FATAL_ERROR "Lock error: ${lock_result}")
 endif()


[CMake][Python] The Python installation directory is now the standard one.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -113,8 +113,6 @@
   # Offer the user the choice of overriding the installation directories
   set (INSTALL_LIB_DIR ${LIBDIR} CACHE PATH
 	"Installation directory for libraries")
-  set (INSTALL_PY_LIB_DIR ${LIBDIR}/python${PYTHONLIBS_VERSION}/${PROJECT_NAME}
-	CACHE PATH "Installation directory for Python libraries")
   set (INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
   set (INSTALL_LIBEXEC_DIR CACHE PATH
 	"Installation directory for internal executables")
@@ -498,7 +496,11 @@
       PYTHONLIBS_VERSION "${PYTHONLIBS_LIB_FILENAME}")
 	message (STATUS "Found PythonLibs ${PYTHONLIBS_VERSION}")

-    # Update the list of include directories for the project
+	# Set the Python installation directory
+	set (INSTALL_PY_LIB_DIR ${INSTALL_LIB_DIR}/python${PYTHONLIBS_VERSION}/site-packages/libpy${PROJECT_NAME}
+	  CACHE PATH "Installation directory for Python libraries")
+
+	# Update the list of include directories for the project
     include_directories (${PYTHON_INCLUDE_DIRS})

     # Update the list of dependencies for the project
@@ -1420,7 +1422,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/${PACKAGE})
+  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/site-packages/libpy${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)


[Build] Added the support for the NCurses library.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -339,6 +339,10 @@
       get_readline (${_arg_version})
     endif (${_arg_lower} STREQUAL "readline")

+    if (${_arg_lower} STREQUAL "curses")
+      get_curses (${_arg_version})
+    endif (${_arg_lower} STREQUAL "curses")
+
     if (${_arg_lower} STREQUAL "mysql")
       get_mysql (${_arg_version})
     endif (${_arg_lower} STREQUAL "mysql")
@@ -612,6 +616,34 @@
   endif (READLINE_FOUND)

 endmacro (get_readline)
+
+# ~~~~~~~~~~ (N)Curses ~~~~~~~~~
+macro (get_curses)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires (N)Curses-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires (N)Curses without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  set (CURSES_FOUND False)
+
+  set (CURSES_NEED_NCURSES True)
+  find_package (Curses ${_required_version} REQUIRED)
+  if (CURSES_LIBRARY)
+    set (CURSES_FOUND True)
+  endif (CURSES_LIBRARY)
+
+  if (CURSES_FOUND)
+    # Update the list of include directories for the project
+    include_directories (${CURSES_INCLUDE_DIR})
+
+    # Update the list of dependencies for the project
+    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${CURSES_LIBRARY})
+  endif (CURSES_FOUND)
+
+endmacro (get_curses)

 # ~~~~~~~~~~ MySQL ~~~~~~~~~
 macro (get_mysql)
@@ -2184,6 +2216,17 @@
     message (STATUS "  - READLINE_LIBRARY .............. : ${READLINE_LIBRARY}")
   endif (READLINE_FOUND)
 endmacro (display_readline)
+
+# (N)Curses
+macro (display_curses)
+  if (CURSES_FOUND)
+    message (STATUS)
+    message (STATUS "* (N)Curses:")
+    message (STATUS "  - CURSES_VERSION .............. : ${CURSES_VERSION}")
+    message (STATUS "  - CURSES_INCLUDE_DIR .......... : ${CURSES_INCLUDE_DIR}")
+    message (STATUS "  - CURSES_LIBRARY .............. : ${CURSES_LIBRARY}")
+  endif (CURSES_FOUND)
+endmacro (display_curses)

 # MySQL
 macro (display_mysql)
@@ -2507,6 +2550,7 @@
   display_boost ()
   display_xapian ()
   display_readline ()
+  display_curses ()
   display_mysql ()
   display_soci ()
   display_stdair ()


BUG: Bump TubeTK

BUG: Bump TubeTK

* Update baselines
* Remove unused application
* Add new WriteTubesToPolyData method

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -49,5 +49,5 @@
 "
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG "08f29e55cc0384855d8d2c70b2628c405a7c25d2"
+  GIT_TAG "b0c153f4c2eb0033f218e9706a345a46c05e30ba"
   )


CMake: Fix openmp-simd configuration

CMake: Fix openmp-simd configuration

This enables openmp simd for Clang version 3.6 or newer (and the
corresponding version for XCode). Further, it unconditionally disables
the openmp check for any older clang version - checking for openmp support
with the flag only is unreliable

--- cmake/checks/check_01_cpu_features.cmake
+++ cmake/checks/check_01_cpu_features.cmake
@@ -217,35 +217,41 @@
 #
 # OpenMP 4.0 can be used for vectorization (supported by gcc-4.9.1 and
 # later). Only the vectorization instructions
-# are allowed, the threading must done through TBB.
-#
-
-IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
+# are allowed, the threading must be done through TBB.
+#
+
+# Pick up the correct candidate keyword for the current compiler:
+SET(_keyword "")
+IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+  IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "15" )
+    SET(_keyword "qopenmp")
+  ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "14" )
+    SET(_keyword "openmp")
+  ENDIF()
+
+ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+  # clang-3.6.1 or newer, or XCode version 6.3, or newer.
+  IF( ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.6"
+        AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0" )
+      OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6.2")
+    SET(_keyword "openmp")
+  ENDIF()
+
+ELSE()
+  SET(_keyword "fopenmp")
+
+ENDIF()
+
+IF(NOT "${_keyword}" STREQUAL "")
+  CHECK_CXX_COMPILER_FLAG("-${_keyword}-simd" DEAL_II_HAVE_OPENMP_SIMD)
+ENDIF()
+
+SET(DEAL_II_OPENMP_SIMD_PRAGMA " ")
+IF(DEAL_II_HAVE_OPENMP_SIMD)
+  ADD_FLAGS(DEAL_II_CXX_FLAGS "-${_keyword}-simd")
+  # Intel is special:
   IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
-    # there is no openmp-simd support in Intel 13 and the flag got renamed in 15+
-    IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "15")
-      CHECK_CXX_COMPILER_FLAG("-qopenmp-simd" DEAL_II_HAVE_OPENMP_SIMD)
-    ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "14")
-      CHECK_CXX_COMPILER_FLAG("-openmp-simd" DEAL_II_HAVE_OPENMP_SIMD)
-    ENDIF()
-  ELSE()
-    CHECK_CXX_COMPILER_FLAG("-fopenmp-simd" DEAL_II_HAVE_OPENMP_SIMD)
-  ENDIF()
-ENDIF()
-
-IF(DEAL_II_HAVE_OPENMP_SIMD)
-  IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
-    IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "15")
-      ADD_FLAGS(DEAL_II_CXX_FLAGS "-qopenmp-simd")
-      ADD_FLAGS(DEAL_II_LINKER_FLAGS "-qopenmp")
-    ELSE()
-      ADD_FLAGS(DEAL_II_CXX_FLAGS "-openmp-simd")
-      ADD_FLAGS(DEAL_II_LINKER_FLAGS "-openmp")
-    ENDIF()
-  ELSE()
-    ADD_FLAGS(DEAL_II_CXX_FLAGS "-fopenmp-simd")
+    ADD_FLAGS(DEAL_II_LINKER_FLAGS "-${_keyword}")
   ENDIF()
   SET(DEAL_II_OPENMP_SIMD_PRAGMA "_Pragma(\"omp simd\")")
-ELSE()
-  SET(DEAL_II_OPENMP_SIMD_PRAGMA " ")
-ENDIF()
+ENDIF()


allow sdl2 build folder to be named differently

--- cmake-modules/FindSDL2.cmake
+++ cmake-modules/FindSDL2.cmake
@@ -80,6 +80,7 @@
 	/opt
 	${SDL2_HINT_ROOT}
 	${SDL2_HINT_ROOT}/build
+	${SDL2_HINT_ROOT}/cmake-build
 	${SDL2_HINT_BUILD}
 )


[cmake] gcc>=4.5 is required

[cmake] gcc>=4.5 is required

--- cmake/CXXCompilerSetup.cmake
+++ cmake/CXXCompilerSetup.cmake
@@ -39,8 +39,8 @@
 # Check compiler version.
 if(CMAKE_COMPILER_IS_GNUCXX)
   detect_cxx_compiler_version(compiler_version)
-  if(compiler_version VERSION_LESS "4.4")
-    message(FATAL_ERROR "gcc greater than 4.4 needed")
+  if(compiler_version VERSION_LESS "4.5")
+    message(FATAL_ERROR "gcc greater than 4.5 needed")
   endif()
 endif()


Set a variable appropriately

Set a variable appropriately

--- cmake/Modules/frontend.cmake
+++ cmake/Modules/frontend.cmake
@@ -8,6 +8,7 @@
 		option(LIBCACA_ENABLE "Enable libcaca frontend" on)
 	endif()
 	if(LIBCACA_ENABLE)
+		set(HAVE_LIBCACA 1)
 		include_directories(${libcaca_INCLUDE_DIR})

 		file(GLOB LIBCACA_FRONTEND_SOURCES src/frontends/caca/*.c)


re-enable automatic CC detection on Jetson      * treat both CMAKE_C_COMPILER and c_compiler_realpath as candidate

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -106,7 +106,18 @@
   if(OPENCV_CUDA_DETECTION_NVCC_FLAGS MATCHES "-ccbin")
     # already specified by user
   elseif(CUDA_HOST_COMPILER AND EXISTS "${CUDA_HOST_COMPILER}")
-    LIST(APPEND OPENCV_CUDA_DETECTION_NVCC_FLAGS -ccbin "${CUDA_HOST_COMPILER}")
+    get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH)
+    # C compiler doesn't work with --run option, forcing C++ compiler instead
+    if(CUDA_HOST_COMPILER STREQUAL c_compiler_realpath OR CUDA_HOST_COMPILER STREQUAL CMAKE_C_COMPILER)
+      if(DEFINED CMAKE_CXX_COMPILER)
+        get_filename_component(cxx_compiler_realpath "${CMAKE_CXX_COMPILER}" REALPATH)
+        LIST(APPEND OPENCV_CUDA_DETECTION_NVCC_FLAGS -ccbin "${cxx_compiler_realpath}")
+      else()
+        message(STATUS "CUDA: CMAKE_CXX_COMPILER is not available. You may need to specify CUDA_HOST_COMPILER.")
+      endif()
+    else()
+      LIST(APPEND OPENCV_CUDA_DETECTION_NVCC_FLAGS -ccbin "${CUDA_HOST_COMPILER}")
+    endif()
   elseif(WIN32 AND CMAKE_LINKER) # Workaround for VS cl.exe not being in the env. path
     get_filename_component(host_compiler_bindir ${CMAKE_LINKER} DIRECTORY)
     LIST(APPEND OPENCV_CUDA_DETECTION_NVCC_FLAGS -ccbin "${host_compiler_bindir}")


Install cvconfig.h file

Install cvconfig.h file

--- cmake/OpenCVGenHeaders.cmake
+++ cmake/OpenCVGenHeaders.cmake
@@ -1,5 +1,6 @@
 # platform-specific config file
 configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h")
+install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)

 # ----------------------------------------------------------------------------
 #  opencv_modules.hpp based on actual modules list


fix cmake expressions error, test=develop (#32815)

--- cmake/external/warpctc.cmake
+++ cmake/external/warpctc.cmake
@@ -78,6 +78,21 @@
                          -DCMAKE_INSTALL_PREFIX:PATH=${WARPCTC_INSTALL_DIR}
     )
 else()
+    if(WIN32)
+        set(WARPCTC_C_FLAGS $<FILTER:${CMAKE_C_FLAGS},EXCLUDE,/Zc:inline>)
+        set(WARPCTC_C_FLAGS_DEBUG $<FILTER:${CMAKE_C_FLAGS_DEBUG},EXCLUDE,/Zc:inline>)
+        set(WARPCTC_C_FLAGS_RELEASE $<FILTER:${CMAKE_C_FLAGS_RELEASE},EXCLUDE,/Zc:inline>)
+        set(WARPCTC_CXX_FLAGS $<FILTER:${CMAKE_CXX_FLAGS},EXCLUDE,/Zc:inline>)
+        set(WARPCTC_CXX_FLAGS_RELEASE $<FILTER:${CMAKE_CXX_FLAGS_RELEASE},EXCLUDE,/Zc:inline>)
+        set(WARPCTC_CXX_FLAGS_DEBUG $<FILTER:${CMAKE_CXX_FLAGS_DEBUG},EXCLUDE,/Zc:inline>)
+    else()
+        set(WARPCTC_C_FLAGS ${CMAKE_C_FLAGS})
+        set(WARPCTC_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+        set(WARPCTC_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
+        set(WARPCTC_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+        set(WARPCTC_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
+        set(WARPCTC_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
+    endif()
     ExternalProject_Add(
         extern_warpctc
         ${EXTERNAL_PROJECT_LOG_ARGS}
@@ -90,12 +105,12 @@
         BUILD_ALWAYS    1
         CMAKE_ARGS      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                         -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-                        -DCMAKE_C_FLAGS=$<FILTER:${CMAKE_C_FLAGS},EXCLUDE,/Zc:inline>
-                        -DCMAKE_C_FLAGS_DEBUG=$<FILTER:${CMAKE_C_FLAGS_DEBUG},EXCLUDE,/Zc:inline>
-                        -DCMAKE_C_FLAGS_RELEASE=$<FILTER:${CMAKE_C_FLAGS_RELEASE},EXCLUDE,/Zc:inline>
-                        -DCMAKE_CXX_FLAGS=$<FILTER:${CMAKE_CXX_FLAGS},EXCLUDE,/Zc:inline>
-                        -DCMAKE_CXX_FLAGS_RELEASE=$<FILTER:${CMAKE_CXX_FLAGS_RELEASE},EXCLUDE,/Zc:inline>
-                        -DCMAKE_CXX_FLAGS_DEBUG=$<FILTER:${CMAKE_CXX_FLAGS_DEBUG},EXCLUDE,/Zc:inline>
+                        -DCMAKE_C_FLAGS=${WARPCTC_C_FLAGS}
+                        -DCMAKE_C_FLAGS_DEBUG=${WARPCTC_C_FLAGS_DEBUG}
+                        -DCMAKE_C_FLAGS_RELEASE=${WARPCTC_C_FLAGS_RELEASE}
+                        -DCMAKE_CXX_FLAGS=${WARPCTC_CXX_FLAGS}
+                        -DCMAKE_CXX_FLAGS_RELEASE=${WARPCTC_CXX_FLAGS_RELEASE}
+                        -DCMAKE_CXX_FLAGS_DEBUG=${WARPCTC_CXX_FLAGS_DEBUG}
                         -DCMAKE_INSTALL_PREFIX=${WARPCTC_INSTALL_DIR}
                         -DWITH_GPU=${WITH_GPU}
                         -DWITH_ROCM=${WITH_ROCM}


cmake: _compile_swift_files now accepts multiple output files.

Swift SVN r26257

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -278,9 +278,18 @@
     ${ARGN})

   # Check arguments.
-  if (NOT IS_ABSOLUTE "${SWIFTFILE_OUTPUT}")
-    message(FATAL_ERROR "OUTPUT should be an absolute path")
-  endif()
+  list(LENGTH SWIFTFILE_OUTPUT num_outputs)
+  list(GET SWIFTFILE_OUTPUT 0 first_output)
+
+  if (${num_outputs} EQUAL 0)
+    message(FATAL_ERROR "OUTPUT must not be empty")
+  endif()
+
+  foreach(output ${SWIFTFILE_OUTPUT})
+    if (NOT IS_ABSOLUTE "${output}")
+      message(FATAL_ERROR "OUTPUT should be an absolute path")
+    endif()
+  endforeach()

   if(SWIFTFILE_IS_MAIN AND SWIFTFILE_IS_STDLIB)
     message(FATAL_ERROR "Cannot set both IS_MAIN and IS_STDLIB")
@@ -376,9 +385,18 @@

   list(APPEND swift_flags ${SWIFTFILE_FLAGS})

-  get_filename_component(objdir "${SWIFTFILE_OUTPUT}" PATH)
-  set(command_create_dirs
+  set(obj_dirs)
+  foreach(output ${SWIFTFILE_OUTPUT})
+    get_filename_component(objdir "${output}" PATH)
+    list(APPEND obj_dirs "${objdir}")
+  endforeach()
+  list(REMOVE_DUPLICATES obj_dirs)
+
+  set(command_create_dirs)
+  foreach(objdir ${obj_dirs})
+    list(APPEND command_create_dirs
       COMMAND "${CMAKE_COMMAND}" -E make_directory "${objdir}")
+  endforeach()

   set(module_file)
   set(module_doc_file)
@@ -390,7 +408,7 @@
       list(APPEND swift_flags
           "-module-name" "${module_name}")
     else()
-      get_filename_component(module_name "${SWIFTFILE_OUTPUT}" NAME_WE)
+      get_filename_component(module_name "${first_output}" NAME_WE)
     endif()
     if(SWIFTFILE_MODULE_DIR)
       set(module_dir "${SWIFTFILE_MODULE_DIR}")
@@ -456,6 +474,13 @@
     set(swift_compiler_tool_dep "swift")
   endif()

+  # If there are more than one output files, we assume that they are specified
+  # otherwise e.g. with an output file map.
+  set(output_option)
+  if (${num_outputs} EQUAL 1)
+    set(output_option "-o" ${first_output})
+  endif()
+
   add_custom_command_target(
       dependency_target
       ${command_create_dirs}
@@ -465,19 +490,19 @@
       COMMAND
         "${line_directive_tool}" "${source_files}" --
         "${swift_compiler_tool}" "-c" ${swift_flags}
-        "-o" "${SWIFTFILE_OUTPUT}" "${source_files}"
+        ${output_option} "${source_files}"
       OUTPUT
-        "${SWIFTFILE_OUTPUT}" "${module_file}" "${module_doc_file}"
+        ${SWIFTFILE_OUTPUT} "${module_file}" "${module_doc_file}"
         ${apinote_files}
       DEPENDS
         "${swift_compiler_tool}" ${swift_compiler_tool_dep}
         ${source_files} ${SWIFTFILE_DEPENDS}
         ${swift_ide_test_dependency} ${depends_create_apinotes}
-      COMMENT "Compiling ${SWIFTFILE_OUTPUT}")
+      COMMENT "Compiling ${first_output}")
   set("${dependency_target_out_var_name}" "${dependency_target}" PARENT_SCOPE)

   # Make sure the build system knows the file is a generated object file.
-  set_source_files_properties("${SWIFTFILE_OUTPUT}"
+  set_source_files_properties(${SWIFTFILE_OUTPUT}
       PROPERTIES
       GENERATED true
       EXTERNAL_OBJECT true


build: remove Swift support for `_add_swift_host_library_single`

The host libraries do not build Swift code, these libraries are C++
libraries used for the compiler.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -784,60 +784,6 @@
         "${SWIFTLIB_SINGLE_ARCHITECTURE}")
     set(SWIFTLIB_SINGLE_SOURCES ${SWIFTLIB_SINGLE_SOURCES}
       ${SWIFTLIB_SINGLE_GYB_SOURCES})
-  endif()
-
-  # Remove the "swift" prefix from the name to determine the module name.
-  string(REPLACE swift "" module_name "${name}")
-
-  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
-    swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE)
-  endif()
-
-  handle_swift_sources(
-      swift_object_dependency_target
-      swift_module_dependency_target
-      swift_sib_dependency_target
-      swift_sibopt_dependency_target
-      swift_sibgen_dependency_target
-      SWIFTLIB_SINGLE_SOURCES
-      SWIFTLIB_SINGLE_EXTERNAL_SOURCES ${name}
-      DEPENDS
-        ${gyb_dependency_targets}
-      SDK ${SWIFTLIB_SINGLE_SDK}
-      ARCHITECTURE ${SWIFTLIB_SINGLE_ARCHITECTURE}
-      MODULE_NAME ${module_name}
-      ${embed_bitcode_arg}
-      INSTALL_IN_COMPONENT "${SWIFTLIB_SINGLE_INSTALL_IN_COMPONENT}")
-  add_swift_source_group("${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}")
-
-  # If there were any swift sources, then a .swiftmodule may have been created.
-  # If that is the case, then add a target which is an alias of the module files.
-  set(VARIANT_SUFFIX "-${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}")
-
-  # For standalone overlay builds to work
-  if(NOT BUILD_STANDALONE)
-    if (EXISTS swift_sib_dependency_target AND NOT "${swift_sib_dependency_target}" STREQUAL "")
-      add_dependencies(swift-stdlib${VARIANT_SUFFIX}-sib ${swift_sib_dependency_target})
-    endif()
-
-    if (EXISTS swift_sibopt_dependency_target AND NOT "${swift_sibopt_dependency_target}" STREQUAL "")
-      add_dependencies(swift-stdlib${VARIANT_SUFFIX}-sibopt ${swift_sibopt_dependency_target})
-    endif()
-
-    if (EXISTS swift_sibgen_dependency_target AND NOT "${swift_sibgen_dependency_target}" STREQUAL "")
-      add_dependencies(swift-stdlib${VARIANT_SUFFIX}-sibgen ${swift_sibgen_dependency_target})
-    endif()
-  endif()
-
-  # Only build the modules for any arch listed in the *_MODULE_ARCHITECTURES.
-  if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS
-      AND SWIFTLIB_SINGLE_ARCHITECTURE IN_LIST SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_MODULE_ARCHITECTURES)
-    # Create dummy target to hook up the module target dependency.
-    add_custom_target("${target}"
-      DEPENDS
-        "${swift_module_dependency_target}")
-
-    return()
   endif()

   add_library("${target}" ${libkind}


CMake: Do not rebuild the world when tblgen changes but the .inc files
it produces are not affected by the change.

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -4,9 +4,16 @@

 macro(tablegen ofn)
   file(GLOB all_tds "*.td")
+  add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
+    COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
+    -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${ofn}.tmp
+    DEPENDS ${LLVM_TABLEGEN} ${all_tds}
+    COMMENT "Building ${ofn}.tmp..."
+    )
   add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
-    COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${ofn}
-    DEPENDS tblgen ${all_tds}
+    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ofn}.tmp ${ofn}
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
     COMMENT "Building ${ofn}..."
     )
   set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn})


Add new search path for CGAL CMake config

In Fedora 33 the CGAL package moved its CMake config
files to a new location (again) so add to the search path.

--- cmake_modules/FindCGAL.cmake
+++ cmake_modules/FindCGAL.cmake
@@ -57,6 +57,7 @@
     /usr/lib/cmake/CGAL
     /usr/local/share/CGAL/cmake
     /usr/share/CGAL/cmake
+    /usr/share/cmake/CGAL

     # Read from the CMakeSetup registry entries.  It is likely that
     # CGAL will have been recently built.


COMP: Disable LibSVM as TubeTK doesn't build with it on windows

LibSVM is used in CLIs that aren't useful for prometheus

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -74,6 +74,7 @@
       # Build only TubeTK lib, not the modules. They will be built by Slicer.
       -DTubeTK_BUILD_MODULES:BOOL=OFF
       -DTubeTK_BUILD_SLICER_EXTENSION:BOOL=OFF
+      -DTubeTK_USE_LIBSVM:BOOL=OFF
     INSTALL_COMMAND ""
     DEPENDS
       ${${proj}_DEPENDENCIES}


Add a TinyXML2 dependency.

Add a TinyXML2 dependency.

--- tester/project.cmake
+++ tester/project.cmake
@@ -23,6 +23,6 @@
 list (APPEND _project_ldflags      ${UV_LIBRARIES})

 # TinyXML2 setting.
-#list (APPEND _project_include_dirs ${TINYXML2_INCLUDE_DIRS})
-#list (APPEND _project_ldflags      ${TINYXML2_LIBRARIES})
+list (APPEND _project_include_dirs ${TINYXML2_INCLUDE_DIRS})
+list (APPEND _project_ldflags      ${TINYXML2_LIBRARIES})


Added a template for data.kitware.com in ExternalData_URL_TEMPLATES

--- tests/TestData.cmake
+++ tests/TestData.cmake
@@ -14,6 +14,7 @@
 # set the default mirror
 set(ExternalData_URL_TEMPLATES
   "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+  "https://data.kitware.com:443/api/v1/file/hashsum/%(algo)/%(hash)/download"
 )

 # Expose the absolute path to the data file source tree because


fpta: cmake: copy DLL's PDB-files for tests under Windows.

--- cmake.fpta/testing.cmake
+++ cmake.fpta/testing.cmake
@@ -218,6 +218,9 @@
           else(dir)
             # Path is configuration-depended or not available, should copy dll
             add_custom_command(TARGET ${target} POST_BUILD
+              COMMAND if exist "$<TARGET_PDB_FILE:${dep}>"
+              ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_PDB_FILE:${dep}>" "$<TARGET_FILE_DIR:${target}>")
+            add_custom_command(TARGET ${target} POST_BUILD
               COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${dep}>" "$<TARGET_FILE_DIR:${target}>"
               COMMENT "${UT_NEED_DLLCRUTCH}: Copy shared library ${dep} for test ${target}")
           endif(dir)


[fixed] BOTG_INCLUDE to allow more than one download

--- cmake/BOTG_INCLUDE.cmake
+++ cmake/BOTG_INCLUDE.cmake
@@ -11,8 +11,8 @@

 #This function needs to be here instead of in BOTG.cmake so it can be part of a
 #Bootstrapping operation.
-MACRO( botgDownloadExternalProjects external_projects )
-    FOREACH( ep ${external_projects} )
+MACRO( botgDownloadExternalProjects )
+    FOREACH( ep ${ARGN} )
         IF( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ep}" )
             MESSAGE( FATAL_ERROR "[BootsOnTheGround] cannot find external project download file=${ep}" )
         ENDIF()


Update code coverage

Update code coverage

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -100,19 +100,25 @@

 	# Setup target
 	ADD_CUSTOM_TARGET(${_targetname}
+
 		# Capturing lcov counters and generating report
-		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-    COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'test/*' '/usr/*' '*_TEST*' --output-file ${_outputname}.info.cleaned
-		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
-		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
+    COMMAND ${LCOV_PATH} -q --no-checksum --directory ${PROJECT_BINARY_DIR}
+      --capture --output-file ${_outputname}.info 2>/dev/null
+    COMMAND ${LCOV_PATH} -q --remove ${_outputname}.info
+      'test/*' '/usr/*' '*_TEST*' --output-file ${_outputname}.info.cleaned
+		COMMAND ${GENHTML_PATH} -q --legend -o ${_outputname}
+      ${_outputname}.info.cleaned
+    COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info
+      ${_outputname}.info.cleaned

 		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
+		COMMENT "Resetting code coverage counters to zero.\n"
+      "Processing code coverage counters and generating report."
 	)

 	# Show info where to find the report
 	ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
-		COMMAND ${LCOV_PATH} --directory . --zerocounters;
+		COMMAND COMMAND ${LCOV_PATH} -q --zerocounters --directory ${PROJECT_BINARY_DIR};
 		COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
 	)


maybe fix cmake file

maybe fix cmake file

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -110,7 +110,7 @@
 # ---[ CUDA
 include(cmake/Cuda.cmake)
 if(HAVE_CUDA)
-  LIST(APPEND CUDA_NVCC_FLAGS -Xcompiler -std=c++11)
+  LIST(APPEND CUDA_NVCC_FLAGS "-Xcompiler;-std=c++11")
   LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_52,code=sm_52)
 endif()


Fix MinGW detection on x86

Fix MinGW detection on x86

Make detection of x64 using the gcc's target triplet identical
to the one used in cmake/OpenCVDetectCXXCompiler.cmake.
Otherwise, MinGW-w64 setups will always be treated as x64 since
they contain "w64" as vendor key.

--- cmake/OpenCVConfig.cmake
+++ cmake/OpenCVConfig.cmake
@@ -86,7 +86,7 @@
   execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
                   OUTPUT_VARIABLE CMAKE_OPENCV_GCC_TARGET_MACHINE
                   OUTPUT_STRIP_TRAILING_WHITESPACE)
-  if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
+  if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
     set(MINGW64 1)
     set(OpenCV_ARCH x64)
   else()


fix installation layout for debian packages:

Install symlinks to shared libraries as a part of development package,
not runtime package.

It is default behavior for debian packages.
(cherry picked from commit f55c1cc0fb390f88c91557cb443e932f459c5849)

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -617,9 +617,14 @@

   ocv_install_target(${the_module} EXPORT OpenCVModules
     RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
-    LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs
+    LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs NAMELINK_SKIP
     ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT dev
     )
+  get_target_property(_target_type ${the_module} TYPE)
+  if("${_target_type}" STREQUAL "SHARED_LIBRARY")
+    install(TARGETS ${the_module}
+      LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT dev NAMELINK_ONLY)
+  endif()

   # only "public" headers need to be installed
   if(OPENCV_MODULE_${the_module}_HEADERS AND ";${OPENCV_MODULES_PUBLIC};" MATCHES ";${the_module};")


tell cmake to use static version of svml

--- common/cmake/intel.cmake
+++ common/cmake/intel.cmake
@@ -76,12 +76,17 @@

   # remove libmmd dependency
   IF (NOT EMBREE_STATIC_RUNTIME)
+    # Use the default math library instead of libmmd[d]
     STRING(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib")
     STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmd.lib")
     STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib")
     STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib")
     STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmd.lib")
     STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib")
+
+    # Link the static version of SVML
+    string(APPEND CMAKE_EXE_LINKER_FLAGS " /defaultlib:svml_dispmt.lib")
+    string(APPEND CMAKE_SHARED_LINKER_FLAGS " /defaultlib:svml_dispmt.lib")
   ENDIF()

 ELSE()


FIX: Exclude the vtkRenderingOpenGLNew module from BUILD_ALL_MODULES

Change-Id: Ieb1372504b1d866893b601823a2b30755d996dc6

--- Rendering/VolumeOpenGLNew/module.cmake
+++ Rendering/VolumeOpenGLNew/module.cmake
@@ -21,4 +21,5 @@
     vtkTestingRendering
   KIT
     vtkOpenGL
+  EXCLUDE_FROM_ALL
 )


Fixed build on Linux

Fixed build on Linux

--- src/cmake/core.cmake
+++ src/cmake/core.cmake
@@ -148,7 +148,9 @@

 set(core_files
   ${basetypes_files}
+IF(APPLE)
   ${icu_ucsdet_files}
+ENDIF()
   ${abstract_files}
   ${imap_files}
   ${pop_files}
@@ -166,8 +168,10 @@
   "${CMAKE_CURRENT_SOURCE_DIR}/core"
   "${CMAKE_CURRENT_SOURCE_DIR}/core/abstract"
   "${CMAKE_CURRENT_SOURCE_DIR}/core/basetypes"
+IF(APPLE)
   "${CMAKE_CURRENT_SOURCE_DIR}/core/basetypes/icu-ucsdet"
   "${CMAKE_CURRENT_SOURCE_DIR}/core/basetypes/icu-ucsdet/include"
+ENDIF()
   "${CMAKE_CURRENT_SOURCE_DIR}/core/imap"
   "${CMAKE_CURRENT_SOURCE_DIR}/core/pop"
   "${CMAKE_CURRENT_SOURCE_DIR}/core/nntp"


fix rp2040 examples build from local tinyusb tree

--- hw/bsp/rp2040/family.cmake
+++ hw/bsp/rp2040/family.cmake
@@ -17,7 +17,7 @@
 	include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)

 	# TOP is absolute path to root directory of TinyUSB git repo
-	set(TOP "../../..")
+	set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..")
 	get_filename_component(TOP "${TOP}" REALPATH)

 	if (NOT PICO_TINYUSB_PATH)


Allow tomviz to build with MSVC2015

Allow tomviz to build with MSVC2015

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -3,11 +3,10 @@

   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wshadow -Wextra")
 elseif (WIN32)
-  if (MSVC AND MSVC12)
+  if (MSVC AND MSVC14)
     set(CMAKE_CXX_FLAGS_STD_CPP)
   else()
-    # ParaView doesn't support MSVC 2015 yet
-    message(FATAL_ERROR "Only the MSVC 2013 compiler is supported on windows.")
+    message(FATAL_ERROR "Only the MSVC 2015 compiler is supported on windows.")
   endif()
 endif()


Fix syntax error in cmake 3.20

Fix syntax error in cmake 3.20

--- cmake/ConnectorName.cmake
+++ cmake/ConnectorName.cmake
@@ -22,7 +22,7 @@
     SET(MACHINE_NAME "x64")
   ELSE()
     SET(MACHINE_NAME "32")
-  END()
+  ENDIF()
 ENDIF()

 SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}")


Fix windows config paths for the PKGDATADIR

--- cmake/InstallMacros.cmake
+++ cmake/InstallMacros.cmake
@@ -12,7 +12,7 @@
 # Global macros ----------------------------------------------------------------
 macro (generate_root_config name)
   FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb3/${name}.conf.in FileContent)
-  STRING(REPLACE "@PKGDATADIR@" "@ROOTDIR@/share/arangodb3"
+  STRING(REPLACE "@PKGDATADIR@" "@ROOTDIR@$/{CMAKE_INSTALL_DATAROOTDIR_ARANGO}"
     FileContent "${FileContent}")
   STRING(REPLACE "@LOCALSTATEDIR@" "@ROOTDIR@/var"
     FileContent "${FileContent}")


Updates translations files install destination

Qt4 and Qt5 versions must be installed on different locations.

Signed-off-by: Luís Pereira <95d1463b1ff9eef535e39fb0d755bc242cfcea61@gmail.com>

--- cmake/LxQtTranslate.cmake
+++ cmake/LxQtTranslate.cmake
@@ -69,7 +69,7 @@

 function(lxqt_translate_ts _qmFiles)
     set(_translationDir "translations")
-    set(_installDir "${CMAKE_INSTALL_PREFIX}/share/lxqt/${PROJECT_NAME}")
+    set(_installDir "${CMAKE_INSTALL_PREFIX}/share/${LXQT_LIBRARY}/${PROJECT_NAME}")

     # Parse arguments ***************************************
     set(_state "")


Fix directory for QHttpEngine and QMdnsEngine libraries.

--- cmake/SharedLibrary.cmake
+++ cmake/SharedLibrary.cmake
@@ -25,7 +25,7 @@
 function(copy_lib_win src dest)
     add_custom_command(TARGET ${dest} POST_BUILD
         COMMAND "${CMAKE_COMMAND}" -E
-            copy_if_different \"$<TARGET_FILE:${src}>\" \"$<TARGET_FILE_DIR:${dest}>\"
+            copy_if_different \"$<TARGET_FILE:${src}>\" \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}\"
         COMMENT "Copying ${src} to ${dest}..."
     )
 endfunction()


version for master branch release

version for master branch release

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

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

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

     if( NOT DEFINED ${PV_NAME}_VERSION_PATCH )
-      set( ${PV_NAME}_VERSION_PATCH 2 )
+      set( ${PV_NAME}_VERSION_PATCH 3 )
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_TWEAK )


Fix doxygen_tools.cmake

Fix doxygen_tools.cmake

--- cmake/doxygen_tools.cmake
+++ cmake/doxygen_tools.cmake
@@ -18,7 +18,9 @@
       list(APPEND DOXY_INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir})
     endif()
   endforeach()
-  list(REMOVE_DUPLICATES DOXY_INPUTS)
+  if(DOXY_INPUTS)
+      list(REMOVE_DUPLICATES DOXY_INPUTS)
+  endif()
   # Save doxy_inputs to cache.
   set(DOXY_INPUTS ${DOXY_INPUTS} CACHE INTERNAL "doxy inputs")
 endmacro()


delete the lite meta info because of ccache, test=develop (#30644)

--- cmake/external/lite.cmake
+++ cmake/external/lite.cmake
@@ -58,6 +58,7 @@
                            -DLITE_BUILD_EXTRA=ON
                            -DLITE_WITH_XPU=${LITE_WITH_XPU}
                            -DXPU_SDK_ROOT=${XPU_SDK_ROOT}
+                           -DLITE_WITH_CODE_META_INFO=OFF
                            -DLITE_WITH_ARM=ON)
     ExternalProject_Add(
       ${LITE_PROJECT}
@@ -99,6 +100,7 @@
                            -DCUDA_ARCH_NAME=${CUDA_ARCH_NAME}
                            -DLITE_WITH_XPU=${LITE_WITH_XPU}
                            -DXPU_SDK_ROOT=${XPU_SDK_ROOT}
+                           -DLITE_WITH_CODE_META_INFO=OFF
                            -DLITE_WITH_ARM=OFF)

     ExternalProject_Add(


upgrade json to v3.5.0 (#2271)

upgrade json to v3.5.0 (#2271)

--- cmake/external_json.cmake
+++ cmake/external_json.cmake
@@ -22,7 +22,7 @@
 #------------------------------------------------------------------------------

 SET(JSON_GIT_REPO_URL https://github.com/nlohmann/json)
-SET(JSON_GIT_LABEL v3.4.0)
+SET(JSON_GIT_LABEL v3.5.0)

 ExternalProject_Add(
     ext_json


[MLIR] Fix MLIR pre-build paths (#4212)

[MLIR] Fix MLIR pre-build paths (#4212)

- Rename 'llvm-projects' to 'llvm-project' to match dir in LLVM repo.
- Remove 'mlir_project' from pre-build path. It shouldn't be mandatory
  to have LLVM repo in that directory for pre-build.

--- cmake/external_mlir.cmake
+++ cmake/external_mlir.cmake
@@ -24,12 +24,12 @@
 # MLIR environment variables. Some of them are used by LIT tool.

 if (NGRAPH_USE_PREBUILT_MLIR)
-    set(MLIR_PROJECT_ROOT ${MLIR_LLVM_PREBUILT_PATH}/mlir_project)
+    set(MLIR_PROJECT_ROOT ${MLIR_LLVM_PREBUILT_PATH})
 else()
     set(MLIR_PROJECT_ROOT ${CMAKE_CURRENT_BINARY_DIR}/mlir_project)
 endif()

-set(MLIR_LLVM_ROOT ${MLIR_PROJECT_ROOT}/llvm-projects)
+set(MLIR_LLVM_ROOT ${MLIR_PROJECT_ROOT}/llvm-project)
 set(MLIR_LLVM_SOURCE_DIR ${MLIR_LLVM_ROOT}/llvm)
 set(MLIR_SOURCE_DIR ${MLIR_LLVM_ROOT}/mlir)
 set(MLIR_LLVM_BUILD_DIR ${MLIR_PROJECT_ROOT}/build)


fixed warnings in library_rpath.cmake

fixed warnings in library_rpath.cmake

Only recurse if the current library is a TARGET, not when it is just
non-empty.
Also remove duplicates from the collected rpath.

--- cmake/library_rpath.cmake
+++ cmake/library_rpath.cmake
@@ -4,20 +4,31 @@
 # if the library is a target use its location and recurse on
 # its dependencies.

-macro(add_dependent_libraries)
+macro( _recursive_collect_rpath )
   foreach( lib ${ARGN})
     if(EXISTS ${lib})
       get_filename_component(libdir ${lib} PATH)
-      list(APPEND CMAKE_INSTALL_RPATH ${libdir})
-    elseif(lib)
+      list(APPEND _rpath ${libdir})
+    elseif(TARGET ${lib})
       get_target_property(libpath ${lib} LOCATION)
       get_filename_component(libdir ${libpath} PATH)
-      list(APPEND CMAKE_INSTALL_RPATH ${libdir})
+      list(APPEND _rpath ${libdir})
       get_target_property(dependent ${lib} IMPORTED_LINK_INTERFACE_LIBRARIES)
-      add_dependent_libraries(${dependent})
+      _recursive_collect_rpath(${dependent})
       get_target_property(dependent ${lib} IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE)
-      add_dependent_libraries(${dependent})
+      _recursive_collect_rpath(${dependent})
     endif()
-  endforeach(lib)
-endmacro(add_dependent_libraries)
+  endforeach()
+endmacro( )

+function(add_dependent_libraries)
+  set( _rpath "")
+
+  _recursive_collect_rpath( ${ARGN} )
+
+  list( SORT _rpath )
+  list( REMOVE_DUPLICATES _rpath )
+
+  set( CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} ${_rpath} PARENT_SCOPE)
+endfunction()
+


Fix python coverage outside server/

Fix python coverage outside server/

--- plugin.cmake
+++ plugin.cmake
@@ -13,6 +13,13 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 ###############################################################################
+
+function(add_histomicstk_python_test case)
+  add_python_test("${case}" PLUGIN HistomicsTK
+    COVERAGE_PATHS "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/histomicstk"
+    ${ARGN}
+  )
+endfunction()

 # style tests
 add_python_style_test(
@@ -31,59 +38,56 @@
 )

 # API tests
-add_python_test(docker PLUGIN HistomicsTK)
+add_histomicstk_python_test(docker)

-add_python_test(example PLUGIN HistomicsTK)
+add_histomicstk_python_test(example)

-add_python_test(import_package PLUGIN HistomicsTK)
+add_histomicstk_python_test(import_package)

-add_python_test(color_conversion PLUGIN HistomicsTK)
+add_histomicstk_python_test(color_conversion)

-add_python_test(color_deconvolution PLUGIN HistomicsTK
+add_histomicstk_python_test(color_deconvolution
     SUBMODULE MacenkoTest
     DBNAME core_color_deconvolution_macenko
     EXTERNAL_DATA "plugins/HistomicsTK/Easy1.png"
 )

-add_python_test(color_deconvolution PLUGIN HistomicsTK
+add_histomicstk_python_test(color_deconvolution
     # Work around CMake bug when using the same image multiple times
     # EXTERNAL_DATA "plugins/HistomicsTK/Easy1.png"
 )

-add_python_test(color_normalization
+add_histomicstk_python_test(color_normalization
     SUBMODULE ReinhardNormalizationTest
     DBNAME core_color_normalization_reinhard
-    PLUGIN HistomicsTK EXTERNAL_DATA
+    EXTERNAL_DATA
     "plugins/HistomicsTK/L1.png"    # put L1.png.sha512 in plugin_tests/data
     # Work around CMake bug when using the same image multiple times
     # "plugins/HistomicsTK/Easy1.png" # put Easy1.png.sha512 in plugin_tests/data
     "plugins/HistomicsTK/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs"
 )

-add_python_test(color_normalization
+add_histomicstk_python_test(color_normalization
     SUBMODULE BackgroundIntensityTest
     DBNAME core_color_normalization_background_intensity
-    PLUGIN HistomicsTK
     EXTERNAL_DATA "plugins/HistomicsTK/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs"
 )

-add_python_test(glcm
+add_histomicstk_python_test(glcm
     SUBMODULE GLCMMatrixGenerationTest
     DBNAME core_glcm_gen
-    PLUGIN HistomicsTK
 )

-add_python_test(segmentation_label
+add_histomicstk_python_test(segmentation_label
     SUBMODULE TraceBoundaryTest
     DBNAME core_trace_boundary
-    PLUGIN HistomicsTK
 )

-add_python_test(nuclei_segmentation
+add_histomicstk_python_test(nuclei_segmentation
     SUBMODULE NucleiSegmentationTest
     DBNAME core_nuclei_seg
-    PLUGIN HistomicsTK EXTERNAL_DATA
+    EXTERNAL_DATA
     # There is a bug in cmake that fails when external data files are added to
     # multiple tests, so add it in one of the tests for now
     # "plugins/HistomicsTK/L1.png"    # put L1.png.sha512 in plugin_tests/data
@@ -91,10 +95,10 @@
     "plugins/HistomicsTK/Easy1_nuclei_seg_kofahi_adaptive.npy" # put Easy1_nuclei_seg_kofahi_adaptive.npy.sha512 in plugin_tests/data
 )

-add_python_test(blob_detection_filters
+add_histomicstk_python_test(blob_detection_filters
     SUBMODULE BlobDetectionFiltersTest
     DBNAME core_blob_detection_filters
-    PLUGIN HistomicsTK EXTERNAL_DATA
+    EXTERNAL_DATA
     # There is a bug in cmake that fails when external data files are added to
     # multiple tests, so add it in one of the tests for now
     # "plugins/HistomicsTK/L1.png"


Use llvm 8 on CentOS 8.

Use llvm 8 on CentOS 8.

--- default_build_settings.cmake
+++ default_build_settings.cmake
@@ -27,7 +27,7 @@

 function(setup_vespa_default_build_settings_centos_8)
   message("-- Setting up default build settings for centos 8")
-  set(DEFAULT_VESPA_LLVM_VERSION "7" PARENT_SCOPE)
+  set(DEFAULT_VESPA_LLVM_VERSION "8" PARENT_SCOPE)
 endfunction()

 function(setup_vespa_default_build_settings_darwin)


fixed: keep debug path on app install

fixed: keep debug path on app install

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -1574,7 +1574,7 @@

           INSTALL(TARGETS ${EXE}
                   CONFIGURATIONS Release Debug DebugGV
-                  RUNTIME DESTINATION bin
+                  RUNTIME DESTINATION bin/${OSG_LIBDIR_BUILD_TYPE_SUFFIX}
                   COMPONENT binaries)

         ENDIF(WIN32)


Add new search path for GoogleMock

Add new search path for GoogleMock

Google Mock/Test has changed the directory structure in the latest
release, 1.8. As a result the debian package places things in a slightly
different location. To automatically find GoogleMock installed from the
repository, the new location is added to FindGoogleMock.cmake. The old
location is left so 1.7 will still be found.

--- CMake/FindGoogleMock.cmake
+++ CMake/FindGoogleMock.cmake
@@ -1,5 +1,5 @@
 # This file is a part of the OpenSurgSim project.
-# Copyright 2014, SimQuest Solutions Inc.
+# Copyright 2014-2016, SimQuest Solutions Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
 if(NOT GOOGLEMOCK_DIR)
 	find_path(GOOGLEMOCK_DIR
 		NAMES src/gmock.cc
-		PATHS "$ENV{GOOGLEMOCK_DIR}" "/usr/src/gmock/"
+		PATHS "$ENV{GOOGLEMOCK_DIR}" "/usr/src/googletest/googlemock" "/usr/src/gmock/"
 	)
 endif(NOT GOOGLEMOCK_DIR)


Fix comment scope

Fix comment scope

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -188,7 +188,7 @@

     else()

-      set(#[[bootstrap_cmd test -e ./b2 ||]] ./bootstrap.sh ${bootstrap_args})
+      set(bootstrap_cmd #[[ test -e ./b2 || ]] ./bootstrap.sh ${bootstrap_args})
       set(b2_cmd ./b2 ${b2_options} ${b2_properties} stage)

       #[[ We already told Boost if we want to use GCC or Clang but so far we


Remove superfluous COMMAND command

Remove superfluous COMMAND command

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -210,8 +210,7 @@
           contains slashes. ]]

       if(toolset)
-        set(configure_cmd COMMAND
-          sed -i.backup "\
+        set(configure_cmd sed -i.backup "\
 s|\
 using[[:space:]][[:space:]]*${toolset}[[:space:]]*$<SEMICOLON>|\
 using ${toolset} : : ${CMAKE_CXX_COMPILER} $<SEMICOLON>|\


Remove the platform-dependent language support files:
I introduced them to solve a problem with the gfortran 4.6.2 compiler, but
this was due to the _specific_ distribution of that compiler, not to the
_version_.

Should the problem of multiple defines occur again, the solution is to
add the option -WL,--allow-multiple-define

svn path=/trunk/; revision=12028

--- cmake/modules/language_support/cmake-2.8/CMakeFortranInformation.cmake
+++ cmake/modules/language_support/cmake-2.8/CMakeFortranInformation.cmake
@@ -1,190 +0,0 @@
-
-# This file sets the basic flags for the Fortran language in CMake.
-# It also loads the available platform file for the system-compiler
-# if it exists.
-
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
-# since the gnu compiler has several names force g++
-IF(CMAKE_COMPILER_IS_GNUG77)
-  SET(CMAKE_BASE_NAME g77)
-ENDIF(CMAKE_COMPILER_IS_GNUG77)
-IF(CMAKE_Fortran_COMPILER_ID)
-  # FIXME: PLplot specific path here that will be different for other projects.
-  IF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake OR EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
-    SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran)
-  ENDIF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake OR EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
-ENDIF(CMAKE_Fortran_COMPILER_ID)
-IF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-  # Use this file if it exists.
-  SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
-  ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-ELSE(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-  # This one apparently doesn't have to actually exist, see OPTIONAL below.
-  SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
-  ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-ENDIF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
-
-# This should be included before the _INIT variables are
-# used to initialize the cache.  Since the rule variables
-# have if blocks on them, users can still define them here.
-# But, it should still be after the platform file so changes can
-# be made to those values.
-
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
-   INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
-
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
-   INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
-
-
-# Fortran needs cmake to do a requires step during its build process to
-# catch any modules
-SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
-
-# Create a set of shared library variable specific to Fortran
-# For 90% of the systems, these are the same flags as the C versions
-# so if these are not set just copy the flags from the c version
-IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
-  SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
-  SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
-
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
-  SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
-  SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
-
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
-  SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
-
-IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
-  SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
-
-# repeat for modules
-IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
-  SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
-  SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
-  SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
-
-IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
-  SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
-
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
-  SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
-
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
-  SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
-
-IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
-  SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
-
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
-  SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
-ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
-
-IF(NOT CMAKE_INCLUDE_FLAG_Fortran)
-  SET(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C})
-ENDIF(NOT CMAKE_INCLUDE_FLAG_Fortran)
-
-IF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
-  SET(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C})
-ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
-
-SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
-
-SET(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
-# avoid just having a space as the initial value for the cache
-IF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
-  SET(CMAKE_Fortran_FLAGS_INIT)
-ENDIF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
-SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
-     "Flags for Fortran compiler.")
-
-INCLUDE(CMakeCommonLanguageInclude)
-
-# now define the following rule variables
-# CMAKE_Fortran_CREATE_SHARED_LIBRARY
-# CMAKE_Fortran_CREATE_SHARED_MODULE
-# CMAKE_Fortran_CREATE_STATIC_LIBRARY
-# CMAKE_Fortran_COMPILE_OBJECT
-# CMAKE_Fortran_LINK_EXECUTABLE
-
-# create a Fortran shared library
-IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
-  SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
-      "<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
-
-# create a Fortran shared module just copy the shared library rule
-IF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
-  SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
-ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
-
-# create a Fortran static library
-IF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
-  SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY
-      "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
-      "<CMAKE_RANLIB> <TARGET> ")
-ENDIF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
-
-# compile a Fortran file into an object file
-IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
-  SET(CMAKE_Fortran_COMPILE_OBJECT
-    "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
-ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
-
-# link a fortran program
-IF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
-  SET(CMAKE_Fortran_LINK_EXECUTABLE
-    "<CMAKE_Fortran_COMPILER> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS>  -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
-
-IF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
-  SET(CMAKE_Fortran_STANDARD_LIBRARIES "${CMAKE_Fortran_STANDARD_LIBRARIES_INIT}"
-    CACHE STRING "Libraries linked by defalut with all Fortran applications.")
-  MARK_AS_ADVANCED(CMAKE_Fortran_STANDARD_LIBRARIES)
-ENDIF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
-
-IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
-  SET (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG_INIT}" CACHE STRING
-     "Flags used by the compiler during debug builds.")
-  SET (CMAKE_Fortran_FLAGS_MINSIZEREL "${CMAKE_Fortran_FLAGS_MINSIZEREL_INIT}" CACHE STRING
-      "Flags used by the compiler during release minsize builds.")
-  SET (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE_INIT}" CACHE STRING
-     "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
-  SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
-     "Flags used by the compiler during Release with Debug Info builds.")
-
-ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
-
-MARK_AS_ADVANCED(
-CMAKE_Fortran_FLAGS
-CMAKE_Fortran_FLAGS_DEBUG
-CMAKE_Fortran_FLAGS_MINSIZEREL
-CMAKE_Fortran_FLAGS_RELEASE
-CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
-
-# set this variable so we can avoid loading this more than once.
-SET(CMAKE_Fortran_INFORMATION_LOADED 1)


Require CMake to link against the downloaded curl library on Windows.

Part 3 in a series of commits that will add CMake support for
downloading and linking against the curl library on Windows.

Review: https://reviews.apache.org/r/36970

--- 3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ 3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -48,12 +48,20 @@
 # download/configure/build all third-party libraries before attempting to build.
 ################################################################################
 set(STOUT_TEST_DEPENDENCIES
+  ${STOUT_TEST_DEPENDENCIES}
   ${BOOST_TARGET}
   ${GLOG_TARGET}
   ${GMOCK_TARGET}
   ${GTEST_TARGET}
   ${PROTOBUF_TARGET}
   )
+
+if (WIN32)
+  set(STOUT_TEST_DEPENDENCIES
+    ${STOUT_TEST_DEPENDENCIES}
+    ${CURL_TARGET}
+  )
+endif(WIN32)

 # DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
 # headers for our third party libs (e.g., -I/path/to/glog on Linux)..
@@ -75,6 +83,7 @@
   set(STOUT_TEST_INCLUDE_DIRS
     ${STOUT_TEST_INCLUDE_DIRS}
     ${GLOG_ROOT}/src/windows
+    ${CURL_ROOT}/include
     )
 else (WIN32)
   set(STOUT_TEST_INCLUDE_DIRS
@@ -106,6 +115,7 @@
     ${GLOG_ROOT}/Debug
     ${GMOCK_ROOT}/msvc/2010/Debug
     ${PROTOBUF_ROOT}/vsprojects/Debug
+    ${CURL_ROOT}/lib
     )
 else (WIN32)
   set(STOUT_TEST_LIB_DIRS
@@ -135,6 +145,7 @@
     ${STOUT_TEST_LIBS}
     libglog
     libprotobuf
+    libcurl_a
     )
 else (WIN32)
   set(STOUT_TEST_LIBS


Add -DHAVE_USLEEP to sqlite compile.

Add -DHAVE_USLEEP to sqlite compile.

--- deps/sqlite/sqlite.cmake
+++ deps/sqlite/sqlite.cmake
@@ -13,4 +13,5 @@
 )
 add_definitions(
   -DSQLITE_ENABLE_COLUMN_METADATA
+  -DHAVE_USLEEP
 )


Fix Sequoia configuration

Fix Sequoia configuration

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

 ExternalProject_Add(
   SequoiaEngine
-  SOURCE_DIR "${sequoia_engine_build}"
+  SOURCE_DIR "${sequoia_engine_source}"
+  BINARY_DIR "${sequoia_engine_build}"
   INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
   CMAKE_ARGS
     ${sequoia_engine_cmake_args}


- Fix another oopsie in the oopsie for OSX frameworks

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -119,7 +119,7 @@
             "${TARGET}" "${LINKOPT}"
             "${VERSION_CODE}" "${COPYRIGHT}" "${COMPANY}"
             "${SOURCES}" "${BUNDLE_RSRCS}" "${BUNDLE_HDRS}")
-        target_link_libraries(${LIBRARIES})
+        target_link_libraries(${TARGET} ${LIBRARIES})
     else()
         coffee_add_elibrary(
             "${TARGET}" "${LINKOPT}"


Fix ARG_TARGET being ignored

Fix ARG_TARGET being ignored

--- cmake/Modules/SampPluginTest.cmake
+++ cmake/Modules/SampPluginTest.cmake
@@ -32,7 +32,7 @@
 		set(ARG_TIMEOUT "0.5")
 	endif()

-	get_target_property(PLUGIN_PATH ${CMAKE_PROJECT_NAME} LOCATION)
+	get_target_property(PLUGIN_PATH ${ARG_TARGET} LOCATION)

 	list(APPEND arguments
 		"--output"


[ETHOSN] Remove the compiler library from the runtime link (#10334)

Due to some restructuring of the Ethos(TM)-N driver library it is no
longer necessary to link the compiler library (AKA Support library)
into the runtime.

--- cmake/modules/contrib/EthosN.cmake
+++ cmake/modules/contrib/EthosN.cmake
@@ -40,8 +40,7 @@

     list(APPEND TVM_LINKER_LIBS ${ETHOSN_COMPILER_LIBRARY}
       ${ETHOSN_RUNTIME_LIBRARY})
-    list(APPEND TVM_RUNTIME_LINKER_LIBS ${ETHOSN_COMPILER_LIBRARY}
-      ${ETHOSN_RUNTIME_LIBRARY})
+    list(APPEND TVM_RUNTIME_LINKER_LIBS ${ETHOSN_RUNTIME_LIBRARY})

     if(NOT MSVC)
       set_source_files_properties(${COMPILER_ETHOSN_SRCS}


Fix unused-arg check in auto find test deps: (#136)

- Arguments to a macro are not variables, so it's not
possible to do 'if(ARGN)' to check for arguments;
however, copying ARGN to a variable works

Signed-off-by: Juan Pablo Samper <2a85767837cb6bdeb6ab9df34ca4358d2f954e5d@apex.ai>

--- ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake
+++ ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake
@@ -21,9 +21,10 @@
 # @public
 #
 macro(ament_lint_auto_find_test_dependencies)
-  if(ARGN)
+  set(_ARGN "${ARGN}")
+  if(_ARGN)
     message(FATAL_ERROR "ament_lint_auto_find_test_dependencies() called with "
-      "unused arguments: ${ARGN}")
+      "unused arguments: ${_ARGN}")
   endif()

   if(NOT _AMENT_PACKAGE_NAME)


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -1,8 +1,22 @@
 [Desktop Entry]
 Encoding=UTF-8
 Comment=Custom account configuration user interface for accounts using the sipe connection manager.
+Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Sipe-Verbindungsverwaltung verwenden.
+Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
+Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Sipe.
+Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
+Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
+Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
+Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
 Icon=blockdevice
 Name=Sipe Account Configuration User Interface
+Name[de]=Benutzeroberfläche zur Einrichtung von Sipe-Zugängen
+Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie
+Name[pt]=Interface de Configuração de Contas do Sipe
+Name[pt_BR]=Interface de configuração de contas do Sipe
+Name[sv]=Användargränssnitt för inställning av Sipe-konton
+Name[uk]=Інтерфейс користувача для налаштовування sipe
+Name[x-test]=xxSipe Account Configuration User Interfacexx
 Type=Service
 ServiceTypes=KTpAccountsKCM/AccountUiPlugin


updated to STIR 4.0.2

updated to STIR 4.0.2

--- version_config.cmake
+++ version_config.cmake
@@ -195,7 +195,7 @@

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG rel_4.0.1)
+  set(DEFAULT_STIR_TAG rel_4.0.2)

   ## siemens_to_ismrmrd
   set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd)


removing duplicate BUILD_CI_CHECK reporting in summary

--- tools/cmake/summary.cmake
+++ tools/cmake/summary.cmake
@@ -99,7 +99,6 @@
     universal_status("")
     universal_status("  BUILD_C_API_LIB              :   ${BUILD_C_API_LIB}")
     universal_status("")
-    universal_status("  BUILD_CI_CHECK               :   ${BUILD_CI_CHECK}")
     universal_status("  BUILD_CMD_LINE_TOOLS         :   ${BUILD_CMD_LINE_TOOLS}")
     universal_status("  BUILD_EDUCATION_EXAMPLES     :   ${BUILD_EDUCATION_EXAMPLES}")
     universal_status("  BUILD_APPLICATION_EXAMPLES   :   ${BUILD_APPLICATION_EXAMPLES}")


Change cdash site: cdash-bipop.inrialpes.fr

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

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "cdash.inria.fr")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Siconos")
+set(CTEST_DROP_SITE "cdash-bipop.inrialpes.fr")
+set(CTEST_DROP_LOCATION "/submit.php?project=Siconos")
 set(CTEST_DROP_SITE_CDASH TRUE)


CMake: Unify naming in detailed.log

CMake: Unify naming in detailed.log

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

--- deal.II/cmake/setup_finalize.cmake
+++ deal.II/cmake/setup_finalize.cmake
@@ -226,7 +226,7 @@
         IF( # MPI:
             _var2 MATCHES "^${_feature}_CXX_(COMPILER|COMPILE_FLAGS|LINK_FLAGS|LIBRARIES|INCLUDE_PATH)$" OR
             # Boost:
-            ( _feature MATCHES "BOOST" AND _var2 MATCHES "^Boost_(LIBRARIES|INCLUDE_DIRS)$" ) OR
+            ( _feature MATCHES "BOOST" AND _var2 MATCHES "^BOOST_(LIBRARIES|INCLUDE_DIRS)$" ) OR
             # TBB:
             ( _feature MATCHES "THREADS" AND _var2 MATCHES "^TBB_(LIBRARIES|INCLUDE_DIRS)$" ) OR
             # Generic:


STYLE: Correct case in installer dir

STYLE: Correct case in installer dir

SVN-Revision: 2974

--- MIDASCPack.cmake
+++ MIDASCPack.cmake
@@ -5,14 +5,14 @@
   CONFIGURE_FILE("${MIDASCPP_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
     "${MIDASCPP_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
   SET(CPACK_PROJECT_CONFIG_FILE "${MIDASCPP_BINARY_DIR}/CMakeCPackOptions.cmake")
-  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Midas Desktop Application")
+  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MIDAS Desktop Application")
   SET(CPACK_PACKAGE_VENDOR "Kitware")
   #SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
   #SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
   SET(CPACK_PACKAGE_VERSION_MAJOR "${MIDASCPP_VERSION_MAJOR}")
   SET(CPACK_PACKAGE_VERSION_MINOR "${MIDASCPP_VERSION_MINOR}")
   SET(CPACK_PACKAGE_VERSION_PATCH "${MIDASCPP_VERSION_PATCH}")
-  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "MidasDesktop ${MIDASCPP_VERSION_MAJOR}.${MIDASCPP_VERSION_MINOR}")
+  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "MIDASDesktop ${MIDASCPP_VERSION_MAJOR}.${MIDASCPP_VERSION_MINOR}")
   SET(CPACK_SOURCE_PACKAGE_FILE_NAME
     "midasdesktop-${MIDASCPP_VERSION_MAJOR}.${MIDASCPP_VERSION_MINOR}.${MIDASCPP_VERSION_PATCH}")


Fixed MinGW build when not having the ability to execute sh scripts. This means a separate library build is currently not possible on MinGW.

--- cmake/Modules/Urho3D-CMake-magic.cmake
+++ cmake/Modules/Urho3D-CMake-magic.cmake
@@ -264,7 +264,7 @@
     add_library (${TARGET_NAME} ${LIB_TYPE} ${SOURCE_FILES})
     setup_target ()

-    if (CMAKE_PROJECT_NAME STREQUAL Urho3D AND NOT LIB_TYPE STREQUAL SHARED AND NOT IOS AND NOT ANDROID)
+    if (CMAKE_PROJECT_NAME STREQUAL Urho3D AND NOT LIB_TYPE STREQUAL SHARED)
         set (STATIC_LIBRARY_TARGETS ${STATIC_LIBRARY_TARGETS} ${TARGET_NAME} PARENT_SCOPE)
         if (URHO3D_BUILD_TYPE STREQUAL SHARED)
             set_target_properties (${TARGET_NAME} PROPERTIES COMPILE_DEFINITIONS URHO3D_EXPORTS)
@@ -278,7 +278,7 @@
             add_custom_command (TARGET ${TARGET_NAME} PRE_LINK
                 COMMAND ${CMAKE_SOURCE_DIR}/cmake/Scripts/ObjectLocator.bat ${TARGET_NAME} ${CMAKE_BINARY_DIR}/CMakeScriptOutput ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}.dir/$<CONFIGURATION> $<TARGET_PROPERTY:${TARGET_NAME},SOURCES>
                 COMMENT "Locating object files")
-        else ()
+        elseif (NOT WIN32)
             # Specific to Makefile generator
             set_target_properties (${TARGET_NAME} PROPERTIES RULE_LAUNCH_LINK
                 "${CMAKE_SOURCE_DIR}/cmake/Scripts/ObjectLocator.sh ${TARGET_NAME} ${CMAKE_BINARY_DIR}/CMakeScriptOutput ${CMAKE_CURRENT_BINARY_DIR} <OBJECTS>\n")


Fixed bug in FindFFmpeg cmake script.

Fixed bug in FindFFmpeg cmake script.

--- cmake/TbagFindPackage/FindFFmpeg.cmake
+++ cmake/TbagFindPackage/FindFFmpeg.cmake
@@ -154,7 +154,9 @@
     list (APPEND FFmpeg_LIBRARIES ${avdevice_LIBRARIES})
 endif ()

-list (REMOVE_DUPLICATES FFmpeg_INCLUDE_DIRS)
+if (FFmpeg_INCLUDE_DIRS)
+    list (REMOVE_DUPLICATES FFmpeg_INCLUDE_DIRS)
+endif ()

 mark_as_advanced (FFmpeg_FOUND
                   FFmpeg_LIBRARIES


cmake: boost : we are in  boost 1.44 now !

--- cmake/qibuild/modules/boostutils.cmake
+++ cmake/qibuild/modules/boostutils.cmake
@@ -3,15 +3,15 @@
 function(boost_flib _suffix _libname)
   flib(BOOST_${_suffix} OPTIMIZED NAMES
                           "boost_${_libname}-mt"
-                          "boost_${_libname}-xgcc40-mt-1_38"
-                          "libboost_${_libname}-vc80-mt-1_38"
-                          "libboost_${_libname}-vc90-mt-1_38"
+                          "boost_${_libname}-xgcc40-mt-1_44"
+                          "libboost_${_libname}-vc80-mt-1_44"
+                          "libboost_${_libname}-vc90-mt-1_44"
                           )
   flib(BOOST_${_suffix} DEBUG NAMES
                           "boost_${_libname}-mt-d"
-                          "boost_${_libname}-xgcc40-mt-1_38"
-                          "libboost_${_libname}-vc80-mt-gd-1_38"
-                          "libboost_${_libname}-vc90-mt-gd-1_38"
+                          "boost_${_libname}-xgcc40-mt-1_44"
+                          "libboost_${_libname}-vc80-mt-gd-1_44"
+                          "libboost_${_libname}-vc90-mt-gd-1_44"
                           "boost_${_libname}-mt"
                           )
 endfunction()
@@ -19,15 +19,15 @@
 function(boost_flib_static _suffix _libname)
   flib(BOOST_${_suffix} OPTIMIZED PATH_SUFFIXES static NAMES
                           "boost_${_libname}-mt"
-                          "boost_${_libname}-xgcc40-mt-1_38"
-                          "libboost_${_libname}-vc80-mt-1_38"
-                          "libboost_${_libname}-vc90-mt-1_38"
+                          "boost_${_libname}-xgcc40-mt-1_44"
+                          "libboost_${_libname}-vc80-mt-1_44"
+                          "libboost_${_libname}-vc90-mt-1_44"
                           )
   flib(BOOST_${_suffix} DEBUG PATH_SUFFIXES static NAMES
                           "boost_${_libname}-mt-d"
-                          "boost_${_libname}-xgcc40-mt-1_38"
-                          "libboost_${_libname}-vc80-mt-gd-1_38"
-                          "libboost_${_libname}-vc90-mt-gd-1_38"
+                          "boost_${_libname}-xgcc40-mt-1_44"
+                          "libboost_${_libname}-vc80-mt-gd-1_44"
+                          "libboost_${_libname}-vc90-mt-gd-1_44"
                           "boost_${_libname}-mt"
                           )
 endfunction()


added gold as a default linker

added gold as a default linker

--- src/cmake/flags.cmake
+++ src/cmake/flags.cmake
@@ -1,5 +1,6 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -pedantic")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")

 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -ggdb")


return prefix path in ament_index_has_resource (#155)

--- ament_cmake_core/cmake/index/ament_index_has_resource.cmake
+++ ament_cmake_core/cmake/index/ament_index_has_resource.cmake
@@ -15,8 +15,8 @@
 #
 # Check if the index contains a specific resource.
 #
-# :param var: the flag if the requested resource exists
-# :type var: boolean flag
+# :param var: the prefix path if the resource exists, FALSE otherwise
+# :type var: string or FALSE
 # :param resource_type: the type of the resource
 # :type resource_type: string
 # :param resource_name: the name of the resource
@@ -53,7 +53,7 @@
   foreach(path IN LISTS prefix_path)
     if(EXISTS
         "${path}/share/ament_index/resource_index/${resource_type}/${resource_name}")
-      set(retval TRUE)
+      set(retval "${path}")
       break()
     endif()
   endforeach()


Run find_package(Mono) twice again

Run find_package(Mono) twice again

--- dev/cmake/Modules/FindCsharp.cmake
+++ dev/cmake/Modules/FindCsharp.cmake
@@ -40,7 +40,7 @@
   endif( )
 else( UNIX )
   find_package( Mono )
-  #find_package( Mono )
+  find_package( Mono )
 endif( )

 if( CSHARP_DOTNET_FOUND )


Use absl_ prefix for public target

Use absl_ prefix for public target

--- CMake/AbseilHelpers.cmake
+++ CMake/AbseilHelpers.cmake
@@ -122,7 +122,11 @@
   )

   if (NOT ABSL_CC_LIB_TESTONLY OR ABSL_RUN_TESTS)
-    set(_NAME "absl_internal_${ABSL_CC_LIB_NAME}")
+    if (ABSL_CC_LIB_PUBLIC)
+      set(_NAME "absl_${ABSL_CC_LIB_NAME}")
+    else()
+      set(_NAME "absl_internal_${ABSL_CC_LIB_NAME}")
+    endif()

     # Check if this is a header-only library
     if (ABSL_CC_LIB_SRCS)


fftw

fftw

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

--- library/NektarCommon.cmake
+++ library/NektarCommon.cmake
@@ -46,6 +46,11 @@
     INCLUDE (FindMetis)
     ADD_DEFINITIONS(-DNEKTAR_USING_METIS)
 ENDIF( NEKTAR_USE_METIS )
+
+IF( NEKTAR_USE_FFTW )
+    INCLUDE (FindFFTW)
+    ADD_DEFINITIONS(-DNEKTAR_USING_FFTW)
+ENDIF( NEKTAR_USE_FFTW )

 IF( NEKTAR_USE_MKL )
     INCLUDE (FindMKL)
@@ -130,9 +135,12 @@
         ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )

         IF( NEKTAR_USE_METIS )
-            TARGET_LINK_LIBRARIES(${name}
-                optimized ${METIS_LIB} debug ${METIS_LIB} )
-            ENDIF( NEKTAR_USE_METIS )
+            TARGET_LINK_LIBRARIES(${name} optimized ${METIS_LIB} debug ${METIS_LIB} )
+        ENDIF( NEKTAR_USE_METIS )
+
+        IF( NEKTAR_USE_FFTW )
+            TARGET_LINK_LIBRARIES(${name} optimized ${FFTW_LIB} debug ${FFTW_LIB})
+        ENDIF( NEKTAR_USE_FFTW )
     ENDIF( NEKTAR_USE_BLAS_LAPACK )
 ENDMACRO(SET_LAPACK_LINK_LIBRARIES name)


[Build] Generalised the module_python_add CMake macro to any type of scripts (Shell, Python, Perl, Ruby, etc).

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1483,8 +1483,15 @@
 endmacro (module_binary_add)

 ##
-# Add a Python script to be installed
-macro (module_python_add _script_file)
+# Add a (Shell, Python, Perl, Ruby, etc) script to be installed.
+#
+# The parameter is the relative file path of the (template) script to
+# be installed. That template file must end with the '.in' suffix.
+# Indeed, the project variables (wrapped by @@ signs) of the template file
+# are evaluated and expanded thanks to the configure command.
+# The '.in' extension of the script is dropped once installed.
+#
+macro (module_script_add _script_file)
   #
   set (_full_script_src_path ${CMAKE_CURRENT_SOURCE_DIR}/${_script_file}.in)
   set (_full_script_path ${CMAKE_CURRENT_BINARY_DIR}/${_script_file})
@@ -1492,11 +1499,14 @@
 	#
     configure_file (${_full_script_src_path} ${_full_script_path} @ONLY)

-    # Add the 'scripts_${MODULE_NAME}' target, depending on the
-    # converted (Python) scripts
-    add_custom_target (scripts_${MODULE_NAME} ALL DEPENDS ${_full_script_path})
-
-    # Install the (Python) script file
+	# Extract the file name (only) from the full file path
+	get_filename_component (_script_alone ${_script_file} NAME)
+
+	# Add the 'scripts_${MODULE_NAME}' target, depending on the
+    # converted (Shell, Python, Perl, Ruby, etc) scripts
+    add_custom_target (${_script_alone}_script ALL DEPENDS ${_full_script_path})
+
+    # Install the (Shell, Python, Perl, Ruby, etc) script file
     install (PROGRAMS ${_full_script_path} DESTINATION bin COMPONENT devel)

   else (EXISTS ${_full_script_src_path})
@@ -1505,7 +1515,6 @@
   endif (EXISTS ${_full_script_src_path})

   # Register the binary target in the project (for reporting purpose)
-  get_filename_component (_script_alone ${_script_file} NAME)
   list (APPEND PROJ_ALL_BIN_TARGETS ${_script_alone})
   set (PROJ_ALL_BIN_TARGETS ${PROJ_ALL_BIN_TARGETS} PARENT_SCOPE)

@@ -1514,7 +1523,7 @@
   list (APPEND ${MODULE_NAME}_ALL_EXECS ${_script_alone})
   set (${MODULE_NAME}_ALL_EXECS ${${MODULE_NAME}_ALL_EXECS} PARENT_SCOPE)

-endmacro (module_python_add)
+endmacro (module_script_add)

 ##
 # Installation of the CMake import helper, so that third party projects


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

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


Don't add -pthreads compiler flag on MSVC.

--- globals.cmake
+++ globals.cmake
@@ -94,7 +94,9 @@

 	if(COMMAND cotire)
 		add_definitions(-DGLM_FORCE_RADIANS -DGLM_FORCE_DEPTH_ZERO_TO_ON -DGLM_ENABLE_EXPERIMENTAL -DGLM_FORCE_CXX14)
-		add_compile_options(-pthread)
+		if(NOT MSVC)
+			add_compile_options(-pthread)
+		endif()
 		set_property(GLOBAL PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH "${MIRRAGE_ROOT_DIR}/dependencies")
 		set_property(GLOBAL PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${MIRRAGE_ROOT_DIR}/dependencies/nuklear;${MIRRAGE_ROOT_DIR}/src;${MIRRAGE_ROOT_DIR}/dependencies/moodycamel/concurrentqueue.h")
 		set_property(GLOBAL PROPERTY COTIRE_ADD_UNITY_BUILD FALSE)


COMP: Use correct boost library dir.

COMP: Use correct boost library dir.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -135,7 +135,7 @@
     ExternalProject_Get_Property(${proj} install_dir)

     if(WIN32)
-      set(BOOST_LIBRARYDIR "${install_dir}/bin")
+      set(BOOST_LIBRARYDIR "${install_dir}/lib")
     endif()

     # Manual install commands (for a MITK super-build install)


From Michael Platings, fix for build with cmake 2.6.x

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -22,7 +22,9 @@

 IF(APPLE)
     # do nothing
-ELSEIF(CMAKE_CL_64 OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8))
+ELSEIF(CMAKE_CL_64)
+    SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
+ELSEIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8)
     SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
 ELSE()
     SET(FBX_LIBDIR ${FBX_LIBDIR}/x86)


From Nico Kruithof, "This patch makes sure that FindOSG.cmake finds OSG when it is compiled as a 64 bit library, as the libraries are installed in the lib64 directory and not lib"

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -27,13 +27,19 @@
         NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
         PATHS
         ${OSG_DIR}/lib/Debug
+        ${OSG_DIR}/lib64/Debug
         ${OSG_DIR}/lib
+        ${OSG_DIR}/lib64
         $ENV{OSG_DIR}/lib/debug
+        $ENV{OSG_DIR}/lib64/debug
         $ENV{OSG_DIR}/lib
+        $ENV{OSG_DIR}/lib64
         $ENV{OSG_DIR}
         $ENV{OSGDIR}/lib
+        $ENV{OSGDIR}/lib64
         $ENV{OSGDIR}
         $ENV{OSG_ROOT}/lib
+        $ENV{OSG_ROOT}/lib64
         NO_DEFAULT_PATH
     )

@@ -58,13 +64,19 @@
         NAMES ${MYLIBRARYNAME}
         PATHS
         ${OSG_DIR}/lib/Release
+        ${OSG_DIR}/lib64/Release
         ${OSG_DIR}/lib
+        ${OSG_DIR}/lib64
         $ENV{OSG_DIR}/lib/Release
+        $ENV{OSG_DIR}/lib64/Release
         $ENV{OSG_DIR}/lib
+        $ENV{OSG_DIR}/lib64
         $ENV{OSG_DIR}
         $ENV{OSGDIR}/lib
+        $ENV{OSGDIR}/lib64
         $ENV{OSGDIR}
         $ENV{OSG_ROOT}/lib
+        $ENV{OSG_ROOT}/lib64
         NO_DEFAULT_PATH
     )


adding arch

adding arch

--- installer/macosx/Custom_10.9.cmake
+++ installer/macosx/Custom_10.9.cmake
@@ -4,6 +4,7 @@

 #set(CMAKE_BUILD_TYPE "Debug")
 set(CMAKE_BUILD_TYPE "Release")
+set(CMAKE_OSX_ARCHITECTURES  "arm64;x86_64")
 set(CMAKE_VERBOSE_MAKEFILE ON)
 #set(BUILD_JACK_OPCODES OFF)
 set(BUILD_STATIC_LIBRARY ON)


vigra.cmake: Updated default commit.

vigra.cmake: Updated default commit.

--- vigra.cmake
+++ vigra.cmake
@@ -22,7 +22,7 @@
 include (nose)

 # select the desired VIGRA commit
-set(DEFAULT_VIGRA_VERSION "fd5d9bf7")
+set(DEFAULT_VIGRA_VERSION "494bd66423782280f31239b12dd2e7a6184d916b")
 IF(NOT DEFINED VIGRA_VERSION)
     SET(VIGRA_VERSION "${DEFAULT_VIGRA_VERSION}")
 ENDIF()


Update os/android.toolchain.cmake

Update os/android.toolchain.cmake

--- os/android.toolchain.cmake
+++ os/android.toolchain.cmake
@@ -29,7 +29,7 @@
 # POSSIBILITY OF SUCH DAMAGE.

 # ------------------------------------------------------------------------------
-#  Android CMake toolchain file, for use with the Android NDK r5-r10d
+#  Android CMake toolchain file, for use with the Android NDK r5-r11c
 #  Requires cmake 2.6.3 or newer (2.8.9 or newer is recommended).
 #  See home page: https://github.com/taka-no-me/android-cmake
 #
@@ -218,7 +218,7 @@
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

 # NDK search paths
-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r11c -r11b -r11 -r10e -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if( NOT DEFINED ANDROID_NDK_SEARCH_PATHS )
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -1683,7 +1683,7 @@
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86", "mips", "arm64-v8a", "x86_64", "mips64" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : from r5 to r10d; set only for NDK
+#   ANDROID_NDK_RELEASE : from r5 to r11c; set only for NDK
 #   ANDROID_NDK_RELEASE_NUM : numeric ANDROID_NDK_RELEASE version (1000*major+minor)
 #   ANDROID_ARCH_NAME : "arm", "x86", "mips", "arm64", "x86_64", "mips64" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot


Fix copyright header

Fix copyright header


i#1569 AArch64: add no32 support to package.cmake

Adds support for skipping 32-bit builds in package.cmake.

Review-URL: https://codereview.appspot.com/319300043

--- make/package.cmake
+++ make/package.cmake
@@ -1,5 +1,5 @@
 # **********************************************************
-# Copyright (c) 2011-2015 Google, Inc.    All rights reserved.
+# Copyright (c) 2011-2017 Google, Inc.    All rights reserved.
 # Copyright (c) 2009-2010 VMware, Inc.    All rights reserved.
 # **********************************************************

@@ -52,6 +52,7 @@
 set(arg_outdir ".")    # directory in which to place deliverables
 set(arg_cacheappend "")# string to append to every build's cache
 set(arg_no64 OFF)      # skip the 64-bit builds?
+set(arg_no32 OFF)      # skip the 32-bit builds?
 set(arg_invoke "")     # sub-project package.cmake to invoke
 # also takes args parsed by runsuite_common_pre.cmake, in particular:
 set(arg_preload "")    # cmake file to include prior to each 32-bit build
@@ -78,6 +79,9 @@
   endif ()
   if (${arg} MATCHES "^no64")
     set(arg_no64 ON)
+  endif ()
+  if (${arg} MATCHES "^no32")
+    set(arg_no32 ON)
   endif ()
   if (${arg} MATCHES "^invoke=")
     string(REGEX REPLACE "^invoke=" "" arg_invoke "${arg}")
@@ -130,17 +134,19 @@
     BUILD_SAMPLES:BOOL=OFF
     " OFF ON "")
 endif (NOT arg_no64)
-# open-source now, no reason for debug to not be internal as well
-testbuild_ex("release-32" OFF "" OFF ON "")
-# note that we do build TOOLS so our DynamoRIOTarget{32,64}.cmake files match
-# and the DynamoRIOTarget{32,64}-debug.cmake file is complete (i#390)
-testbuild_ex("debug-32" OFF "
-  DEBUG:BOOL=ON
-  INTERNAL:BOOL=ON
-  BUILD_DOCS:BOOL=OFF
-  BUILD_DRSTATS:BOOL=OFF
-  BUILD_SAMPLES:BOOL=OFF
-  " OFF ON "")
+if (NOT arg_no32)
+  # open-source now, no reason for debug to not be internal as well
+  testbuild_ex("release-32" OFF "" OFF ON "")
+  # note that we do build TOOLS so our DynamoRIOTarget{32,64}.cmake files match
+  # and the DynamoRIOTarget{32,64}-debug.cmake file is complete (i#390)
+  testbuild_ex("debug-32" OFF "
+    DEBUG:BOOL=ON
+    INTERNAL:BOOL=ON
+    BUILD_DOCS:BOOL=OFF
+    BUILD_DRSTATS:BOOL=OFF
+    BUILD_SAMPLES:BOOL=OFF
+    " OFF ON "")
+endif (NOT arg_no32)

 if (NOT arg_invoke STREQUAL "")
   message("\n***************\ninvoking sub-project ${arg_invoke}\n")


Using wget if cmake downloads empty file for boost compute

--- CMakeModules/build_boost_compute.cmake
+++ CMakeModules/build_boost_compute.cmake
@@ -41,7 +41,16 @@
 message(STATUS "  validating ${archive}")
 file(MD5 "${archive}" md5)
 if(NOT "${md5}" STREQUAL "${MD5}")
-  message(FATAL_ERROR "${archive}: invalid check sum ${md5}. Expected was ${MD5}")
+    MESSAGE(WARNING "${archive}: Invalid check sum ${md5}. Expected was ${MD5}")
+    IF("${md5}" STREQUAL "d41d8cd98f00b204e9800998ecf8427e")
+        MESSAGE(STATUS "Trying wget ${URL}")
+        EXECUTE_PROCESS(COMMAND wget -O ${archive} ${URL})
+        FILE(MD5 "${archive}" md5_)
+        IF(NOT "${md5_}" STREQUAL "${MD5}")
+            MESSAGE(FATAL_ERROR "${archive}: Invalid check sum ${md5_}. Expected was ${MD5}")
+        ENDIF(NOT "${md5_}" STREQUAL "${MD5}")
+        MESSAGE(STATUS "wget successful")
+    ENDIF("${md5}" STREQUAL "d41d8cd98f00b204e9800998ecf8427e")
 endif()

 if(IS_DIRECTORY ${srcDir})


added newline at the end of pgmlink_export.h.cmake

--- include/pgmlink/pgmlink_export.h.cmake
+++ include/pgmlink/pgmlink_export.h.cmake
@@ -4,4 +4,5 @@
 #define PGMLINK_EXPORT
 #define PGMLINK_NO_EXPORT

-#endif /* PGMLINK_EXPORT_H */+#endif /* PGMLINK_EXPORT_H */
+


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -44,6 +44,7 @@
 Name[sr@ijekavianlatin]=VLC
 Name[sr@latin]=VLC
 Name[sv]=VLC
+Name[tr]=VLC
 Name[ug]=VLC
 Name[uk]=VLC
 Name[x-test]=xxVLCxx
@@ -85,6 +86,7 @@
 Comment[sr@ijekavianlatin]=VLC kao pozadina Phonona
 Comment[sr@latin]=VLC kao pozadina Phonona
 Comment[sv]=Phonon VLC-gränssnitt
+Comment[tr]=Phonon VLC arkaucu
 Comment[uk]=Модуль VLC Phonon
 Comment[x-test]=xxPhonon VLC backendxx
 Comment[zh_CN]= Phonon VLC 后端


Fix compilation with intel compiler

Fix compilation with intel compiler

msgpack fails to compile in C++11 mode

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -45,6 +45,12 @@
     set(CMAKE_SHARED_LINKER_FLAGS "/SUBSYSTEM:CONSOLE")
 endif()

+if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
+    # Some version of intel compiler (icc 14 at least) have only partial support
+    # for C++11
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMSGPACK_USE_CPP03")
+endif()
+
 if(EMSCRIPTEN)
     if(BUILD_SHARED_LIBS)
         # Shared libs where not tested and a lot of changes to the build system
@@ -97,6 +103,10 @@
 macro(remove_msvc_warning _warn_)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd${_warn_}")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd${_warn_}")
+endmacro()
+
+macro(remove_intel_warning _warn_)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -diag-disable ${_warn_}")
 endmacro()

 if(MSVC)
@@ -178,17 +188,18 @@
     # Warnings for PGI compiler
     add_warning_flag("-Minform=warn")

-    if(${CMAKE_C_COMPILER} MATCHES "icc.*$")
+    if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
         # external function definition with no prior declaration
-        set(CHEMFILES_CXX_WARNINGS "${CHEMFILES_CXX_WARNINGS} -diag-disable 1418")
+        remove_intel_warning(1418)
         # Intel compiler is too strict in errors about 'explicit' keyword
-        set(CHEMFILES_CXX_WARNINGS "${CHEMFILES_CXX_WARNINGS} -diag-disable 2304")
-        set(CHEMFILES_CXX_WARNINGS "${CHEMFILES_CXX_WARNINGS} -diag-disable 2305")
+        remove_intel_warning(2304)
+        remove_intel_warning(2305)
         # parameter "args" was never referenced in variadic templates
-        set(CHEMFILES_CXX_WARNINGS "${CHEMFILES_CXX_WARNINGS} -diag-disable 869")
+        remove_intel_warning(869)
         # exception specification for implicitly declared virtual function ...
         # This is an issue with compiler generated destructors and noexcept
-        set(CHEMFILES_CXX_WARNINGS "${CHEMFILES_CXX_WARNINGS} -diag-disable 811")
+        remove_intel_warning(811)
+        remove_intel_warning(809)
     endif()
 endif()


cmake: Add paths to look for libcrpcut

cmake: Add paths to look for libcrpcut

--- cmake/FindLibCRPCUT.cmake
+++ cmake/FindLibCRPCUT.cmake
@@ -38,8 +38,11 @@
       crpcut
     PATHS
       /usr/lib
+      /usr/lib64
       /usr/local/lib
+      /usr/local/lib64
       /opt/local/lib
+      /opt/usr/lib64
       /home/ska/local/lib
       ENV LIBRARY_PATH
       ENV LD_LIBRARY_PATH)


version for develop branch at release

version for develop branch at release

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

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

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

     if( NOT DEFINED ${PV_NAME}_VERSION_PATCH )


Use system wide or user provided clang if available. (#4792)

Co-authored-by: Robert Kimball <f8f4fb0160c4e961c3d6afdbdcc40cfc21344ca8@intel.com>

--- cmake/external_llvm.cmake
+++ cmake/external_llvm.cmake
@@ -14,31 +14,47 @@
 # limitations under the License.
 # ******************************************************************************

-set(LLVM_PROJECT_ROOT ${EXTERNAL_PROJECTS_ROOT}/llvm-project)
-set(LLVM_INSTALL_ROOT ${EXTERNAL_PROJECTS_ROOT}/llvm)
-
-configure_file(${CMAKE_SOURCE_DIR}/cmake/llvm_fetch.cmake.in ${LLVM_PROJECT_ROOT}/CMakeLists.txt @ONLY)
-
-execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}"
-    -DCMAKE_GENERATOR_PLATFORM:STRING=${CMAKE_GENERATOR_PLATFORM}
-    -DCMAKE_GENERATOR_TOOLSET:STRING=${CMAKE_GENERATOR_TOOLSET}
-    .
-    WORKING_DIRECTORY "${LLVM_PROJECT_ROOT}")
-
-# clone and build llvm
-include(ProcessorCount)
-ProcessorCount(N)
-if(("${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles") AND (NOT N EQUAL 0))
-    execute_process(COMMAND "${CMAKE_COMMAND}" --build . -- -j${N}
-        WORKING_DIRECTORY "${LLVM_PROJECT_ROOT}")
-else()
-    execute_process(COMMAND "${CMAKE_COMMAND}" --build .
-        WORKING_DIRECTORY "${LLVM_PROJECT_ROOT}")
+# Try to find system or user provide Clang first and use it if available
+# Clang Config does not support version so find LLVM first
+# To install Clang 9 system wide On Ubuntu 18.04
+# sudo apt-get install clang-9 libclang-9-dev
+# For user installed clang, provide path to LLVMConfig.cmake by passing
+# -DCMAKE_PREFIX_PATH=<path to dir with LLVMConfig.cmake>
+# When you configure CMake
+find_package(LLVM 9 CONFIG)
+if(LLVM_FOUND)
+    find_package(Clang CONFIG
+        HINTS ${LLVM_DIR}/../lib/cmake/clang ${LLVM_DIR}/../clang NO_DEFAULT_PATH)
 endif()

-message(STATUS "LLVM_INSTALL_ROOT: ${LLVM_INSTALL_ROOT}")
-find_package(Clang REQUIRED CONFIG
-    HINTS ${LLVM_INSTALL_ROOT}/lib/cmake/clang NO_DEFAULT_PATH)
+if(NOT Clang_FOUND)
+    set(LLVM_PROJECT_ROOT ${EXTERNAL_PROJECTS_ROOT}/llvm-project)
+    set(LLVM_INSTALL_ROOT ${EXTERNAL_PROJECTS_ROOT}/llvm)
+
+    configure_file(${CMAKE_SOURCE_DIR}/cmake/llvm_fetch.cmake.in ${LLVM_PROJECT_ROOT}/CMakeLists.txt @ONLY)
+
+    execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}"
+        -DCMAKE_GENERATOR_PLATFORM:STRING=${CMAKE_GENERATOR_PLATFORM}
+        -DCMAKE_GENERATOR_TOOLSET:STRING=${CMAKE_GENERATOR_TOOLSET}
+        .
+        WORKING_DIRECTORY "${LLVM_PROJECT_ROOT}")
+
+    # clone and build llvm
+    include(ProcessorCount)
+    ProcessorCount(N)
+    if(("${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles") AND (NOT N EQUAL 0))
+        execute_process(COMMAND "${CMAKE_COMMAND}" --build . -- -j${N}
+            WORKING_DIRECTORY "${LLVM_PROJECT_ROOT}")
+    else()
+        execute_process(COMMAND "${CMAKE_COMMAND}" --build .
+            WORKING_DIRECTORY "${LLVM_PROJECT_ROOT}")
+    endif()
+
+    message(STATUS "LLVM_INSTALL_ROOT: ${LLVM_INSTALL_ROOT}")
+    find_package(Clang REQUIRED CONFIG
+        HINTS ${LLVM_INSTALL_ROOT}/lib/cmake/clang NO_DEFAULT_PATH)
+endif()
+
 message(STATUS "CLANG_CMAKE_DIR: ${CLANG_CMAKE_DIR}")
 message(STATUS "CLANG_INCLUDE_DIRS: ${CLANG_INCLUDE_DIRS}")
 message(STATUS "LLVM_INCLUDE_DIRS: ${LLVM_INCLUDE_DIRS}")


qi_create_gtest: unparsed arguments are sources

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -60,6 +60,7 @@
 # The name of the test will always be the name of the target.
 #
 # \flag:NO_ADD_TEST Do not call add_test, just create the binary
+# \argn: source files, like the SRC group, argn and SRC will be merged
 # \param:TIMEOUT The timeout of the test
 # \group:SRC Sources
 # \group:DEPENDS Dependencies to pass to use_lib
@@ -74,7 +75,7 @@
   cmake_parse_arguments(ARG "NO_ADD_TEST" "TIMEOUT" "SRC;DEPENDS;ARGUMENTS" ${ARGN})

   # First, create the target
-  qi_create_bin(${name} SRC ${ARG_SRC} NO_INSTALL)
+  qi_create_bin(${name} SRC ${ARG_SRC} ${ARG_UNPARSED_ARGUMENTS} NO_INSTALL)
   qi_use_lib(${name} ${ARG_DEPENDS})

   # Build a correct xml output name


cmake: Support installing toolchains in "Program Files"

Support installing toolchains in "Program Files", or more generally,
in paths that contain whitespace. This is a common bug for new users
to discover.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/toolchain-gcc.cmake
+++ cmake/toolchain-gcc.cmake
@@ -90,11 +90,11 @@

 assert(LIBGCC_DIR "LIBGCC_DIR not found")

-LIST(APPEND LIB_INCLUDE_DIR -L${LIBGCC_DIR})
+LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
 LIST(APPEND TOOLCHAIN_LIBS gcc)

 set(LIBC_INCLUDE_DIR ${SYSROOT_DIR}/include)
-set(LIBC_LIBRARY_DIR ${SYSROOT_DIR}/lib/${NEWLIB_DIR})
+set(LIBC_LIBRARY_DIR "\"${SYSROOT_DIR}\"/lib/${NEWLIB_DIR}")

 # For CMake to be able to test if a compiler flag is supported by the
 # toolchain we need to give CMake the necessary flags to compile and
@@ -103,7 +103,7 @@
 # CMake checks compiler flags with check_c_compiler_flag() (Which we
 # wrap with target_cc_option() in extentions.cmake)
 foreach(isystem_include_dir ${NOSTDINC})
-  list(APPEND isystem_include_flags -isystem ${isystem_include_dir})
+  list(APPEND isystem_include_flags -isystem "\"${isystem_include_dir}\"")
 endforeach()
 set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--unresolved-symbols=ignore-in-object-files)
 string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")


Handle the case where brew --prefix fails

--- cmake/FindQScintilla.cmake
+++ cmake/FindQScintilla.cmake
@@ -50,11 +50,14 @@
         # brew --prefix outputs a newline, so we must strip it

         set(QSCINTILLA_BREW_ROOT "${BREW_PREFIX_OUTPUT}")
-        set(QSCINTILLA_BREW_INCLUDE_DIR "${QSCINTILLA_BREW_ROOT}/include")
-        set(QSCINTILLA_BREW_LIBRARY "${QSCINTILLA_BREW_ROOT}/lib")
         message(STATUS "qscintilla2's brew root is ${QSCINTILLA_BREW_ROOT}")
+      else()
+        set(QSCINTILLA_BREW_ROOT "/usr/local/opt/qscintilla2")
+        message(WARNING "brew --prefix failed, I'm guessing it's ${QSCINTILLA_BREW_ROOT}")
       endif()

+      set(QSCINTILLA_BREW_INCLUDE_DIR "${QSCINTILLA_BREW_ROOT}/include")
+      set(QSCINTILLA_BREW_LIBRARY "${QSCINTILLA_BREW_ROOT}/lib")
     else()
       message(WARNING "Couldn't find the qscintilla2 formula.")
     endif()


Add quiet option to InstallPackage.cmake

Former-commit-id: 2b7c6729922f65e0590387a6cbde8b1ae46d4846

--- cmake/InstallPackage.cmake
+++ cmake/InstallPackage.cmake
@@ -28,7 +28,7 @@
 function(install_package pkg_name)
     file(LOCK $ENV{HOME} DIRECTORY GUARD FUNCTION TIMEOUT 600)

-    set(options CONFIG MODULE CHECK DEBUG INSTALL_PREFIX_PKGNAME)
+    set(options CONFIG MODULE CHECK QUIET DEBUG INSTALL_PREFIX_PKGNAME)
     set(oneValueArgs VERSION INSTALL_DIR BUILD_DIR FIND_NAME TARGET_NAME)
     set(multiValueArgs HINTS PATHS PATH_SUFFIXES COMPONENTS DEPENDS CMAKE_ARGS LIBRARY_NAMES TARGET_HINTS)
     cmake_parse_arguments(PARSE_ARGV 1 PKG "${options}" "${oneValueArgs}" "${multiValueArgs}")
@@ -66,6 +66,9 @@
     endif()
     if(PKG_CONFIG)
         set(CONFIG CONFIG)
+    endif()
+    if(PKG_QUIET)
+        set(QUIET QUIET)
     endif()
     if(PKG_COMPONENTS)
         set(COMPONENTS COMPONENTS)
@@ -118,18 +121,18 @@
                 NO_CMAKE_SYSTEM_PATH
                 )
         if(${pkg_find_name}_LIBRARY)
-            message(STATUS "Found ${pkg_find_name}_LIBRARY: ${${pkg_find_name}_LIBRARY}")
-            find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS})
+            message(DEBUG "Found ${pkg_find_name}_LIBRARY: ${${pkg_find_name}_LIBRARY}")
+            find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS} ${QUIET})
         endif()
     elseif(PKG_MODULE)
-        find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS})
+        find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS} ${QUIET})
     else()
         find_package(${pkg_find_name} ${PKG_VERSION}
                 HINTS ${PKG_HINTS}
                 PATHS ${PKG_PATHS}
                 PATH_SUFFIXES ${PKG_PATH_SUFFIXES}
                 ${COMPONENTS} ${PKG_COMPONENTS}
-                ${CONFIG}
+                ${CONFIG} ${QUIET}
                 # These lets us ignore system packages
                 NO_SYSTEM_ENVIRONMENT_PATH #5
                 NO_CMAKE_PACKAGE_REGISTRY #6
@@ -167,12 +170,15 @@
             if(TARGET ${tgt})
                 set(${pkg_name}_TARGET ${tgt})
                 set(${pkg_name}_TARGET ${tgt} PARENT_SCOPE)
+                set(${pkg_name}_FOUND TRUE PARENT_SCOPE)
+                set(${pkg_find_name}_TARGET ${tgt} PARENT_SCOPE)
+                set(${pkg_find_name}_FOUND TRUE PARENT_SCOPE)
                 mark_as_advanced(${pkg_name}_TARGET)
                 break()
             endif()
         endforeach()
         if(${pkg_name}_TARGET)
-            message(STATUS "Found ${pkg_name}: [${${pkg_name}_TARGET}]")
+            message(DEBUG "Found ${pkg_name}: [${${pkg_name}_TARGET}]")
         else()
             message(WARNING "Found ${pkg_name} but no target matches [${PKG_TARGET_HINTS}]")
         endif()
@@ -278,16 +284,17 @@
                 PATH_SUFFIXES ${pkg_name} ${pkg_find_name} lib ${pkg_find_name}/lib ${pkg_name}/lib
                 NO_DEFAULT_PATH REQUIRED
                 )
-        find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS} REQUIRED)
+        find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS} ${QUIET} REQUIRED)
     endif()

     if(PKG_MODULE)
-        find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS} REQUIRED)
+        find_package(${pkg_find_name} ${PKG_VERSION} ${COMPONENTS} ${PKG_COMPONENTS} ${QUIET} REQUIRED)
     else()
         find_package(${pkg_find_name} ${PKG_VERSION}
                 HINTS ${pkg_install_dir}
                 PATH_SUFFIXES ${PKG_PATH_SUFFIXES}
                 ${COMPONENTS} ${PKG_COMPONENTS}
+                ${CONFIG} ${QUIET}
                 NO_DEFAULT_PATH REQUIRED)
     endif()

@@ -305,12 +312,15 @@
         if(TARGET ${tgt})
             set(${pkg_name}_TARGET ${tgt})
             set(${pkg_name}_TARGET ${tgt} PARENT_SCOPE)
+            set(${pkg_name}_FOUND TRUE PARENT_SCOPE)
+            set(${pkg_find_name}_TARGET ${tgt} PARENT_SCOPE)
+            set(${pkg_find_name}_FOUND TRUE PARENT_SCOPE)
             mark_as_advanced(${pkg_name}_TARGET)
             break()
         endif()
     endforeach()
     if(${pkg_name}_TARGET)
-        message(STATUS "Found ${pkg_name}: [${${pkg_name}_TARGET}]")
+        message(DEBUG "Found ${pkg_name}: [${${pkg_name}_TARGET}]")
     else()
         message(WARNING "Found ${pkg_name} but no target matches [${PKG_TARGET_HINTS}]")
     endif()


removed -D_GLIBCXX_USE_CXX11_ABI=0

removed -D_GLIBCXX_USE_CXX11_ABI=0

--- cmake/TaichiCXXFlags.cmake
+++ cmake/TaichiCXXFlags.cmake
@@ -63,9 +63,6 @@
     message("Using float32 (single) precision as real")
 endif()

-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
-message("Using -D_GLIBCXX_USE_CXX11_ABI=0")
-
 if (TC_USE_MPI)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTC_USE_MPI")
     message("Using MPI")


Pass compiling for sandy-bridge

Pass compiling for sandy-bridge

--- cmake/TaichiCXXFlags.cmake
+++ cmake/TaichiCXXFlags.cmake
@@ -8,7 +8,11 @@
     OptimizeForArchitecture()
     message("**************************************************")
     message("* CPU feature detection done.")
-    if (USE_AVX2)
+    if ("${TARGET_ARCHITECTURE}" MATCHES "sandy-bridge")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTC_ISE_NONE")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSANDY_BRIDGE")
+        message("* Using Instruction Set Externsion: [None]")
+    elseif (USE_AVX2)
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTC_ISE_AVX2")
         message("* Using Instruction Set Externsion: [AVX2]")
     elseif (USE_AVX)