SetUpMacOS.cmake: let FindX11.cmake find X11 headers on Mac OS X

FindX11.cmake already has the path being added here listed before
/usr/include, so we do not need to add it. XQuartz headers are
actually in /opt/X11/include, and /usr/X11R6 is a link to /opt/X11.

--- cmake/modules/SetUpMacOS.cmake
+++ cmake/modules/SetUpMacOS.cmake
@@ -1,9 +1,5 @@
 set(ROOT_ARCHITECTURE macosx)
 set(ROOT_PLATFORM macosx)
-
-#---This is needed to help CMake to locate the X11 headers in the correct place and not under /usr/include
-set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/X11R6)
-#---------------------------------------------------------------------------------------------------------

 if (CMAKE_SYSTEM_NAME MATCHES Darwin)
   EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"


Issue #2: Include VTK 7.1 in SuperBuild.

--- CMake/ExternalProjects/VTK.cmake
+++ CMake/ExternalProjects/VTK.cmake
@@ -24,7 +24,7 @@
   message(FATAL_ERROR "VTK_DIR variable is defined but corresponds to non-existing directory")
 endif()

-set(version "7.0.0")
+set(version "7.1.0")
 set(location "${NIFTK_EP_TARBALL_LOCATION}/VTK-${version}.tar.gz")

 mpMacroDefineExternalProjectVariables(VTK ${version} ${location})
@@ -82,7 +82,7 @@
     INSTALL_DIR ${proj_INSTALL}
     URL ${proj_LOCATION}
     URL_MD5 ${proj_CHECKSUM}
-    PATCH_COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/VTK.patch
+#    PATCH_COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/VTK.patch
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
         ${EP_COMMON_ARGS}


Change hunter glfw package version to 3.3.0-p2

The version prior to this change, 3.3.0-p4, increased minimum cmake
version to 3.8. To bring it down to 3.0, the version of glfw from hunter
had to be changed to 3.3.0-p2

--- CMakeModules/Hunter/config.cmake
+++ CMakeModules/Hunter/config.cmake
@@ -59,7 +59,7 @@
     OPTION_BUILD_TOOLS=ON
     gtest_force_shared_crt=ON)

-myhunter_config(glfw 3.3.0-p4
+myhunter_config(glfw 3.3.0-p2
     GLFW_BUILD_DOCS=OFF
     GLFW_BUILD_EXAMPLES=OFF
     GLFW_BUILD_TESTS=OFF)


Fix hunter config to use glm 0.9.7.6 if GCC > 7.2

--- CMakeModules/Hunter/config.cmake
+++ CMakeModules/Hunter/config.cmake
@@ -13,7 +13,14 @@
 myhunter_config(Boost 1.66.0)
 myhunter_config(freetype 2.6.2)
 myhunter_config(OpenCL 2.1-p0)
-myhunter_config(glm 0.9.8.5)
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.2.0")
+        myhunter_config(glm 0.9.7.6)
+    else()
+        myhunter_config(glm 0.9.8.5)
+    endif()
+endif ()

 #myhunter_config(freeimage hunter-v3.17.0)
 ##freeimag dependencies


Use OFF_DEPENDENTS for forcing flash hca option off when HPRE != 1

--- source/chip/STM32/STM32F1/distortos-sources.cmake
+++ source/chip/STM32/STM32F1/distortos-sources.cmake
@@ -399,17 +399,17 @@
 endif(NOT CONFIG_CHIP MATCHES "STM32F100")

 if(distortos_Clocks_14_HPRE STREQUAL 1)
-	unset(internal)
+	unset(offDependents)
 else()
-	set(internal INTERNAL)
+	set(offDependents "HPRE != 1")
 endif()

 distortosSetConfiguration(BOOLEAN
 		distortos_Memory_01_Flash_half_cycle_access
 		OFF
-		HELP "Enable flash half cycle access option in FLASH->ACR register."
-		OUTPUT_NAME CONFIG_CHIP_STM32F1_FLASH_HALF_CYCLE_ACCESS_ENABLE
-		${internal})
+		OFF_DEPENDENTS ${offDependents}
+		HELP "Enable flash half cycle access option in FLASH->ACR register. Has to be disabled when HPRE != 1."
+		OUTPUT_NAME CONFIG_CHIP_STM32F1_FLASH_HALF_CYCLE_ACCESS_ENABLE)

 target_include_directories(distortos PUBLIC
 		${CMAKE_CURRENT_LIST_DIR}/../include


set cxx14 cmake variable correctly

set cxx14 cmake variable correctly

The with_cxx14 flag was incorrectly set as a variable instead of settings the
cached variable. This would cause some weirdness (cached and non-cached
variables of the same name coexist). Before this patch, "DEAL_II_WITH_CXX14 =
OFF" would be printed twice in the feature section.

--- cmake/checks/check_01_cxx_features.cmake
+++ cmake/checks/check_01_cxx_features.cmake
@@ -48,7 +48,7 @@
 ENDIF()

 IF(DEFINED DEAL_II_WITH_CXX11 AND NOT DEAL_II_WITH_CXX11)
-  SET(DEAL_II_WITH_CXX14 OFF)
+  SET(DEAL_II_WITH_CXX14 OFF CACHE STRING "" FORCE)
 ENDIF()


Add CMake variable for language project for library output path

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -24,7 +24,8 @@
   if(MSVC)
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
   endif()
-
+else()
+  set(SimpleITK_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
 endif()


pch config changed

pch config changed

--- cmake/PrecompiledHeader.cmake
+++ cmake/PrecompiledHeader.cmake
@@ -68,32 +68,32 @@
     ENDIF(NOT _sourceFound)
   ENDIF(MSVC)

-  IF(CMAKE_COMPILER_IS_GNUCXX)
-    GET_FILENAME_COMPONENT(_name ${_input} NAME)
-    SET(_source "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
-    SET(_outdir "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch")
-    MAKE_DIRECTORY(${_outdir})
-    SET(_output "${_outdir}/.c++")
-
-    STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
-    SET(_compiler_FLAGS ${${_flags_var_name}})
-
-    GET_DIRECTORY_PROPERTY(_directory_flags INCLUDE_DIRECTORIES)
-    FOREACH(item ${_directory_flags})
-      LIST(APPEND _compiler_FLAGS "-I${item}")
-    ENDFOREACH(item)
-
-    GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
-    LIST(APPEND _compiler_FLAGS ${_directory_flags})
-
-    SEPARATE_ARGUMENTS(_compiler_FLAGS)
-    MESSAGE("${CMAKE_CXX_COMPILER} -DPCHCOMPILE ${_compiler_FLAGS} -x c++-header -o {_output} ${_source}")
-    ADD_CUSTOM_COMMAND(
-      OUTPUT ${_output}
-      COMMAND ${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}
-      DEPENDS ${_source} )
-    ADD_CUSTOM_TARGET(${_targetName}_gch DEPENDS ${_output})
-    ADD_DEPENDENCIES(${_targetName} ${_targetName}_gch)
-    SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "-include ${_name} -Winvalid-pch")
-  ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+  #IF(CMAKE_COMPILER_IS_GNUCXX)
+  #  GET_FILENAME_COMPONENT(_name ${_input} NAME)
+  #  SET(_source "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
+  #  SET(_outdir "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch")
+  #  MAKE_DIRECTORY(${_outdir})
+  #  SET(_output "${_outdir}/.c++")
+  #
+  #  STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
+  #  SET(_compiler_FLAGS ${${_flags_var_name}})
+  #
+  #  GET_DIRECTORY_PROPERTY(_directory_flags INCLUDE_DIRECTORIES)
+  #  FOREACH(item ${_directory_flags})
+  #    LIST(APPEND _compiler_FLAGS "-I${item}")
+  #  ENDFOREACH(item)
+  #
+  #  GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
+  #  LIST(APPEND _compiler_FLAGS ${_directory_flags})
+  #
+  #  SEPARATE_ARGUMENTS(_compiler_FLAGS)
+  #  MESSAGE("${CMAKE_CXX_COMPILER} -DPCHCOMPILE ${_compiler_FLAGS} -x c++-header -o {_output} ${_source}")
+  #  ADD_CUSTOM_COMMAND(
+  #    OUTPUT ${_output}
+  #    COMMAND ${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header -o ${_output} ${_source}
+  #    DEPENDS ${_source} )
+  #  ADD_CUSTOM_TARGET(${_targetName}_gch DEPENDS ${_output})
+  #  ADD_DEPENDENCIES(${_targetName} ${_targetName}_gch)
+  #  SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "-include ${_name} -Winvalid-pch")
+  #ENDIF(CMAKE_COMPILER_IS_GNUCXX)
 ENDMACRO(use_precompiled_header)


build: switch to nana 1.7.4

build: switch to nana 1.7.4

--- cmake/SetupDependencies.cmake
+++ cmake/SetupDependencies.cmake
@@ -24,8 +24,8 @@

 CPMAddPackage(
     NAME nana
-    GITHUB_REPOSITORY khrynczenko/nana
-    GIT_TAG 7d7b3840cbe6d19fa1bda486bbf5e49d31f752b5
+    GITHUB_REPOSITORY cnjinhao/nana
+    GIT_TAG v1.7.4
     OPTIONS
         "MSVC_USE_STATIC_RUNTIME OFF"
         "NANA_CMAKE_ENABLE_PNG ${NANA_PNG}"
@@ -105,4 +105,4 @@
     set(SSL_LIB_FILE "")
     set(FONTCONFIG_LIB "-lfontconfig")
     set(PTHREAD_LIB "-lpthread")
-endif()+endif()


CMake: added the `$` marker for consistency with the `^` marker we put in commit 4d2017ec.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -143,7 +143,7 @@
   execute_process(COMMAND ${CLANG_FORMAT_EXE} -version
                   OUTPUT_VARIABLE CLANG_FORMAT_VERSION
                   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-  string(REGEX REPLACE "^.*clang-format version ([.0-9]+).*" "\\1" CLANG_FORMAT_VERSION "${CLANG_FORMAT_VERSION}")
+  string(REGEX REPLACE "^.*clang-format version ([.0-9]+).*$" "\\1" CLANG_FORMAT_VERSION "${CLANG_FORMAT_VERSION}")

   if(CLANG_FORMAT_VERSION VERSION_LESS CLANG_FORMAT_VERSION_MINIMUM)
     message(STATUS "ClangFormat ${CLANG_FORMAT_VERSION} was found, but version ${CLANG_FORMAT_VERSION_MINIMUM}+ is needed to run the ClangFormat test")


FIX: Always build protobuf from source

FIX: Always build protobuf from source

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -144,18 +144,7 @@
 ENDFUNCTION()

 SET(PROTOBUF_VERSION 3.1)
-IF(NOT CMAKE_CROSSCOMPILING)
-    FIND_PACKAGE(Protobuf ${PROTOBUF_VERSION})
-
-    IF(PROTOBUF_FOUND)
-        SET_PROTOBUF_VERSION()
-        IF("${PROTOBUF_VERSION}" VERSION_LESS "3.1.0")
-            SET(PROTOBUF_FOUND OFF)
-        ELSE()
-            PROMPT_PROTOBUF_LIB()
-        ENDIF()
-    ENDIF(PROTOBUF_FOUND)
-ELSE()
+IF(CMAKE_CROSSCOMPILING)
     build_protobuf(protobuf_host TRUE)
     LIST(APPEND external_project_dependencies protobuf_host)


fix 'check' test for cmake > 2.4

fix 'check' test for cmake > 2.4

--- cmake/modules/FindCheck.cmake
+++ cmake/modules/FindCheck.cmake
@@ -9,13 +9,13 @@
 # Look for the library.
 FIND_LIBRARY(CHECK_LIBRARY NAMES check)

-IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
+IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
   # handle the QUIETLY and REQUIRED arguments and set CHECK_FOUND to TRUE if
   # all listed variables are TRUE
   INCLUDE(FindPackageHandleStandardArgs)

   FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check "Please install 'check' and 'check-devel' packages" CHECK_LIBRARY CHECK_INCLUDE_DIR)
-ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
+ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)

 IF(CHECK_FOUND)
   SET( CHECK_LIBRARIES ${CHECK_LIBRARY} )


update install tbb

update install tbb

--- common/cmake/installTBB.cmake
+++ common/cmake/installTBB.cmake
@@ -2,27 +2,16 @@
 ## SPDX-License-Identifier: Apache-2.0

 IF (EMBREE_INSTALL_DEPENDENCIES)
-  IF (TBB_FOUND)
-    IF (WIN32)
-      INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
-      INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
-      SET(EMBREE_INSTALLED_TBB ${CMAKE_INSTALL_LIBDIR}/${EMBREE_TBB_LIBRARY_NAME}.lib)
-    ELSEIF (APPLE)
-      INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
-      SET(EMBREE_INSTALLED_TBB ${CMAKE_INSTALL_LIBDIR}/lib${EMBREE_TBB_LIBRARY_NAME}.dylib)
+  IF (TARGET TBB::tbb)
+    GET_TARGET_PROPERTY(LIB_PATH TBB::tbb IMPORTED_LOCATION_RELEASE)
+    IF(WIN32)
+      INSTALL(FILES ${LIB_PATH} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
+      GET_TARGET_PROPERTY(IMPLIB_PATH TBB::tbb IMPORTED_IMPLIB_RELEASE)
+      INSTALL(FILES ${IMPLIB_PATH} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ELSE()
-      INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
-      SET(EMBREE_INSTALLED_TBB ${CMAKE_INSTALL_LIBDIR}/lib${EMBREE_TBB_LIBRARY_NAME}.so.2)
+      INSTALL(FILES ${LIB_PATH} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
     ENDIF()
+  ELSE()
+    MESSAGE(SEND_ERROR "Target TBB::tbb not found during install.")
   ENDIF()
-#  IF (TBB_DEBUG_FOUND)
-#    IF (WIN32)
-#      INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
-#      INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
-#    ELSEIF (APPLE)
-#      INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
-#    ELSE()
-#      INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
-#    ENDIF()
-#  ENDIF()
 ENDIF()


fixing OSX variables

fixing OSX variables

--- build/toolchains/raspberrypi.cmake
+++ build/toolchains/raspberrypi.cmake
@@ -18,8 +18,8 @@
 include_recursive_dirs(${PROJECT_SOURCE_DIR}/core/src/*.h)

 # add sources and include headers
-set(OSX_EXTENSIONS_FILES *.mm *.cpp)
-foreach(_ext ${OSX_EXTENSIONS_FILES})
+set(RPI_EXTENSIONS_FILES *.cpp)
+foreach(_ext ${RPI_EXTENSIONS_FILES})
     find_sources_and_include_directories(
         ${PROJECT_SOURCE_DIR}/rpi/src/*.h
         ${PROJECT_SOURCE_DIR}/rpi/src/${_ext})


temporarily(?) added secondary gmock release name for non debug builds

--- cmake-modules/FindGoogleMock.cmake
+++ cmake-modules/FindGoogleMock.cmake
@@ -68,7 +68,7 @@
 	)

 	if( WIN32 AND GOOGLEMOCK_LIBRARY)
-		find_library( GOOGLEMOCK_LIBRARY_DEBUG NAMES gmockd
+		find_library( GOOGLEMOCK_LIBRARY_DEBUG NAMES gmockd gmock
 			PATHS
 			~/usr/lib
 		   /opt/local/lib


Update TrackCapRevisionNumber.cmake

Update TrackCapRevisionNumber.cmake

--- cmake/TrackCapRevisionNumber.cmake
+++ cmake/TrackCapRevisionNumber.cmake
@@ -8,14 +8,14 @@
     INCLUDE(${CMAKE_BINARY_DIR}/cmake/QueryGitRevision.cmake)
     SET_PROPERTY(DIRECTORY ${CMAKE_SOURCE_DIR} APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/.git/HEAD)
     ADD_CUSTOM_COMMAND(
-        OUTPUT ${CMAKE_SOURCE_DIR}/src/version.cc
+        OUTPUT ${CMAKE_SOURCE_DIR}/source/version.cc
         DEPENDS ${CMAKE_SOURCE_DIR}/.git/${GIT_HEAD_REF}
         COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake/QueryGitRevision.cmake
         COMMENT "Query git revision"
         )
     ADD_CUSTOM_TARGET(
         version.cc ALL
-        DEPENDS ${CMAKE_SOURCE_DIR}/src/version.cc
+        DEPENDS ${CMAKE_SOURCE_DIR}/source/version.cc
         )
     INSTALL(
         FILES ${CMAKE_SOURCE_DIR}/include/cap/version.h


fixed FindGoogleTest.cmake

fixed FindGoogleTest.cmake

--- cmake/modules/FindGoogleTest.cmake
+++ cmake/modules/FindGoogleTest.cmake
@@ -77,7 +77,7 @@
     set(
         GOOGLETEST_INCLUDE_DIRS
         ${GOOGLETEST_INCLUDE_DIR}
-        ${GOOGLEMCK_INCLUDE_DIR}
+        ${GOOGLEMOCK_INCLUDE_DIR}
     )
 endif(GOOGLETEST_FOUND)


SuperBuild: update ossim to 1.8.20-1

SuperBuild: update ossim to 1.8.20-1

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -47,8 +47,8 @@
   # archive version
   ExternalProject_Add(${proj}
     PREFIX ${proj}
-    URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
-    URL_MD5 f77d574ab2817bcc36633f77824facb5
+    URL "http://download.osgeo.org/ossim/source/ossim-1.8.20/ossim-1.8.20-1.tar.gz"
+    URL_MD5 87c861c005a180343a2fdaf1d54d9b58
     BINARY_DIR ${OSSIM_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Give it a shot at removing the forced compiler-checks

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -309,11 +309,6 @@
 set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS")
 # Change the type of target generated for try_compile() so it'll work when cross-compiling
 set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
-# Skip the platform compiler checks for cross compiling.
-set(CMAKE_CXX_COMPILER_FORCED TRUE)
-set(CMAKE_CXX_COMPILER_WORKS TRUE)
-set(CMAKE_C_COMPILER_FORCED TRUE)
-set(CMAKE_C_COMPILER_WORKS TRUE)
 # All iOS/Darwin specific settings - some may be redundant.
 set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
 set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")


Android dependencies lookup were broken

Android dependencies lookup were broken

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -1576,7 +1576,7 @@
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+set( CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}" "${OGRE_DEPENDENCIES_DIR}" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )


ENH: fix directory too long for MSVC (limitation of windows api)

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -20,7 +20,7 @@
   list(APPEND FROM_SUPERBUILD_LIST ${NEW_SB_PROJECT})
   set(${NEW_SB_PROJECT}_DEPENDENCIES "")
   set(${NEW_SB_PROJECT}_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/build)
-  set(${NEW_SB_PROJECT}_SB_SRC ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/src/${NEW_SB_PROJECT})
+  set(${NEW_SB_PROJECT}_SB_SRC ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/src)
   set(${NEW_SB_PROJECT}_SB_CONFIG)
   set(_SB_${NEW_SB_PROJECT}_ROOT ${SB_INSTALL_PREFIX})
 endmacro(SETUP_SUPERBUILD)


Fixed error in clean-all.cmake

Fixed error in clean-all.cmake

--- clean-all.cmake
+++ clean-all.cmake
@@ -1,4 +1,3 @@
-// clean-all.cmake
 set(cmake_generated ${CMAKE_BINARY_DIR}/CMakeCache.txt
   ${CMAKE_BINARY_DIR}/cmake_install.cmake
   ${CMAKE_BINARY_DIR}/Makefile


cmake: re-run if gen_defines changes

cmake: re-run if gen_defines changes

Since gen_defines.py is run using execute_process() at CMake time, the
entire build system must be regenerated if it changes. Add the
dependency tracking to make this possible.

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

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -15,6 +15,7 @@
 # functions in kconfigfunctions.py.
 #
 # See the Devicetree user guide in the Zephyr documentation for details.
+set(GEN_DEFINES_SCRIPT          ${ZEPHYR_BASE}/scripts/dts/gen_defines.py)
 set(ZEPHYR_DTS                  ${PROJECT_BINARY_DIR}/zephyr.dts)
 set(DEVICETREE_UNFIXED_H        ${PROJECT_BINARY_DIR}/include/generated/devicetree_unfixed.h)
 set(DEVICETREE_UNFIXED_LEGACY_H ${PROJECT_BINARY_DIR}/include/generated/devicetree_legacy_unfixed.h)
@@ -156,6 +157,7 @@
   set_property(DIRECTORY APPEND PROPERTY
     CMAKE_CONFIGURE_DEPENDS
     ${include_files}
+    ${GEN_DEFINES_SCRIPT}
     )

   #
@@ -198,7 +200,7 @@
   # Run gen_defines.py to create a header file and zephyr.dts.
   #

-  set(CMD_EXTRACT ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/dts/gen_defines.py
+  set(CMD_EXTRACT ${PYTHON_EXECUTABLE} ${GEN_DEFINES_SCRIPT}
   --dts ${BOARD}.dts.pre.tmp
   --dtc-flags '${EXTRA_DTC_FLAGS}'
   --bindings-dirs ${DTS_ROOT_BINDINGS}


cmake: disable assembly optimizations only when necessary

--- cmake/ssl.cmake
+++ cmake/ssl.cmake
@@ -17,7 +17,14 @@
     set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl)
   endif()
   if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt")
-    set(OPENSSL_NO_ASM ON)  # make boringssl buildable with Visual Studio
+    if (MSVC AND NOT CMAKE_GENERATOR STREQUAL "Ninja")
+      # Visual Studio build with assembly optimizations is broken,
+      # but it works with Ninja generator.
+      # This will get eventually fixed in cmake, but until then
+      # we need to disable assembly optimizations.
+      # See https://github.com/grpc/grpc/issues/16376
+      set(OPENSSL_NO_ASM ON)
+    endif()
     add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
     if(TARGET ssl)
       set(_gRPC_SSL_LIBRARIES ssl)


updates from linux cmake build changes

updates from linux cmake build changes

--- cmake/UbiTrackFindCoreLibraries.cmake
+++ cmake/UbiTrackFindCoreLibraries.cmake
@@ -100,4 +100,4 @@
   add_definitions(-DHAVE_SWIG)
   SET(HAVE_SWIG 1)
   INCLUDE(${SWIG_USE_FILE})
-ENDIF(SWIG_FOUND)+ENDIF(SWIG_FOUND)


Unbreak build on OpenBSD by not adding -Wl,-z,defs to linker flags.
This is similar to the fix for FreeBSD in r226862. Without this patch,
the build aborts when linkling libLTO.so, complaining about undefined
references to assert2, cxa_atexit, etc.

Patch by Stefan Kempf!

http://reviews.llvm.org/D14236

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -132,7 +132,8 @@
 # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
 # build might work on ELF but fail on MachO/COFF.
 if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
-        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND
+        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
+        ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
    NOT LLVM_USE_SANITIZER)
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
 endif()


[t:4871] fix problems using clang on linux
use TOKU_ALLOW_DEPRECATED
don't use PIE

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@44595 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -20,8 +20,8 @@
   _LARGEFILE64_SOURCE
   )

-if (CMAKE_SYSTEM_NAME MATCHES Darwin)
-  message(WARNING "Setting TOKU_ALLOW_DEPRECATED on Darwin.  TODO: remove this.")
+if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_C_COMPILER_ID MATCHES Clang)
+  message(WARNING "Setting TOKU_ALLOW_DEPRECATED on Darwin and with clang.  TODO: remove this.")
   add_c_defines(TOKU_ALLOW_DEPRECATED)
 endif ()

@@ -153,10 +153,10 @@
 ## good for binaries
 function(add_common_options_to_binary_targets)
   foreach(tgt ${ARGN})
-    add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden -fPIE")
     if (CMAKE_C_COMPILER_ID STREQUAL Clang)
-      add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-fPIE -Wl,-pie")
+      add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden")
     else ()
+      add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden -fPIE")
       add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-fPIE -pie")
     endif ()
   endforeach(tgt)


folly: windows: inline debug info into .obj rather than use .pdb

Summary:
We see flakey builds to conflicting writes to .pdb files; the error
message suggests enabling `/FS` which is already enabled.  Some serious
internet research reveals that we can put the debug info into `.obj` files
instead of having everyone contend with the same `.pdb` file.

```
C:\PROGRA~2\MIB055~1\2017\BUILDT~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe  /nologo /TP -DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE -DGFLAGS_IS_A_DLL=1 -DWIN32_LEAN_AND_MEAN -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_SCL_SECURE_NO_WARNINGS -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -IZ:\shipit\folly -I. -IZ:\installed\boost-6XBjAEHS6zoZVAY7uQHhSxYamF-vUNWngO1YaEIiiko\include\boost-1_69 -IZ:\installed\double-conversion-8uX8TcZDEz7gXyY70bMXqPUF2uLqH2OTWBffkLfU7FU\include -IZ:\installed\gflags-Md0yNU5drHUQ6MCdsB6iC0WS5YX-RFZk_eTHNKjkcPs\include -IZ:\installed\glog-_3NtzkcZDkkSFkgC70vwofqrnao05-mPxEa0E546a9g\include -IZ:\installed\libevent-TIUwVyvnVZZVHDsesjdIidM_iH4er-_6pEE0X4dzuL4\include -IZ:\installed\openssl-0G_glZ7y5BplM752sREIHKuam0GcoPqw7m6yjEGefyE\include -IZ:\installed\zlib-lxujVMVR4hhdh4-S0SCxkb55DAWh5ISCLWbfL7m7hwg\include -IZ:\installed\zstd-M8csiME1A2X7ZGECWeSGmWbqM1glHd6xoskhyPHgpaw\include -IZ:\installed\snappy-Z3WzzGXxgX1-6zSn4NdRg8Z3coQaz7Gob3gGoomN95E\include -IZ:\installed\fmt-W9-akKzyOlf4GoHcFsw1_rCxt3y0ghyjO3gb5Xve1Gc\include /DWIN32 /D_WINDOWS /W3 /GR  /MD /Zi /O2 /Ob1 /DNDEBUG   /EHs /GF /Zc:referenceBinding /Zc:rvalueCast /Zc:implicitNoexcept /Zc:strictStrings /Zc:threadSafeInit /Zc:throwingNew /permissive- /std:c++latest /bigobj /favor:blend /Zc:inline /Wall /MP /Gw /Gy /Qpar /Oi /Ot /wd4191 /wd4291 /wd4309 /wd4310 /wd4366 /wd4587 /wd4592 /wd4628 /wd4723 /wd4724 /wd4868 /wd4996 /wd4068 /wd4091 /wd4146 /wd4800 /wd4018 /wd4365 /wd4388 /wd4389 /wd4100 /wd4459 /wd4505 /wd4701 /wd4702 /wd4061 /wd4127 /wd4200 /wd4201 /wd4296 /wd4316 /wd4324 /wd4355 /wd4371 /wd4435 /wd4514 /wd4548 /wd4571 /wd4574 /wd4582 /wd4583 /wd4619 /wd4623 /wd4625 /wd4626 /wd4643 /wd4647 /wd4668 /wd4706 /wd4710 /wd4711 /wd4714 /wd4820 /wd5026 /wd5027 /wd5031 /wd5045 /we4099 /we4129 /we4566 /showIncludes /FoCMakeFiles\folly_base.dir\folly\Format.cpp.obj /FdCMakeFiles\folly_base.dir\ /FS -c Z:\shipit\folly\folly\Format.cpp

Z:\shipit\folly\folly\Format.cpp: fatal error C1041: cannot open program database 'Z:\build\folly\CMakeFiles\folly_base.dir\vc140.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS

ninja: build stopped: subcommand failed.
```

Reviewed By: yfeldblum

Differential Revision: D20752325

fbshipit-source-id: 4f20871d54cc0973b3d025734dd0886c202c839b

--- CMake/FollyCompilerMSVC.cmake
+++ CMake/FollyCompilerMSVC.cmake
@@ -85,6 +85,22 @@
 foreach(flag_var CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG)
   if (${flag_var} MATCHES "/Ob0")
     string(REGEX REPLACE "/Ob0" "" ${flag_var} "${${flag_var}}")
+  endif()
+endforeach()
+
+# When building with Ninja, or with /MP enabled, there is the potential
+# for multiple processes to need to lock the same pdb file.
+# The /FS option (which is implicitly enabled by /MP) is widely believed
+# to be the solution for this, but even with /FS enabled the problem can
+# still randomly occur.
+# https://stackoverflow.com/a/58020501/149111 suggests that /Z7 should be
+# used; rather than placing the debug info into a .pdb file it embeds it
+# into the object files in a similar way to gcc/clang which should reduce
+# contention and potentially make the build faster... but at the cost of
+# larger object files
+foreach(flag_var CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG)
+  if (${flag_var} MATCHES "/Zi")
+    string(REGEX REPLACE "/Zi" "/Z7" ${flag_var} "${${flag_var}}")
   endif()
 endforeach()


Fix FindOGRE's handling of OgreBuildSettings.h.

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -140,11 +140,14 @@
 findpkg_framework(OGRE)

 # locate Ogre include files
-find_path(OGRE_CONFIG_INCLUDE_DIR NAMES OgreConfig.h HINTS ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
+find_path(OGRE_CONFIG_INCLUDE_DIR NAMES OgreBuildSettings.h HINTS ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
 find_path(OGRE_INCLUDE_DIR NAMES OgreRoot.h HINTS ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
 set(OGRE_INCOMPATIBLE FALSE)

-if (OGRE_INCLUDE_DIR AND OGRE_CONFIG_INCLUDE_DIR)
+if (OGRE_INCLUDE_DIR)
+  if (NOT OGRE_CONFIG_INCLUDE_DIR)
+    set(OGRE_CONFIG_INCLUDE_DIR ${OGRE_INCLUDE_DIR})
+  endif ()
   # determine Ogre version
   file(READ ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h OGRE_TEMP_VERSION_CONTENT)
   get_preprocessor_entry(OGRE_TEMP_VERSION_CONTENT OGRE_VERSION_MAJOR OGRE_VERSION_MAJOR)


attempt to force local assip first

attempt to force local assip first

--- CMakeModules/FindAssimp.cmake
+++ CMakeModules/FindAssimp.cmake
@@ -13,8 +13,9 @@
 )

 FIND_LIBRARY( Assimp_LIBRARY
-  NAMES assimp assimp32.lib assimp.lib
+  NAMES assimp assimp32.lib assimp.lib libassimp.a
   ${CMAKE_SOURCE_DIR}/3rdPartyLibraries/Assimp/lib/Release
+  ${CMAKE_SOURCE_DIR}/3rdPartyLibraries/Assimp/lib/
   /usr/lib64
   /usr/lib
   /usr/local/lib


Warning message (VTK not found) has been moved to CMake

--- Examples/Build/vtkMy/vtkMy.cmake
+++ Examples/Build/vtkMy/vtkMy.cmake
@@ -25,8 +25,16 @@

 ELSE (USE_VTK_FILE)

-  MESSAGE("Warning. This project is supposed to work with VTK, which might be found on your system as different flavours: installed VTK, or (multiple) built VTK. Please, make sure that the VTK_INSTALL_PATH or VTK_BINARY_PATH setting reflect which VTK you are planning to use, then set one of the USE_INSTALLED_VTK or USE_BUILT_VTK to ON.")
   SET (VTKMY_CAN_BUILD 0)
+
+  # This warning message has been moved to CMake since 1.1
+  # You can safely remove the following lines if you are using Cmake > 1.0
+
+  IF (CMAKE_MAJOR_VERSION MATCHES "^1$")
+    IF (CMAKE_MINOR_VERSION MATCHES "^0$")
+      MESSAGE("Warning. VTK might be found on your system as different flavours: installed VTK or built VTK. Please make sure that the VTK_INSTALL_PATH or VTK_BINARY_PATH setting reflects which VTK you are planning to use, then set ONE of the USE_INSTALLED_VTK or USE_BUILT_VTK setting to ON.")
+    ENDIF (CMAKE_MINOR_VERSION MATCHES "^0$")
+  ENDIF (CMAKE_MAJOR_VERSION MATCHES "^1$")

 ENDIF (USE_VTK_FILE)


THRIFT-2850 CMake: mingw32-toolchain, set static linker flags

fixes: libgcc_s dependencies on Windows

Now we have an installer and the compiler as executable

--- build/cmake/mingw32-toolchain.cmake
+++ build/cmake/mingw32-toolchain.cmake
@@ -17,3 +17,8 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+set(BUILD_SHARED_LIBS OFF)
+SET(CMAKE_EXE_LINKER_FLAGS "-static")
+set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-static-libgcc")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-static-libstdc++")


Build: allow -Werror to be disabled even on CI branches (#3351)

Slight reworking of -Werror logic to let the default behavior be
changed by setting a cmake variable. In particular, this allows us to
make a CI build disable -Werror when we need to.

Previously, having the "OpenmageIO_CI" env variable set trumped all
else and forced -Werror. Now it just contributes to the default behavior,
but setting `-DSTOP_ON_WARNING=OFF` and cmake config time can still
disable it.

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -82,10 +82,14 @@
 ###########################################################################
 # Turn on more detailed warnings and optionally consider warnings as errors
 #
-if (${PROJECT_NAME}_SUPPORTED_RELEASE)
+if (NOT ${PROJECT_NAME}_SUPPORTED_RELEASE OR DEFINED ENV{${PROJECT_NAME}_CI})
+    # For development branches (i.e., not a supported release), or when
+    # running CI, default to treating all warnings as errors.
+    option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
+else ()
+    # For release branches not doing a CI build default to just printing
+    # warnings but not letting them stop the build.
     option (STOP_ON_WARNING "Stop building if there are any compiler warnings" OFF)
-else ()
-    option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
 endif()
 option (EXTRA_WARNINGS "Enable lots of extra pedantic warnings" OFF)
 if (NOT MSVC)
@@ -93,11 +97,8 @@
     if (EXTRA_WARNINGS)
         add_compile_options ("-Wextra")
     endif ()
-    if (STOP_ON_WARNING OR DEFINED ENV{${PROJECT_NAME}_CI})
+    if (STOP_ON_WARNING)
         add_compile_options ("-Werror")
-        # N.B. Force CI builds to use -Werror, even if STOP_ON_WARNING has
-        # been switched off by default, which we may do in release
-        # branches.
     endif ()
 endif ()


fix CMake warning

fix CMake warning

--- components/ospcommon/cmake/ispc.cmake
+++ components/ospcommon/cmake/ispc.cmake
@@ -71,7 +71,7 @@
   MARK_AS_ADVANCED(ISPC_EXECUTABLE)
 ENDIF()

-SET(OSPRAY_ISPC_ADDRESSING 32 CACHE INT "32 vs 64 bit addressing in ispc")
+SET(OSPRAY_ISPC_ADDRESSING 32 CACHE STRING "32 vs 64 bit addressing in ispc")
 SET_PROPERTY(CACHE OSPRAY_ISPC_ADDRESSING PROPERTY STRINGS 32 64)
 MARK_AS_ADVANCED(OSPRAY_ISPC_ADDRESSING)


Suppress GCC warnings complaining about ignored attributes in amx.h

--- cmake/GlobalBuildConfig.cmake
+++ cmake/GlobalBuildConfig.cmake
@@ -13,9 +13,12 @@
 	set(CMAKE_COMPILER_IS_GNUCXX TRUE)
 endif()

-if(CMAKE_COMPILER_IS_GNUCC)
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
+if(CMAKE_COMPILERIS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+	set(flags "-m32 -Wno-attributes")
+	if(CMAKE_COMPILER_IS_GNUCC)
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flags}")
+	endif()
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flags}")
+	endif()
 endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
-endif()


Minor tweaks in Android toolchain file

Minor tweaks in Android toolchain file

--- cmake/android.toolchain.cmake
+++ cmake/android.toolchain.cmake
@@ -5,6 +5,8 @@
 #   toolchain in the 'sdks' subdirectory as created by
 #   './oryol setup android'
 #-------------------------------------------------------------------------------
+
+message("Target Platform: Android")

 set(ANDROID_PLATFORM "android-19" CACHE STRING "Android platform version")
 set(ANDROID_NDK_ABI "arm-linux-androideabi" CACHE STRING "Android ABI name")
@@ -86,7 +88,7 @@
     message(FATAL_ERROR "ant tool NOT FOUND (must be in path)!")
 endif()

-# set path to toolchain binaries
+# set paths to toolchain components
 set(ANDROID_SYSROOT "${ANDROID_TOOLCHAIN_ROOT}/sysroot")
 set(ANDROID_TOOLCHAIN_BIN "${ANDROID_TOOLCHAIN_ROOT}/bin")
 set(ANDROID_TOOLCHAIN_INCLUDE "${ANDROID_TOOLCHAIN_ROOT}/include")
@@ -132,9 +134,7 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

 set(CMAKE_SYSTEM_INCLUDE_PATH "${ANDROID_SYSROOT_INCLUDE}")
-
 set(ANDROID_C_FLAGS "${ORYOL_ANDROID_COMPILE_VERBOSE} -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -mthumb -DANDROID -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -Wa,--noexecstack -Wformat -Werror=format-security")
-
 set(ANDROID_LD_FLAGS "-shared --sysroot=${ANDROID_SYSROOT} -no-canonical-prefixes -march=armv7-a -Wl,--fix-cortex-a8 -Wl,--no-warn-mismatch -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now ${ANDROID_LINK_VERBOSE}")

 # c++ compiler flags


remove WASI support from emscripten.toolchain.cmake (now in wasisdk.toolchain.cmake)

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -16,7 +16,6 @@
 option(FIPS_EMSCRIPTEN_USE_FS "enable FS module" OFF)
 option(FIPS_EMSCRIPTEN_USE_DFE "enable Duplicate Function Elimination" OFF)
 option(FIPS_EMSCRIPTEN_USE_WASM "enable WebAssembly" ON)
-option(FIPS_EMSCRIPTEN_USE_WASI "enable WASI output" OFF)
 option(FIPS_EMSCRIPTEN_USE_SAFE_HEAP "enable SAFE_HEAP checks" OFF)
 option(FIPS_EMSCRIPTEN_USE_CPU_PROFILER "enable the built-in CPU profiler" OFF)
 option(FIPS_EMSCRIPTEN_USE_MEMORY_PROFILER "enable the built-in memory profiler" OFF)
@@ -35,11 +34,7 @@
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "how to represent initial memory content (0..2)")
 set(FIPS_EMSCRIPTEN_SHELL_HTML "" CACHE STRING "path to shell html file")

-if (FIPS_EMSCRIPTEN_USE_WASI)
-    set(FIPS_EMSCRIPTEN_POSTFIX ".wasm" CACHE STRING "emscripten output postfix")
-else()
-    set(FIPS_EMSCRIPTEN_POSTFIX ".html" CACHE STRING "emscripten output postfix")
-endif()
+set(FIPS_EMSCRIPTEN_POSTFIX ".html" CACHE STRING "emscripten output postfix")

 if (FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML)
     set(FIPS_EMSCRIPTEN_SHELL_HTML "${CMAKE_SOURCE_DIR}/${FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML}")
@@ -121,9 +116,6 @@
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1")
 else()
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=0")
-endif()
-if (FIPS_EMSCRIPTEN_USE_WASI)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s STANDALONE_WASM")
 endif()
 if (FIPS_EMSCRIPTEN_USE_CLOSURE)
     set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --closure 1")


add drakeCommon as an optional library

add drakeCommon as an optional library

it only exists in drake/master, but not the oh fork of drake.
this hack can be removed after the upgrade...

--- cmake/modules/FindDrake.cmake
+++ cmake/modules/FindDrake.cmake
@@ -10,16 +10,24 @@

 macro(find_drake_library varName name doc)
   find_library(${varName} ${name} HINTS ${_lib_dir_hint} DOC ${doc})
-  list(APPEND DRAKE_LIBRARIES ${${varName}})
   list(APPEND _library_var_names ${varName})
 endmacro()

 find_drake_library(DRAKE_RBM_LIBRARY drakeRBM "Drake RBM library")
+find_drake_library(DRAKE_COMMON_LIBRARY drakeCommon "Drake Common library")
 find_drake_library(DRAKE_JOINTS_LIBRARY drakeJoints "Drake Joints library")
 find_drake_library(DRAKE_SHAPES_LIBRARY drakeShapes "Drake Shapes library")
 find_drake_library(DRAKE_CHULL_LIBRARY drakeConvexHull "Drake Convex Hull library")
 find_drake_library(DRAKE_GEOMETRYUTIL_LIBRARY drakeGeometryUtil "Drake Geometry Util library")

+
+if(NOT DRAKE_COMMON_LIBRARY)
+  list(REMOVE_ITEM _library_var_names DRAKE_COMMON_LIBRARY)
+endif()
+
+foreach(varName ${_library_var_names})
+  list(APPEND DRAKE_LIBRARIES ${${varName}})
+endforeach()

 set(DRAKE_INCLUDE_DIRS
   ${DRAKE_INCLUDE_DIR}


Add support for yolov6r2 parsing

Add support for yolov6r2 parsing

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "d8e8462c9c218005c25f2423f88b5ca5d9589e04")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "a85bb00e45bdf306ae6654058ba45b1fd17f08f8")

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


Since parts of the AGG library depend on the freetype library, the AGG library must be added before the freetype library.

svn path=/trunk/; revision=9002

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -56,17 +56,6 @@
   )
   # Convert wxWidgets_LIBRARIES to full pathname form.
   cmake_link_flags(wxwidgets_LINK_FLAGS "${wxWidgets_LIBRARIES}")
-  if(WITH_FREETYPE)
-    set(
-    wxwidgets_COMPILE_FLAGS
-    "${wxwidgets_COMPILE_FLAGS} -I${FREETYPE_INCLUDE_DIR}"
-    )
-    set(
-    wxwidgets_LINK_FLAGS
-    ${wxwidgets_LINK_FLAGS}
-    ${FREETYPE_LIBRARIES}
-    )
-  endif(WITH_FREETYPE)
   include(agg)
   if(HAVE_AGG)
     set(
@@ -79,6 +68,17 @@
     ${AGG_LIBRARIES}
     )
   endif(HAVE_AGG)
+  if(WITH_FREETYPE)
+    set(
+    wxwidgets_COMPILE_FLAGS
+    "${wxwidgets_COMPILE_FLAGS} -I${FREETYPE_INCLUDE_DIR}"
+    )
+    set(
+    wxwidgets_LINK_FLAGS
+    ${wxwidgets_LINK_FLAGS}
+    ${FREETYPE_LIBRARIES}
+    )
+  endif(WITH_FREETYPE)
   set(DRIVERS_LINK_FLAGS
   ${DRIVERS_LINK_FLAGS}
   ${wxwidgets_LINK_FLAGS}


Update FW: change SIPP mem alloc to allow 4x ColorCamera to operate at the same time

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "c6f9eda4f47b4aa26538b7e79743d1940db74bb5")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "4959c559cf7979e1a1a5cbdd0f9a5cbd2299ecb2")

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


Initial BMI270 support

Initial BMI270 support

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "0db59ca9b81e4901f8bc49023fb8c0121be821a0")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "3dd9d30abaf960071b0b2e387386dd5f320af800")

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


px4fmu-v5 cmake config: re-add drivers/bmi055

Accidentally dropped in bad813e911061bc9d356b12673739ac1c48f02cb

--- cmake/configs/nuttx_px4fmu-v5_default.cmake
+++ cmake/configs/nuttx_px4fmu-v5_default.cmake
@@ -15,6 +15,7 @@
 	drivers/airspeed
 	drivers/blinkm
 	drivers/bma180
+	drivers/bmi055
 	drivers/bmi160
 	drivers/boards
 	drivers/bst


Remove unused option from VecCore external project recipe

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1396,7 +1396,7 @@
     BUILD_IN_SOURCE 0
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
     CMAKE_ARGS -G ${CMAKE_GENERATOR}
-               -DBUILD_TESTING=OFF -DBUILD_VC=${builtin_vc}
+               -DBUILD_TESTING=OFF
                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}


Updated jenkins cmake script

Updated jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -30,7 +30,7 @@
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
 set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})

-ctest_start("Experimental" QUIET)
+ctest_start(${JENKINS_DASHBOARD} QUIET)
 ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION} RETURN_VALUE CONFIGURING_RET_VALUE QUIET)
 ctest_build(RETURN_VALUE BUILDING_RET_VALUE QUIET)
 ctest_test(QUIET)


Fixed bug in jenkins cmake script

Fixed bug in jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -11,6 +11,11 @@
 set(CTEST_COVERAGE_CXX_FLAGS "-DCMAKE_CXX_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
 set(CTEST_COVERAGE_EXE_LD_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
 set(CTEST_COVERAGE_SHARED_LD_FLAGS "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
+
+# Check CMake version for QUIET parameter
+if(${CMAKE_MAJOR_VERSION} GREATER 3 OR (${CMAKE_MAJOR_VERSION} EQUAL 3 AND ${CMAKE_MINOR_VERSION} GREATER 2))
+    set(QUIET_ QUIET)
+endif()

 ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})

@@ -30,18 +35,18 @@
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
 set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})

-ctest_start("${JENKINS_DASHBOARD}" QUIET)
-ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION} RETURN_VALUE CONFIGURING_RET_VALUE QUIET)
-ctest_build(RETURN_VALUE BUILDING_RET_VALUE QUIET)
-ctest_test(QUIET)
-ctest_submit(QUIET)
+ctest_start("${JENKINS_DASHBOARD}" ${QUIET_})
+ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION} RETURN_VALUE CONFIGURING_RET_VALUE ${QUIET_})
+ctest_build(RETURN_VALUE BUILDING_RET_VALUE ${QUIET_})
+ctest_test(${QUIET_})
+ctest_submit(${QUIET_})
 if(CTEST_COVERAGE_COMMAND)
-    ctest_coverage(QUIET)
+    ctest_coverage(${QUIET_})
 endif()
 if(CTEST_MEMORYCHECK_COMMAND)
-    ctest_memcheck(QUIET)
+    ctest_memcheck(${QUIET_})
 endif()
-ctest_submit(QUIET)
+ctest_submit(${QUIET_})

 if(NOT CONFIGURING_RET_VALUE AND NOT BUILDING_RET_VALUE)
     message(0)


fixed IPP detection on 64-bit Windows (ticket #1294)

--- OpenCVFindIPP.cmake
+++ OpenCVFindIPP.cmake
@@ -99,6 +99,10 @@
     if (CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
         set(IPP_ARCH "em64t")
     endif()
+
+    if (CMAKE_CL_64)
+        set(IPP_ARCH "em64t")
+    endif()

     if(WIN32)
         set(IPP_SUFFIX "l")


Fix #24, use META_PROJECT_NAME in component name/desciptions

--- deploy/packages/pack-template.cmake
+++ deploy/packages/pack-template.cmake
@@ -47,21 +47,29 @@
 # Package components
 #

-set(CPACK_COMPONENTS_ALL runtime dev examples docs)
-
-set(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "Template library")
-set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Runtime components for template library")
+set(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "${META_PROJECT_NAME} library")
+set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Runtime components for ${META_PROJECT_NAME} library")

 set(CPACK_COMPONENT_DEV_DISPLAY_NAME "C/C++ development files")
-set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for template library")
+set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for ${META_PROJECT_NAME} library")
 set(CPACK_COMPONENT_DEV_DEPENDS runtime)

-set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Example applications")
-set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example applications for template library")
-set(CPACK_COMPONENT_EXAMPLES_DEPENDS runtime)
-
-set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation")
-set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation of template library")
+set(CPACK_COMPONENTS_ALL runtime dev)
+
+if (OPTION_BUILD_EXAMPLES)
+    set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Example applications")
+    set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example applications for ${META_PROJECT_NAME} library")
+    set(CPACK_COMPONENT_EXAMPLES_DEPENDS runtime)
+
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
+endif()
+
+if (OPTION_BUILD_DOCS)
+    set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation")
+    set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation of ${META_PROJECT_NAME} library")
+
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} docs)
+endif()

 #


Removing udev from findovr fixes a compilation issue in the Rekhi labs and without breaking other machines

--- CMakeModules/FindOVR.cmake
+++ CMakeModules/FindOVR.cmake
@@ -28,25 +28,24 @@

 # library was named libovr.a in 0.4.4 and libOVR.a in 0.5.0.1
-set(CMAKE_LIBRARY_PATH "/usr/lib64" ${CMAKE_LIBRARY_PATH})
 find_library(OVR_LIBRARIES libOVR.a libovr.a)
 find_library(OVR_LIBRARY_SO libOVRRT64_0.so.5)
 find_path(OVR_INCLUDE_DIR_LIB OVR.h)
 find_path(OVR_INCLUDE_DIR_SRC OVR_CAPI_GL.h)

-find_library(OVR_udev udev)
+# find_library(OVR_udev udev)
 find_library(OVR_pthread pthread)
 find_library(OVR_gl GL)
 find_library(OVR_x11 X11)
 find_library(OVR_xrandr Xrandr)
 find_library(OVR_rt rt)

+
 find_package_handle_standard_args(OVR DEFAULT_MSG
 	OVR_LIBRARIES
 	OVR_INCLUDE_DIR_LIB
 	OVR_INCLUDE_DIR_SRC
 	OVR_LIBRARY_SO
-	OVR_udev
 	OVR_pthread
 	OVR_gl
 	OVR_x11
@@ -55,4 +54,4 @@

 # append the two include directories together.
 set(OVR_INCLUDE_DIRS ${OVR_INCLUDE_DIR_LIB} ${OVR_INCLUDE_DIR_SRC})
-set(OVR_LIBRARIES ${OVR_LIBRARIES} ${OVR_LIBRARY_SO} ${OVR_udev} ${OVR_pthread} ${OVR_gl} ${OVR_x11} ${OVR_xrandr} ${OVR_rt})
+set(OVR_LIBRARIES ${OVR_LIBRARIES} ${OVR_LIBRARY_SO} ${OVR_pthread} ${OVR_gl} ${OVR_x11} ${OVR_xrandr} ${OVR_rt})


ARROW-18117: [C++] Fix static bundle build (#14465)

Which prevents `libarrow_bundled_dependencies` to contain all required symbols.

Authored-by: Y <fe63556d4ddfb57a7cd698f25755b52b5506986c@gmail.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -3900,7 +3900,7 @@
        gRPC::grpc
        gRPC::grpcpp_for_bundling
        gRPC::upb)
-  if(ABS_VENDORED)
+  if(ABSL_VENDORED)
     list(APPEND ARROW_BUNDLED_STATIC_LIBS ${GRPC_GPR_ABSL_LIBRARIES})
   endif()
 endmacro()


cmake: fix supporting of legacy flags

cmake: fix supporting of legacy flags

--- cmake/OpenCVCompilerOptimizations.cmake
+++ cmake/OpenCVCompilerOptimizations.cmake
@@ -56,7 +56,7 @@
       message(STATUS "         Behaviour of this option is not backward compatible")
       message(STATUS "         Refer to 'CPU_BASELINE'/'CPU_DISPATCH' CMake options documentation")
     endif()
-    if("${legacy_flag}")
+    if("${${legacy_flag}}")
       if(NOT ";${CPU_BASELINE_REQUIRE};" MATCHES ";${OPT};")
         set(CPU_BASELINE_REQUIRE "${CPU_BASELINE_REQUIRE};${OPT}" CACHE STRING "${HELP_CPU_BASELINE_REQUIRE}" FORCE)
       endif()


build: fix compatibility with VS2017 and VS2015

Adjust the build to work with the VS2017 layout while maintaining the
compatibility with VS2015.  The library location changed which results in the
link failing due to not finding system libraries.

--- cmake/modules/SwiftWindowsSupport.cmake
+++ cmake/modules/SwiftWindowsSupport.cmake
@@ -47,14 +47,24 @@
   swift_windows_arch_spelling(${arch} ARCH)

   set(paths)
-  if(${ARCH} STREQUAL x86)
-    list(APPEND paths "$ENV{VCToolsInstallDir}/Lib")
+
+  # NOTE(compnerd) provide compatibility with VS2015 which had the libraries in
+  # a directory called "Lib" rather than VS2017 which normalizes the layout and
+  # places them in a directory named "lib".
+  if(IS_DIRECTORY "$ENV{VCToolsInstallDir}/Lib")
+    if(${ARCH} STREQUAL x86)
+      list(APPEND paths "$ENV{VCToolsInstallDir}/Lib/")
+    else()
+      list(APPEND paths "$ENV{VCToolsInstallDir}/Lib/${ARCH}")
+    endif()
   else()
-    list(APPEND paths "$ENV{VCToolsInstallDir}/Lib/${ARCH}")
+    list(APPEND paths "$ENV{VCToolsInstallDir}/lib/${ARCH}")
   endif()
+
   list(APPEND paths
           "$ENV{UniversalCRTSdkDir}/Lib/$ENV{UCRTVersion}/ucrt/${ARCH}"
           "$ENV{UniversalCRTSdkDir}/Lib/$ENV{UCRTVersion}/um/${ARCH}")
+
   set(${var} ${paths} PARENT_SCOPE)
 endfunction()


toolchain: Fix typo and grammar in error message

Minor grammatical changes.

Signed-off-by: Jacob Siverskog <f862f167b85d41b225785c70d70808bc7337c1fe@teenage.engineering>

--- cmake/toolchain/zephyr/host-tools.cmake
+++ cmake/toolchain/zephyr/host-tools.cmake
@@ -33,10 +33,10 @@
 # Strip any trailing spaces/newlines from the version string
 string(STRIP ${SDK_VERSION_PRE2} SDK_VERSION)
 if(${REQUIRED_SDK_VER} VERSION_GREATER ${SDK_VERSION})
-  message(FATAL_ERROR "The SDK version you are using is old, please update your SDK.
+  message(FATAL_ERROR "The SDK version you are using is too old, please update your SDK.
 You need at least SDK version ${REQUIRED_SDK_VER}.
 You have version ${SDK_VERSION} (${ZEPHYR_SDK_INSTALL_DIR}).
-The new version of the SDK can be download from:
+The new version of the SDK can be downloaded from:
 https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/${REQUIRED_SDK_VER}/zephyr-sdk-${REQUIRED_SDK_VER}-setup.run
 ")
 endif()


MAINT: fix lookup of compiled libraries.

--- cmake/FindDO_Sara.cmake
+++ cmake/FindDO_Sara.cmake
@@ -72,7 +72,7 @@

 # List the compile flags needed by DO-CV.
 set(DO_DEFINITIONS "-DSRCDIR=${CMAKE_CURRENT_SOURCE_DIR}")
-if (DO_USE_STATIC_LIBS)
+if (DO_USE_STATIC_LIBS OR NOT DO_BUILD_SHARED_LIBS)
   add_definitions("-DDO_STATIC")
 endif ()

@@ -136,24 +136,49 @@
         "C:/Program Files/DO-Sara/include"
         PATH_SUFFIXES DO/Sara)

+      if (DO_USE_STATIC_LIBS)
+        set (_library_name "DO_Sara_${COMPONENT}-${DO_Sara_VERSION}-s")
+        set (_library_name_debug "DO_Sara_${COMPONENT}-${DO_Sara_VERSION}-sd")
+      else ()
+        set (_library_name "DO_Sara_${COMPONENT}-${DO_Sara_VERSION}")
+        set (_library_name_debug "DO_Sara_${COMPONENT}-${DO_Sara_VERSION}-d")
+      endif ()
+
       find_library(DO_Sara_${COMPONENT}_DEBUG_LIBRARIES
-        NAMES DO_Sara_${COMPONENT}-${DO_Sara_VERSION}-d
+        NAMES ${_library_name_debug}
         PATHS
         /usr/lib /usr/local/lib /opt/local/lib
         "C:/Program Files/DO-Sara-Debug/lib"
         PATH_SUFFIXES DO/Sara)

       find_library(DO_Sara_${COMPONENT}_RELEASE_LIBRARIES
-        NAMES DO_Sara_${COMPONENT}-${DO_Sara_VERSION}
+        NAMES ${_library_name}
         PATHS
         /usr/lib /usr/local/lib /opt/local/lib
         "C:/Program Files/DO-Sara/lib"
         PATH_SUFFIXES DO/Sara)

-      set(DO_Sara_${COMPONENT}_LIBRARIES
-        debug ${DO_Sara_${COMPONENT}_DEBUG_LIBRARIES}
-        optimized ${DO_Sara_${COMPONENT}_RELEASE_LIBRARIES}
-        CACHE STRING "")
+      if (NOT DO_USE_STATIC_LIBS AND NOT DO_Sara_${COMPONENT}_DEBUG_LIBRARIES)
+        set(
+          DO_Sara_${COMPONENT}_LIBRARIES
+          ${DO_Sara_${COMPONENT}_RELEASE_LIBRARIES}
+          CACHE STRING "")
+      else ()
+        set(
+          DO_Sara_${COMPONENT}_LIBRARIES
+          debug ${DO_Sara_${COMPONENT}_DEBUG_LIBRARIES}
+          optimized ${DO_Sara_${COMPONENT}_RELEASE_LIBRARIES}
+          CACHE STRING "")
+      endif ()
+
+      if (DO_USE_STATIC_LIBS)
+        if (NOT DO_Sara_${COMPONENT}_DEBUG_LIBRARIES OR
+            NOT DO_Sara_${COMPONENT}_RELEASE_LIBRARIES)
+          message(FATAL_ERROR "DO_Sara_${COMPONENT} is missing!")
+        endif ()
+      elseif (NOT DO_Sara_${COMPONENT}_RELEASE_LIBRARIES)
+        message(FATAL_ERROR "DO_Sara_${COMPONENT} is missing!")
+      endif ()

       if (DO_Sara_${COMPONENT}_LIBRARIES)
         list(APPEND DO_Sara_LIBRARIES ${DO_Sara_${COMPONENT}_LIBRARIES})


Fix FindUmfpack when specifying manually the related cmake variables.

--- cmake/FindUmfpack.cmake
+++ cmake/FindUmfpack.cmake
@@ -15,6 +15,8 @@
   suitesparse
   ufsparse
 )
+
+if(NOT UMFPACK_LIBRARIES)

 find_library(UMFPACK_LIBRARIES umfpack PATHS $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})

@@ -43,6 +45,7 @@

 endif(UMFPACK_LIBRARIES)

+endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(UMFPACK DEFAULT_MSG


Fixed detection of UWAC library

Fixed detection of UWAC library

--- cmake/FindWayland.cmake
+++ cmake/FindWayland.cmake
@@ -50,4 +50,4 @@
 endif()

 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(UWAC DEFAULT_MSG UWAC_LIBS UWAC_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG UWAC_LIBS UWAC_INCLUDE_DIR)


cmake: ocv_target_include_directories() handle SYSTEM directories

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -171,28 +171,54 @@
       ";${ARGN};" MATCHES "/usr/include;")
     return() # workaround for GCC 6.x bug
   endif()
+  set(__params "")
+  set(__system_params "")
+  set(__var_name __params)
   foreach(dir ${ARGN})
-    get_filename_component(__abs_dir "${dir}" ABSOLUTE)
-    ocv_is_opencv_directory(__is_opencv_dir "${dir}")
-    if(__is_opencv_dir)
-      list(APPEND __params "${__abs_dir}")
-    else()
-      list(APPEND __params "${dir}")
+    if("${dir}" STREQUAL "SYSTEM")
+      set(__var_name __system_params)
+    else()
+      get_filename_component(__abs_dir "${dir}" ABSOLUTE)
+      ocv_is_opencv_directory(__is_opencv_dir "${dir}")
+      if(__is_opencv_dir)
+        list(APPEND ${__var_name} "${__abs_dir}")
+      else()
+        list(APPEND ${__var_name} "${dir}")
+      endif()
     endif()
   endforeach()
   if(HAVE_CUDA OR CMAKE_VERSION VERSION_LESS 2.8.11)
     include_directories(${__params})
+    include_directories(SYSTEM ${__system_params})
   else()
     if(TARGET ${target})
-      target_include_directories(${target} PRIVATE ${__params})
-      if(OPENCV_DEPENDANT_TARGETS_${target})
-        foreach(t ${OPENCV_DEPENDANT_TARGETS_${target}})
-          target_include_directories(${t} PRIVATE ${__params})
-        endforeach()
-      endif()
-    else()
-      set(__new_inc "${OCV_TARGET_INCLUDE_DIRS_${target}};${__params}")
-      set(OCV_TARGET_INCLUDE_DIRS_${target} "${__new_inc}" CACHE INTERNAL "")
+      if(__params)
+        target_include_directories(${target} PRIVATE ${__params})
+        if(OPENCV_DEPENDANT_TARGETS_${target})
+          foreach(t ${OPENCV_DEPENDANT_TARGETS_${target}})
+            target_include_directories(${t} PRIVATE ${__params})
+          endforeach()
+        endif()
+      endif()
+      if(__system_params)
+        target_include_directories(${target} SYSTEM PRIVATE ${__system_params})
+        if(OPENCV_DEPENDANT_TARGETS_${target})
+          foreach(t ${OPENCV_DEPENDANT_TARGETS_${target}})
+            target_include_directories(${t} SYSTEM PRIVATE ${__system_params})
+          endforeach()
+        endif()
+      endif()
+    else()
+      if(__params)
+        set(__new_inc ${OCV_TARGET_INCLUDE_DIRS_${target}})
+        list(APPEND __new_inc ${__params})
+        set(OCV_TARGET_INCLUDE_DIRS_${target} "${__new_inc}" CACHE INTERNAL "")
+      endif()
+      if(__system_params)
+        set(__new_inc ${OCV_TARGET_INCLUDE_SYSTEM_DIRS_${target}})
+        list(APPEND __new_inc ${__system_params})
+        set(OCV_TARGET_INCLUDE_SYSTEM_DIRS_${target} "${__new_inc}" CACHE INTERNAL "")
+      endif()
     endif()
   endif()
 endfunction()
@@ -1077,6 +1103,16 @@
       endforeach()
     endif()
     unset(OCV_TARGET_INCLUDE_DIRS_${target} CACHE)
+  endif()
+
+  if(DEFINED OCV_TARGET_INCLUDE_SYSTEM_DIRS_${target})
+    target_include_directories(${target} SYSTEM PRIVATE ${OCV_TARGET_INCLUDE_SYSTEM_DIRS_${target}})
+    if(OPENCV_DEPENDANT_TARGETS_${target})
+      foreach(t ${OPENCV_DEPENDANT_TARGETS_${target}})
+        target_include_directories(${t} SYSTEM PRIVATE ${OCV_TARGET_INCLUDE_SYSTEM_DIRS_${target}})
+      endforeach()
+    endif()
+    unset(OCV_TARGET_INCLUDE_SYSTEM_DIRS_${target} CACHE)
   endif()
 endfunction()


Enable Ada by default.

Enable Ada by default.

svn path=/trunk/; revision=8610

--- cmake/modules/ada.cmake
+++ cmake/modules/ada.cmake
@@ -22,7 +22,7 @@
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_ada "Enable Ada bindings" OFF)
 else(DEFAULT_NO_BINDINGS)
-  option(ENABLE_ada "Enable Ada bindings" OFF)
+  option(ENABLE_ada "Enable Ada bindings" ON)
 endif(DEFAULT_NO_BINDINGS)

 if(ENABLE_ada)


Let ENVIRONMENT take multiple keywords in cmake_parse_arguments

Move from `one_value_keywords` to `multi_value_keywords` arg.

--- functions.cmake
+++ functions.cmake
@@ -400,7 +400,7 @@
 endfunction()

 function(vespa_add_test)
-    cmake_parse_arguments(ARG "NO_VALGRIND;RUN_SERIAL;BENCHMARK" "NAME;WORKING_DIRECTORY;ENVIRONMENT;COST" "COMMAND;DEPENDS" ${ARGN})
+    cmake_parse_arguments(ARG "NO_VALGRIND;RUN_SERIAL;BENCHMARK" "NAME;WORKING_DIRECTORY;COST" "COMMAND;DEPENDS;ENVIRONMENT" ${ARGN})

     if(NOT RUN_BENCHMARKS AND ARG_BENCHMARK)
         return()


fix opensplice warning arg logic for os x

--- rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
@@ -94,11 +94,13 @@
       "-Wno-unused-but-set-variable "
     )
   endif()
-  string(REPLACE ";" " " _opensplice_compile_flags ${_opensplice_compile_flags})
-  foreach(_gen_file ${_generated_files})
-    set_source_files_properties("${_gen_file}"
-      PROPERTIES COMPILE_FLAGS ${_opensplice_compile_flags})
-  endforeach()
+  if(NOT "${_opensplice_compile_flags} " STREQUAL " ")
+    string(REPLACE ";" " " _opensplice_compile_flags ${_opensplice_compile_flags})
+    foreach(_gen_file ${_generated_files})
+      set_source_files_properties("${_gen_file}"
+        PROPERTIES COMPILE_FLAGS ${_opensplice_compile_flags})
+    endforeach()
+  endif()
 endif()

 set(_dependency_files "")


Generate pkgconfig file

Generate pkgconfig file

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -199,7 +199,7 @@
   PATH_VARS INCLUDE_INSTALL_DIR ${HAS_LIBRARY_NAMES} DEPENDENTS
   NO_CHECK_REQUIRED_COMPONENTS_MACRO)

-# create ProjectConfigVersion.cmake
+# create and install ProjectConfigVersion.cmake
 write_basic_package_version_file(
   ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
   VERSION ${VERSION} COMPATIBILITY AnyNewerVersion)
@@ -208,3 +208,25 @@
   FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
         ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
   DESTINATION ${CMAKE_MODULE_INSTALL_PATH} COMPONENT dev)
+
+# create and install Project.pc
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.pc
+  "prefix=${CMAKE_INSTALL_PREFIX}\n"
+  "exec_prefix=\${prefix}\n"
+  "libdir=\${exec_prefix}/${LIBRARY_DIR}\n"
+  "includedir=\${prefix}/include\n\n"
+  "Name: ${CMAKE_PROJECT_NAME}\n"
+  "Description: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n"
+  "Version: ${VERSION}\n"
+  "Requires: ${CPACK_PACKAGE_CONFIG_REQUIRES}\n"
+  "Conflicts: ${CPACK_PACKAGE_CONFIG_CONFLICTS}\n"
+  "Cflags: -I\${includedir}\n"
+  "Libs: -L\${libdir}" )
+foreach(_library ${LIBRARY_NAMES})
+  file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.pc
+    " -l${_library}")
+endforeach()
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.pc "\n")
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.pc
+  DESTINATION ${LIBRARY_DIR}/pkgconfig COMPONENT dev)


Adapting CMakeLists to fit tetralith

Adapting CMakeLists to fit tetralith

Former-commit-id: ecd025447055ae48b9b392e4cbf879c785984e1b

--- cmake-modules/Fetch_HDF5_2.cmake
+++ cmake-modules/Fetch_HDF5_2.cmake
@@ -39,7 +39,7 @@
     set(HDF5_ANACONDA ON)
 endif()

-if(HDF5_FOUND AND NOT HDF5_ANACONDA)
+if(HDF5_FOUND AND NOT HDF5_ANACONDA AND HDF5_CXX_HL_LIBRARY)
     # To print all variables, use the code below:
     #
     #    get_cmake_property(_variableNames VARIABLES)


fixing cmake libdir for spdlog

fixing cmake libdir for spdlog

Former-commit-id: fdb4fb844520bb413cbc8141afe8eab6bd43e099

--- cmake-modules/Fetch_spdlog.cmake
+++ cmake-modules/Fetch_spdlog.cmake
@@ -1,4 +1,5 @@
-find_package(spdlog 1.3 NO_DEFAULT_PATH PATHS ${H5PP_INSTALL_DIR_THIRD_PARTY}/spdlog/lib/spdlog/cmake ${spdlog_DIR} )
+include(GNUInstallDirs)
+find_package(spdlog 1.3 NO_DEFAULT_PATH PATHS ${H5PP_INSTALL_DIR_THIRD_PARTY}/spdlog/${CMAKE_INSTALL_LIBDIR}/spdlog/cmake ${spdlog_DIR} )
 if(spdlog_FOUND)
     get_target_property(spdlog_lib     spdlog::spdlog   INTERFACE_LINK_LIBRARIES)
     message(STATUS "SPDLOG FOUND IN SYSTEM: ${spdlog_lib}")
@@ -22,7 +23,6 @@
     ExternalProject_Get_Property(external_SPDLOG INSTALL_DIR)
     add_library(spdlog INTERFACE)
     add_library(spdlog::spdlog ALIAS spdlog)
-    include(GNUInstallDirs)
     set(spdlog_DIR ${INSTALL_DIR}/spdlog/${CMAKE_INSTALL_LIBDIR}/spdlog/cmake)
     add_dependencies(spdlog external_SPDLOG)
     target_include_directories(spdlog INTERFACE ${INSTALL_DIR}/${CMAKE_INSTALL_INCLUDEDIR})


ci: enable clang-assisted parsing in Doxygen (#6536)

We had disabled this because it was broken in Fedora:33.

--- cmake/GoogleCloudCppCommon.cmake
+++ cmake/GoogleCloudCppCommon.cmake
@@ -56,9 +56,9 @@
         set(DOXYGEN_GENERATE_TODOLIST NO)
         set(DOXYGEN_GENERATE_BUGLIST NO)
         set(DOXYGEN_GENERATE_TESTLIST NO)
-        set(DOXYGEN_CLANG_ASSISTED_PARSING NO)
-        set(DOXYGEN_CLANG_OPTIONS "")
-        set(DOXYGEN_CLANG_DATABASE_PATH ${CMAKE_BINARY_DIR})
+        set(DOXYGEN_CLANG_ASSISTED_PARSING YES)
+        set(DOXYGEN_CLANG_OPTIONS)
+        set(DOXYGEN_CLANG_DATABASE_PATH)
         set(DOXYGEN_SEARCH_INCLUDES YES)
         set(DOXYGEN_INCLUDE_PATH "${PROJECT_SOURCE_DIR}"
                                  "${PROJECT_BINARY_DIR}")


added compiler flags

added compiler flags

--- cmake/compile/compile_tool.cmake
+++ cmake/compile/compile_tool.cmake
@@ -21,7 +21,17 @@
     fwrite("CMakeLists.txt" "
       project(${name})
       if(\"\${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\")
-        set(CMAKE_CXX_FLAGS \"-std=c++11\")
+        include(CheckCXXCompilerFlag)
+        CHECK_CXX_COMPILER_FLAG(\"-std=c++11\" COMPILER_SUPPORTS_CXX11)
+        CHECK_CXX_COMPILER_FLAG(\"-std=c++0x\" COMPILER_SUPPORTS_CXX0X)
+        if(COMPILER_SUPPORTS_CXX11)
+          set(CMAKE_CXX_FLAGS \"\${CMAKE_CXX_FLAGS} -std=c++11\")
+        elseif(COMPILER_SUPPORTS_CXX0X)
+          set(CMAKE_CXX_FLAGS \"\${CMAKE_CXX_FLAGS} -std=c++0x\")
+        else()
+                message(STATUS \"The compiler \${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.\")
+        endif()
+
       endif()
       set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG   \${CMAKE_BINARY_DIR}/bin)
       set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE \${CMAKE_BINARY_DIR}/bin)


Use eigen 3.3.3

Use eigen 3.3.3

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -98,8 +98,8 @@

 ExternalProject_Add(
   eigen
-  URL http://www.vtk.org/files/support/eigen-3.2.1.tar.gz
-  URL_MD5 a0e0a32d62028218b1c1848ad7121476
+  URL https://bitbucket.org/eigen/eigen/get/3.3.3.tar.gz
+  URL_MD5 f21cee193e15e55cfd15ebbc16fc00a7
   CMAKE_CACHE_ARGS
     ${default_cmake_args}
     ${qt_args}


bump cv-utils

bump cv-utils

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -539,8 +539,8 @@
 if(USE_PERCEPTION)

   ExternalProject_Add(cv-utils
-    GIT_REPOSITORY https://github.com/patmarion/cv-utils.git
-    GIT_TAG 9ee0128
+    GIT_REPOSITORY https://github.com/manuelli/cv-utils.git
+    GIT_TAG 26b146fedfe3dcfb47d932911744994b815c4137
     CMAKE_CACHE_ARGS
       ${default_cmake_args}
     DEPENDS


GC STAT_MACROS_BROKEN.

GC STAT_MACROS_BROKEN.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -484,9 +484,6 @@
 /* Define as the return type of signal handlers (`int' or `void'). */
 #cmakedefine RETSIGTYPE ${RETSIGTYPE}

-/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-#undef STAT_MACROS_BROKEN
-
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS


Have cmake define HAVE_STRERROR and friends to 1 when they're defined at all.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -364,13 +364,13 @@
 #undef HAVE_STRDUP

 /* Define to 1 if you have the `strerror' function. */
-#cmakedefine HAVE_STRERROR
+#cmakedefine HAVE_STRERROR ${HAVE_STRERROR}

 /* Define to 1 if you have the `strerror_r' function. */
-#cmakedefine HAVE_STRERROR_R
+#cmakedefine HAVE_STRERROR_R ${HAVE_STRERROR_R}

 /* Define to 1 if you have the `strerror_s' function. */
-#cmakedefine HAVE_STRERROR_S
+#cmakedefine HAVE_STRERROR_S ${HAVE_STRERROR_S}

 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H


CentOS distro documentation: fix typos.

CentOS distro documentation: fix typos.

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -115,7 +115,7 @@

 We maintain an always up-to-date Debian GNU/Linux and Ubuntu package
 repository at http://tarantoo.org/dist/debian and http://tarantool.org/dist/debian and http://tarantool.org/dist/ubuntu respectively.

 At the moment the repository contains builds for Debian "Sid", "Squeeze",
@@ -131,10 +131,11 @@

 ### CentOS 5-6 GNU/Linux

-CentOS GNU/Linux repository available at
-http://tarantoo.org/dist/centos.
-
-It can be added to your yum repository list (/etc/yum.repos.d/tarantool.repo) with:
+CentOS GNU/Linux repository is available at
+http://tarantool.org/dist/centos.
+
+Add the following section to your yum repository list (/etc/yum.repos.d/tarantool.repo)
+to enable it:

     [tarantool]
     name=CentOS-$releasever - Tarantool
@@ -275,7 +276,7 @@
 Мы поддерживаем собственные репозитории .deb пакетов, который
 содержит последние версии сервера и клиентских библиотек для
 *Debian GNU/Linux* и  *Ubuntu*:
-http://tarantoo.org/dist/debian,
+http://tarantool.org/dist/debian,
 http://tarantool.org/dist/ubuntu.

 Репозитории содержат пакеты для Debian "Sid", "Squeeze",
@@ -290,6 +291,18 @@
     sudo apt-get update
     sudo apt-get install tarantool tarantool-client

+CentOS GNU/Linux репозиторий доступен по адресу:
+http://tarantool.org/dist/centos.
+
+Добавьте следующую секцию в Ваш список репозиториев
+(/etc/yum.repos.d/tarantool.repo) чтобы сделать его доступным для Yum:
+
+    [tarantool]
+    name=CentOS-$releasever - Tarantool
+    baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/
+    enabled=1
+    gpgcheck=0
+
 ### Архив старых релизов

 Архив старых релизов доступен по адресу <a


Update ITK superbuild version to 4.12.0 release

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -51,7 +51,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG d6c46070becb30882240631fee71a75ef244c2c2) # v4.12 after RC3
+set(ITK_TAG_COMMAND GIT_TAG v4.12.0) # 4.12.0 tag

 if( ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Address new ITK template visibility feature

For ITK template to be hidden when SimpleITK and ITK are both build
with static libraries. See ITK commit
be14aef1ec8646982fa717b7a88b8f1b60558717 for more information.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -50,7 +50,8 @@
   set( ITK_BUILD_SHARED_LIBS OFF )
   list( APPEND ep_itk_args
     "-DCMAKE_C_VISIBILITY_PRESET:STRING=hidden"
-    "-DCMAKE_CXX_VISIBILITY_PRESET:STRING=hidden")
+    "-DCMAKE_CXX_VISIBILITY_PRESET:STRING=hidden"
+    "-DITK_TEMPLATE_VISIBILITY_DEFAULT:BOOL=OFF" )
 endif()

 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_itk_cache}\n${ep_common_cache}" )


fixed issue with newer cmake versions

fixed issue with newer cmake versions

--- libs/cmake/DownloadExternalFile.cmake
+++ libs/cmake/DownloadExternalFile.cmake
@@ -57,7 +57,6 @@
 # Download a fixed commit instead of the current master, so that we know that it works for us.
 ExternalProject_Add( @DEPENDENCY_NAME@
     URL @DEPENDENCY_URL@
-    ${CMAKE_DOWNLOAD_PROGRESS}
     SOURCE_DIR        "@DEPENDENCY_PATH@/@DEPENDENCY_NAME@"
     BINARY_DIR        "@DEPENDENCY_PATH@/@DEPENDENCY_NAME@"
     CONFIGURE_COMMAND ""


Update definition, copyright for 'android-ndk-r16b-api-21-x86-64-clang-libcxx'

--- android-ndk-r16b-api-21-x86-64-clang-libcxx.cmake
+++ android-ndk-r16b-api-21-x86-64-clang-libcxx.cmake
@@ -1,12 +1,12 @@
 # Copyright (c) 2015, Ruslan Baratov
-# Copyright (c) 2015, David Hirvonen
-# Copyright (c) 2015, Alexandre Pretyman
+# Copyright (c) 2017, Robert Nitsch
+# Copyright (c) 2018, Chanwoo Noh
 # All rights reserved.

-if(DEFINED POLLY_ANDROID_NDK_R16B_API_21_X86_CLANG_LIBCXX_CMAKE_)
+if(DEFINED POLLY_ANDROID_NDK_R16B_API_21_X86_64_CLANG_LIBCXX_CMAKE_)
   return()
 else()
-  set(POLLY_ANDROID_NDK_R16B_API_21_X86_CLANG_LIBCXX_CMAKE_ 1)
+  set(POLLY_ANDROID_NDK_R16B_API_21_X86_64_CLANG_LIBCXX_CMAKE_ 1)
 endif()

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_clear_environment_variables.cmake")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


[generation] install binaries

[generation] install binaries

--- lib/orocos/templates/config/OrocosComponent.cmake
+++ lib/orocos/templates/config/OrocosComponent.cmake
@@ -73,3 +73,6 @@
 <% if component.corba_enabled? %>
 TARGET_LINK_LIBRARIES(<%= component.name %> ${OrocosCORBA_LIBS})
 <% end %>
+
+INSTALL(TARGETS <%= component.name %>
+    RUNTIME DESTINATION bin)


Fixes #6410.  Add soname-synonyms to valgrind command line.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,2 +1,2 @@
 set(MEMORYCHECK_COMMAND /usr/bin/valgrind)
-set(MEMORYCHECK_COMMAND_OPTIONS "--error-exitcode=1 --suppressions=${PROJECT_SOURCE_DIR}/valgrind.suppressions --gen-suppressions=no --quiet --num-callers=20 --leak-check=full --show-reachable=yes" CACHE INTERNAL "options for valgrind")
+set(MEMORYCHECK_COMMAND_OPTIONS "--error-exitcode=1 --soname-synonyms=somalloc=*tokuportability* --suppressions=${PROJECT_SOURCE_DIR}/valgrind.suppressions --gen-suppressions=no --quiet --num-callers=20 --leak-check=full --show-reachable=yes" CACHE INTERNAL "options for valgrind")


Fixed bug in parallel with 44f37b26e7f7

Fixed bug in parallel with 44f37b26e7f7

--HG--
branch : v2-0

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -243,27 +243,27 @@
   if (WIN32)
     # copy the required DLLs to the build directory (configure_file is the only copy-like op I found in CMake)
     if(NOT OGRE_BUILD_PLATFORM_WINRT)
-      install(FILES ${OIS_BINARY_DBG} DESTINATION lib/debug CONFIGURATIONS Debug None "")
-    	install(FILES ${OIS_BINARY_REL} DESTINATION lib/release CONFIGURATIONS Release None "")
-    	install(FILES ${OIS_BINARY_REL} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-    	install(FILES ${OIS_BINARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+      file(COPY ${OIS_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
+    	file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
+    	file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
+    	file(COPY ${OIS_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
     endif ()

     if (OGRE_BUILD_PLUGIN_CG)
       # if MinGW or NMake, the release/debug cg.dll's would conflict, so just pick one
       if (MINGW OR (CMAKE_GENERATOR STREQUAL "NMake Makefiles"))
         if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-          install(FILES ${Cg_BINARY_DBG} DESTINATION bin/debug CONFIGURATIONS Debug None "")
+          file(COPY ${Cg_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
         else ()
-          install(FILES ${Cg_BINARY_REL} DESTINATION bin/release CONFIGURATIONS Release None "")
-    			install(FILES ${Cg_BINARY_REL} DESTINATION bin/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-    			install(FILES ${Cg_BINARY_REL} DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel)
+          file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
+    			file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
+    			file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
         endif ()
       else ()
-        install(FILES ${Cg_BINARY_DBG} DESTINATION bin/debug CONFIGURATIONS Debug None "")
-    		install(FILES ${Cg_BINARY_REL} DESTINATION bin/release CONFIGURATIONS Release None "")
-    		install(FILES ${Cg_BINARY_REL} DESTINATION bin/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-    		install(FILES ${Cg_BINARY_REL} DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel)
+        file(COPY ${Cg_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
+    		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
+    		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
+    		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
       endif ()
     endif()


Remove a couple patterns from the Boost header exclude list.  Some headers in these directories are needed indirectly.

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -141,14 +141,12 @@
 	  # headers (try to exclude things we don't need)
 	  install(DIRECTORY "${Boost_INCLUDE_DIR}/boost" DESTINATION "boost_${Boost_LIB_VERSION}"
 		PATTERN "accumulators" EXCLUDE
-		PATTERN "algorithm" EXCLUDE
 		PATTERN "archive" EXCLUDE
 		PATTERN "asio" EXCLUDE
 		PATTERN "assign" EXCLUDE
 		PATTERN "bimap" EXCLUDE
 		PATTERN "circular_buffer" EXCLUDE
 		PATTERN "compatibility" EXCLUDE
-		PATTERN "concept" EXCLUDE
 		PATTERN "concept_check" EXCLUDE
 		PATTERN "dynamic_bitset" EXCLUDE
 		PATTERN "filesystem" EXCLUDE


Fixed install path of dependency binaries in CMake script

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -22,30 +22,30 @@
 option(OGRE_COPY_DEPENDENCIES "Copy dependency libs to the build directory" TRUE)

 macro(install_debug INPUT)
-  if (EXISTS ${OGRE_DEP_DIR}/lib/debug/${INPUT})
-    if (IS_DIRECTORY ${OGRE_DEP_DIR}/lib/debug/${INPUT})
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
+  if (EXISTS ${OGRE_DEP_DIR}/bin/debug/${INPUT})
+    if (IS_DIRECTORY ${OGRE_DEP_DIR}/bin/debug/${INPUT})
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
     else ()
-      install(FILES ${OGRE_DEP_DIR}/lib/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
+      install(FILES ${OGRE_DEP_DIR}/bin/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
     endif ()
   else()
-    message(send_error "${OGRE_DEP_DIR}/lib/debug/${INPUT} did not exist, can't install!")
+    message(send_error "${OGRE_DEP_DIR}/bin/debug/${INPUT} did not exist, can't install!")
   endif ()
 endmacro()

 macro(install_release INPUT)
-  if (EXISTS ${OGRE_DEP_DIR}/lib/release/${INPUT})
-    if (IS_DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT})
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+  if (EXISTS ${OGRE_DEP_DIR}/bin/release/${INPUT})
+    if (IS_DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT})
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
     else ()
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
     endif ()
   else()
-    message(send_error "${OGRE_DEP_DIR}/lib/release/${INPUT} did not exist, can't install!")
+    message(send_error "${OGRE_DEP_DIR}/bin/release/${INPUT} did not exist, can't install!")
   endif ()
 endmacro()


BUG: Fixed KWStyle, finally!

BUG: Fixed KWStyle, finally!

--- CMake/TubeTKKWStyleConfig.cmake
+++ CMake/TubeTKKWStyleConfig.cmake
@@ -47,29 +47,22 @@
   OFF )
 mark_as_advanced( KWSTYLE_USE_MSVC_FORMAT )

-option( KWSTYLE_DASHBOARD_SUBMISSION
-  "Set KWStyle to generate a report for CDash dashboard submission."
-  OFF )
-mark_as_advanced( KWSTYLE_DASHBOARD_SUBMISSION )
-
-if( KWSTYLE_DASHBOARD_SUBMISSION )
-  set( KWSTYLE_ARGUMENTS -lesshtml
-    -xml ${TubeTK_BINARY_DIR}/KWStyle.kws.xml
-    -o ${TubeTK_BINARY_DIR}/KWStyle.Overwrite.txt
-    -dart ${TubeTK_BINARY_DIR} -1 1
-    -D ${TubeTK_BINARY_DIR}/KWStyle.Files.txt )
-else( KWSTYLE_DASHBOARD_SUBMISSION )
-  set( KWSTYLE_ARGUMENTS -xml ${TubeTK_BINARY_DIR}/KWStyle.kws.xml
-    -v -o ${TubeTK_BINARY_DIR}/KWStyle.Overwrite.txt
-    -D ${TubeTK_BINARY_DIR}/KWStyle.Files.txt )
-  if( KWSTYLE_USE_VIM_FORMAT )
-    set( KWSTYLE_ARGUMENTS -vim ${KWSTYLE_ARGUMENTS} )
-  else( KWSTYLE_USE_VIM_FORMAT )
-    if( KWSTYLE_USE_MSVC_FORMAT )
-      set( KWSTYLE_ARGUMENTS -msvc ${KWSTYLE_ARGUMENTS} )
-    endif( KWSTYLE_USE_MSVC_FORMAT )
-  endif( KWSTYLE_USE_VIM_FORMAT )
-endif( KWSTYLE_DASHBOARD_SUBMISSION )
+set( KWSTYLE_DASHBOARD_ARGUMENTS
+  -gcc -v -qv
+  -dart ${TubeTK_BINARY_DIR} -1 0
+  -xml ${TubeTK_BINARY_DIR}/KWStyle.kws.xml
+  -o ${TubeTK_BINARY_DIR}/KWStyle.Overwrite.txt
+  -R -D ${TubeTK_BINARY_DIR}/KWStyle.Files.txt )
+set( KWSTYLE_ARGUMENTS -v -xml ${TubeTK_BINARY_DIR}/KWStyle.kws.xml
+  -o ${TubeTK_BINARY_DIR}/KWStyle.Overwrite.txt
+  -R -D ${TubeTK_BINARY_DIR}/KWStyle.Files.txt )
+if( KWSTYLE_USE_VIM_FORMAT )
+  set( KWSTYLE_ARGUMENTS -vim ${KWSTYLE_ARGUMENTS} )
+else( KWSTYLE_USE_VIM_FORMAT )
+  if( KWSTYLE_USE_MSVC_FORMAT )
+    set( KWSTYLE_ARGUMENTS -msvc ${KWSTYLE_ARGUMENTS} )
+  endif( KWSTYLE_USE_MSVC_FORMAT )
+endif( KWSTYLE_USE_VIM_FORMAT )

 configure_file( ${TubeTK_SOURCE_DIR}/CMake/KWStyle/KWStyle.kws.xml.in
   ${TubeTK_BINARY_DIR}/KWStyle.kws.xml )
@@ -80,7 +73,8 @@
 configure_file( ${TubeTK_SOURCE_DIR}/CMake/KWStyle/KWStyle.Overwrite.txt
   ${TubeTK_BINARY_DIR}/KWStyle.Overwrite.txt )

+add_custom_command( OUTPUT KWStyle_Log.txt
+  COMMAND ${KWSTYLE_EXECUTABLE}
+  ARGS ${KWSTYLE_DASHBOARD_ARGUMENTS} )
 add_custom_target( StyleCheck
-  COMMAND ${KWSTYLE_EXECUTABLE} ${KWSTYLE_ARGUMENTS}
-  WORKING_DIRECTORY ${TubeTK_BINARY_DIR}
-  COMMENT "Coding style checker" VERBATIM )
+  DEPENDS KWStyle_Log.txt )


re-capitalize

re-capitalize

--- CMake/hoomd/HOOMDMPISetup.cmake
+++ CMake/hoomd/HOOMDMPISetup.cmake
@@ -67,9 +67,9 @@
 # https://gitlab.kitware.com/cmake/cmake/merge_requests/2529/diffs

 if (CMAKE_VERSION VERSION_LESS 3.12.0 AND ENABLE_HIP)
-    string(replace "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<HIP_PLATFORM:nvcc>>:-Xcompiler>;-pthread"
+    string(REPLACE "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<HIP_PLATFORM:nvcc>>:-Xcompiler>;-pthread"
       _MPI_C_COMPILE_OPTIONS "${MPI_C_COMPILE_OPTIONS}")
-    set_property(target mpi::mpi_c property INTERFACE_COMPILE_OPTIONS "${_MPI_C_COMPILE_OPTIONS}")
+    set_property(TARGET MPI::MPI_C PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_C_COMPILE_OPTIONS}")
     unset(_MPI_C_COMPILE_OPTIONS)

     string(REPLACE "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA><$<HIP_PLATFORM:nvcc>>:-Xcompiler>;-pthread"


Remove manual definition of CMAKE_SOURCE_DIR from cl2hpp

--- CMakeModules/build_cl2hpp.cmake
+++ CMakeModules/build_cl2hpp.cmake
@@ -10,7 +10,6 @@
     INSTALL_DIR "${prefix}/package"
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" <SOURCE_DIR>
-    -DCMAKE_SOURCE_DIR:PATH=<SOURCE_DIR>
     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}


Only warn if tcpd.h is missing

Only warn if tcpd.h is missing

If DCMTK is build in superbuild with CMake it usually
does not enable TCP wrapping anyway.
ArchLinux has dropped TCP wrappers so we get problems there if
we force to have tcpd.h

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -34,7 +34,7 @@

   CHECK_INCLUDE_FILE("tcpd.h" LIB_WRAP)
   if(NOT LIB_WRAP)
-    message(FATAL_ERROR "error: could not find tcpd.h - libwrap0-dev needs to be installed")
+    message(STATUS "Could not find tcpd.h - if this is missing in the build libwrap0-dev needs to be installed")
   endif()

 endif()


Creates default Gadgetron config and set env

it creates a default Gadgetron configuration file based on the
gadgetron.xml.example ONLY IF the gadgetron.xml file does not exist.
Users will be able to run Gadgetron after build without modifying the file.

Appends to .bashrc only if not already done. It seems this is not wanted,
under discussion.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -92,12 +92,21 @@
 set(SIRF_SRC_PATH ${CMAKE_CURRENT_LIST_DIR}/SIRF)
 set(CCPPETMR_INSTALL ${SUPERBUILD_INSTALL_DIR})
 configure_file(env_ccppetmr.sh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.sh)
-# create .sirfrc
-configure_file(env_ccppetmr.sh.in $ENV{HOME}/.sirfrc)
-# append .sirfrc to .bashrc
-file(APPEND $ENV{HOME}/.bashrc "#Environment variables for SIRF
+
+if (EXISTS $ENV{HOME}/.sirfrc)
+   # copy new version of the env veriables to the file
+   configure_file(env_ccppetmr.sh.in $ENV{HOME}/.sirfrc)
+else()
+  # create .sirfrc
+  configure_file(env_ccppetmr.sh.in $ENV{HOME}/.sirfrc)
+  # append .sirfrc to .bashrc
+  file(APPEND $ENV{HOME}/.bashrc "#Environment variables for SIRF
 source ~/.sirfrc")
+endif()
+
 configure_file(env_ccppetmr.csh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.csh)

-#Create a default Gadgetron configuration
-configure_file(${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml.example ${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml)
+#Create a default Gadgetron configuration if not present
+if(NOT EXISTS "${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml")
+   configure_file(${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml.example ${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml)
+endif()


fix linker warning on Windows

fix linker warning on Windows

--- rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
@@ -81,6 +81,8 @@
 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED ${_generated_files})
 if(WIN32)
   target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
+    PRIVATE "ROSIDL_BUILDING_DLL")
+  target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PRIVATE "ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_BUILDING_DLL")
 endif()
 target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}


Ensure proper Eigen install

Ensure proper Eigen install

--- Superbuild/Projects/eigen.cmake
+++ Superbuild/Projects/eigen.cmake
@@ -3,4 +3,5 @@
     ${CMAKE_COMMAND} -E copy_if_different
     ${SuperBuild_PROJECTS_DIR}/patches/eigen.cmake.language_support.cmake
     <SOURCE_DIR>/cmake/language_support.cmake
+  CMAKE_ARGS -DEIGEN_BUILD_PKGCONFIG=off
   )


Use ln instead of cmake for generating links as this will allow to link files in an offset install tree.

--- functions.cmake
+++ functions.cmake
@@ -559,6 +559,6 @@
 endfunction()

 function(install_symlink TARGET LINK)
-    install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_INSTALL_PREFIX}/${TARGET} ${LINK})")
+    install(CODE "execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${TARGET} ${LINK})")
 endfunction(install_symlink)


Fix typo

Fix typo

--- Dependencies/cmake/Hunter/config.cmake
+++ Dependencies/cmake/Hunter/config.cmake
@@ -22,7 +22,7 @@
     LIBIGL_WITH_XML=OFF
 )

-hunter_condif(PhysUnits
+hunter_config(PhysUnits
   GIT_SUBMODULE "Dependencies/PhysUnits"
 )


Correction

Correction

--- source/cmake_modules/CompilationFlags.cmake
+++ source/cmake_modules/CompilationFlags.cmake
@@ -86,12 +86,12 @@
 file(STRINGS ${PROJ_FILE_NAME} _PROJ_LIB_VERSION REGEX "^#define PJ_VERSION ([0-9]+)([0-9]+)([0-9]+)")
 STRING (REGEX REPLACE "^#define PJ_VERSION " "" _PROJ_LIB_VERSION "${_PROJ_LIB_VERSION}")
 message("-- Found Proj Library : ${_PROJ_LIB_VERSION}")
-if(${_PROJ_LIB_VERSION} LESS_EQUAL 400)
+if("${_PROJ_LIB_VERSION}" LESS 500)
     add_definitions("-DPROJ_API_VERSION_MAJOR_4")
 endif()
-if(${_PROJ_LIB_VERSION} GREATER_EQUAL 600)
+if("${_PROJ_LIB_VERSION}" GREATER_EQUAL 600)
     add_definitions("-DPROJ_API_VERSION_MAJOR_6")
 endif()
-if(${_PROJ_LIB_VERSION} GREATER 400 AND ${_PROJ_LIB_VERSION} LESS 600)
+if("${_PROJ_LIB_VERSION}" GREATER_EQUAL 500 AND ${_PROJ_LIB_VERSION} LESS 600)
     message(FATAL_ERROR "-- Proj Library '${_PROJ_LIB_VERSION}' not supported ...")
 endif()


fixup: mirtk_target_dependencies dep_type variable renaming [CMake]

--- CMake/Modules/mirtkTargetDependencies.cmake
+++ CMake/Modules/mirtkTargetDependencies.cmake
@@ -45,7 +45,7 @@
       if (TARGET "${dep_name}")
         get_target_property(dep_type ${dep_name} TYPE)
         # Add dependency on imported link library
-        if (type MATCHES "LIBRARY")
+        if (dep_type MATCHES "LIBRARY")
           target_link_libraries(${target_uid} ${dep_attr} ${dep_name})
           get_property(dep_imported TARGET ${dep_name} PROPERTY IMPORTED)
           if (dep_imported)


fixed missed arch renaming (from C.Bergstrom)

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@238153 91177308-0d34-0410-b5e6-96231b3b80d8

--- runtime/cmake/HelperFunctions.cmake
+++ runtime/cmake/HelperFunctions.cmake
@@ -63,7 +63,7 @@
         set(${return_arch_string} "Intel(R) 64" PARENT_SCOPE)
     elseif(${MIC})
         set(${return_arch_string} "Intel(R) Many Integrated Core Architecture" PARENT_SCOPE)
-    elseif(${arch} STREQUAL "l1")
+    elseif(${LIBOMP_ARCH} STREQUAL "l1")
         set(${return_arch_string} "L1OM" PARENT_SCOPE)
     elseif(${ARM})
         set(${return_arch_string} "ARM" PARENT_SCOPE)


COMP: change name of target to match convention

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -64,8 +64,8 @@
 endforeach()

 # Make target for generated code
-add_custom_target(generate_filter_source_code ALL DEPENDS ${SimpleITKBasicFiltersSource})
-add_dependencies(Documentation generate_filter_source_code)
+add_custom_target(FilterSourceCode ALL DEPENDS ${SimpleITKBasicFiltersSource})
+add_dependencies(Documentation FilterSourceCode)

 # clear the include files
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.h "" )


add openmp flag for msvc

add openmp flag for msvc

--- cmake/Dependencies_core.cmake
+++ cmake/Dependencies_core.cmake
@@ -92,6 +92,10 @@
   #    endif()
 endif()

+if(SAIGA_CXX_MSVC)
+  add_definitions(-D_OPENMP)
+endif()
+

 #libfreeimage


Backup.

Backup.

--- cmake_modules/LPSCommon.cmake
+++ cmake_modules/LPSCommon.cmake
@@ -246,7 +246,7 @@
             endif()
        endif() # ENABLE_COVERAGE
     elseif(LINUX64GNU)
-        set(LPS_CXX_FLAGS "-ansi -m64 -Wno-deprecated")
+        set(LPS_CXX_FLAGS "-fPIC -ansi -m64 -Wno-deprecated")
     #$$TODO: A 32 bit option is not needed. Do away with this case.
     else() # Assume 32-bit i686 linux for the present
        set(LPS_CXX_FLAGS "-ansi -m32 -Wno-deprecated ")


Update gl3w_gen.cmake

Update gl3w_gen.cmake

--- external/gl3w_gen.cmake
+++ external/gl3w_gen.cmake
@@ -44,7 +44,7 @@
 if(NOT EXISTS ${OUTDIR}/include/GL/glcorearb.h)
     message(STATUS "Downloading glcorearb.h to include/GL...")
     file(DOWNLOAD
-        https://www.khronos.org/registry/OpenGL/api/GL/glcorearb.h
+        http://www.khronos.org/registry/OpenGL/api/GL/glcorearb.h
         ${OUTDIR}/include/GL/glcorearb.h)
 else()
     message(STATUS "Reusing glcorearb.h from include/GL...")


The location of hip headers changed in rocm 1.3

Adding a few more paths to check in FindHIP.cmake

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -6,67 +6,68 @@
 find_package(CUDA)

 if( CUDA_INCLUDE_DIRS AND CUDA_VERSION AND CUDA_NVCC_EXECUTABLE)
-	message(STATUS "CUDA_VERSION = ${CUDA_VERSION}")
-	message(STATUS "CUDA_INCLUDE_DIRS = ${CUDA_INCLUDE_DIRS}")
-	message(STATUS "CUDA_NVCC_EXECUTABLE = ${CUDA_NVCC_EXECUTABLE}")
+  message(STATUS "CUDA_VERSION = ${CUDA_VERSION}")
+  message(STATUS "CUDA_INCLUDE_DIRS = ${CUDA_INCLUDE_DIRS}")
+  message(STATUS "CUDA_NVCC_EXECUTABLE = ${CUDA_NVCC_EXECUTABLE}")

     set( HIP_PLATFORM "nvcc" )

-	#export the environment variable, so that HIPCC can find it.
+  #export the environment variable, so that HIPCC can find it.
     set(ENV{HIP_PLATFORM} nvcc)

 else()
-	find_package(HCC)
+  find_package(HCC)

-	message(STATUS "HCC_FOUND = ${HCC_FOUND}")
-	message(STATUS "HCC = ${HCC}")
-	message(STATUS "HCC_INCLUDE_DIRS = ${HCC_INCLUDE_DIRS}")
-	message(STATUS "HSA_LIBRARIES = ${HSA_LIBRARIES}")
+  message(STATUS "HCC_FOUND = ${HCC_FOUND}")
+  message(STATUS "HCC = ${HCC}")
+  message(STATUS "HCC_INCLUDE_DIRS = ${HCC_INCLUDE_DIRS}")
+  message(STATUS "HSA_LIBRARIES = ${HSA_LIBRARIES}")

-	if( ${HCC_FOUND} STREQUAL  "TRUE" )
+  if( ${HCC_FOUND} STREQUAL  "TRUE" )

     if (NOT DEFINED HIP_PATH)
       find_path( HIP_INCLUDE_DIR
-  			NAMES
-  				hip_runtime.h
-  			PATHS
-  				ENV HIP_PATH
-  				/opt/rocm
-  			PATH_SUFFIXES
+        NAMES
+          hip_runtime.h
+        PATHS
+          ENV HIP_PATH
+          /opt/rocm/hip
+          /opt/rocm
+        PATH_SUFFIXES
           /include/hip
-  				/include
-  		)
+          /include
+      )

       set (HIP_INCLUDE_DIRS ${HIP_INCLUDE_DIR})
       set (HIP_PATH ${HIP_INCLUDE_DIR})
       if (NOT DEFINED ENV{HIP_PATH})
-			  set( ENV{HIP_PATH} ${HIP_PATH})
+        set( ENV{HIP_PATH} ${HIP_PATH})
       endif( )
-		endif()
+    endif()

-		message(STATUS "ENV HIP_PATH = $ENV{HIP_PATH}")
+    message(STATUS "ENV HIP_PATH = $ENV{HIP_PATH}")

-		find_program(HIPCC
-			NAMES  hipcc
-			PATHS
-				ENV HIP_PATH
-			PATH_SUFFIXES
-				/bin)
+    find_program(HIPCC
+      NAMES  hipcc
+      PATHS
+        ENV HIP_PATH
+      PATH_SUFFIXES
+        /bin)

-			message(STATUS "HIPCC = ${HIPCC}")
+      message(STATUS "HIPCC = ${HIPCC}")

-		if( DEFINED HIPCC)
+    if( DEFINED HIPCC)

             set( HIP_PLATFORM "hcc" )
-			#export the environment variable, so that HIPCC can find it.
+      #export the environment variable, so that HIPCC can find it.
             set(ENV{HIP_PLATFORM} "hcc")
-			set (CMAKE_CXX_COMPILER ${HIPCC})
+      set (CMAKE_CXX_COMPILER ${HIPCC})

-		else()
-			message(SEND_ERROR "Did not find HIPCC")
-		endif()
-	else()
-		message(SEND_ERROR "hcc not found")
-	endif()
+    else()
+      message(SEND_ERROR "Did not find HIPCC")
+    endif()
+  else()
+    message(SEND_ERROR "hcc not found")
+  endif()

 endif()


Fix Clang Related issues in FindSSE

Fix Clang Related issues in FindSSE

--- cmake/FindSSE.cmake
+++ cmake/FindSSE.cmake
@@ -29,6 +29,12 @@
 # error if SSE support is missing.
 #
 set(SSE_FLAGS)
+set(SSE_FOUND)
+set(DETECTED_SSE_41)
+set(DETECTED_SSE_42)
+set(DETECTED_SSE_10)
+set(DETECTED_SSE_20)
+set(DETECTED_SSE_30)

 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
   execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion" OUTPUT_VARIABLE GCC_VERSION_STRING)
@@ -76,7 +82,7 @@

 # Check for SSE 4.2 support.
 if(_SSE_TEST_42)
-  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(CMAKE_REQUIRED_FLAGS "-msse4.2")
   endif()
   check_cxx_source_runs("
@@ -102,7 +108,7 @@

 # Check for SSE 4.1 support.
 if(_SSE_TEST_41)
-  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(CMAKE_REQUIRED_FLAGS "-msse4.1")
   endif()
   check_cxx_source_runs("
@@ -127,7 +133,7 @@

 # Check for SSE 3 support.
 if(_SSE_TEST_30)
-  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(CMAKE_REQUIRED_FLAGS "-msse3")
   endif()
   check_cxx_source_runs("
@@ -158,7 +164,7 @@

 # Check for SSE2 support.
 if(_SSE_TEST_20)
-  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(CMAKE_REQUIRED_FLAGS "-msse2")
   elseif(MSVC AND NOT CMAKE_CL_64)
     set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
@@ -185,7 +191,7 @@

 # Check for SSE support.
 if(_SSE_TEST_10)
-  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     set(CMAKE_REQUIRED_FLAGS "-msse")
   elseif(MSVC AND NOT CMAKE_CL_64)
     set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
@@ -211,7 +217,7 @@

 set(CMAKE_REQUIRED_FLAGS)

-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   if(DETECTED_SSE_42)
       SET(SSE_FLAGS "${SSE_FLAGS} -msse4.2 -mfpmath=sse")
       set(SSE_VERSION "4.2")


Fix for MDEV-14977:

Fix for MDEV-14977:

If built dynamically the old_password plugin could not be located due to wrong filename (must be mysql_old_password.so instead of old_password.so).

--- cmake/plugins.cmake
+++ cmake/plugins.cmake
@@ -43,7 +43,7 @@
   REGISTER_PLUGIN("AUTH_SHA256PW" "${CC_SOURCE_DIR}/plugins/auth/sha256_pw.c" "sha256_password_client_plugin" "DYNAMIC" sha256_password 1)
 ENDIF()
 REGISTER_PLUGIN("AUTH_NATIVE" "${CC_SOURCE_DIR}/plugins/auth/my_auth.c" "native_password_client_plugin" "STATIC" "" 0)
-REGISTER_PLUGIN("AUTH_OLDPASSWORD" "${CC_SOURCE_DIR}/plugins/auth/old_password.c" "old_password_client_plugin" "STATIC" "" 1)
+REGISTER_PLUGIN("AUTH_OLDPASSWORD" "${CC_SOURCE_DIR}/plugins/auth/old_password.c" "old_password_client_plugin" "STATIC" "mysql_old_password" 1)
 SET(DIALOG_SOURCES ${CC_SOURCE_DIR}/plugins/auth/dialog.c ${CC_SOURCE_DIR}/libmariadb/get_password.c)
 REGISTER_PLUGIN("AUTH_DIALOG" "${DIALOG_SOURCES}" "auth_dialog_plugin" "DYNAMIC" dialog 1)
 REGISTER_PLUGIN("AUTH_CLEARTEXT" "${CC_SOURCE_DIR}/plugins/auth/mariadb_cleartext.c" "auth_cleartext_plugin" "DYNAMIC" "mysql_clear_password" 1)


Build remoteio plugin as built-in (static)

--- cmake/plugins.cmake
+++ cmake/plugins.cmake
@@ -38,7 +38,7 @@

 #Remote_IO
 IF(CURL_FOUND)
-  REGISTER_PLUGIN("REMOTEIO" "${CMAKE_SOURCE_DIR}/plugins/io/remote_io.c" "remote_io_plugin" "DYNAMIC" "remote_io" 1)
+  REGISTER_PLUGIN("REMOTEIO" "${CMAKE_SOURCE_DIR}/plugins/io/remote_io.c" "remote_io_plugin" "STATIC" "remote_io" 1)
 ENDIF()

 #Trace


finish migration to new build macros

finish migration to new build macros

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1294 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -44,8 +44,8 @@
     #    set (normal_path_prefixes ${normal_path_prefixes} ${p})
     #endforeach ()

-    set (include_names "include" "includes")
-    set (lib_names "lib" "libs" "bin" "bins" "dll" "dlls")
+    set (include_names "." "include" "includes")
+    set (lib_names "." "lib" "libs" "bin" "bins" "dll" "dlls")

     # add prefix+name paths
     foreach (prefix ${path_prefixes})


Fix env string formatting

Fix env string formatting

--- BuildSupport.cmake
+++ BuildSupport.cmake
@@ -35,7 +35,7 @@
 # Initialize environment variables string to use for commands.
 set (FLYEM_BIN_PATH     ${FLYEM_BUILD_DIR}/bin:$ENV{PATH})
 set (FLYEM_LIB_PATH     ${FLYEM_BUILD_DIR}/lib:$ENV{LD_LIBRARY_PATH})
-set (FLYEM_ENV_STRING   "env PATH=${FLYEM_BIN_PATH}  LD_LIBRARY_PATH=${FLYEM_LIB_PATH} ")
+set (FLYEM_ENV_STRING   env PATH=${FLYEM_BIN_PATH} LD_LIBRARY_PATH=${FLYEM_LIB_PATH})

 endif (NOT FLYEM_ENV_STRING)


BUG: Bruker2dseq was not registered correctly due to module name change.

Change-Id: I835315d09b0f36ff5c9d526d800190fed75bcceb

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -216,7 +216,7 @@
     Nifti Nrrd Gipl HDF5 JPEG GDCM BMP LSM PNG TIFF VTK Stimulate BioRad Meta MRC GE4 GE5
     MINC
     MGH SCIFIO FDF OpenSlide
-    PhilipsREC Bruker2DSEQ
+    PhilipsREC Bruker2dseq
     )

 # Exceptions:
@@ -237,6 +237,8 @@
 set(SCIFIO_image_module_name SCIFIO)

 set(FDF_image_module_name IOFDF)
+
+set(Bruker2dseq_image_module_name ITKIOBruker)

 foreach(ImageFormat ${LIST_OF_IMAGEIO_FORMATS})
   if (NOT ${ImageFormat}_image_module_name )