Tweak logic deciding if an external is enabled

Modify the logic that decides whether or not an external project is
enabled to respond to externals marked `ALWAYS` by creating a hidden
option (on by default) to enable the external, rather than enabling it
literally always. This allows users with special needs (e.g. the CI in
particular) to have a hidden mechanism to disable such externals.

--- cmake/externals.cmake
+++ cmake/externals.cmake
@@ -279,11 +279,18 @@
   cmake_parse_arguments(_ext
     "${_ext_flags}" "${_ext_sv_args}" "${_ext_mv_args}" ${ARGN})

-  # Determine if this project is enabled
   string(TOUPPER WITH_${PROJECT} _ext_project_option)
   if(_ext_ALWAYS)
-    # Project is always enabled
-  elseif(DEFINED ${_ext_project_option})
+    # Project is "always" enabled, but add a hidden option to turn it off; this
+    # is useful for the CI to "build" just google_styleguide in order to run
+    # cpplint on the code.
+    cmake_dependent_option(
+      ${_ext_project_option} "Enable ${PROJECT} (internal)" ON
+      "NOT ${_ext_project_option}" ON)
+  endif()
+
+  # Determine if this project is enabled
+  if(DEFINED ${_ext_project_option})
     if(${_ext_project_option})
       # Project is explicitly enabled
     elseif(WITH_ALL_PUBLIC_EXTERNALS AND DEFINED _ext_PUBLIC)


change liboperators to static

change liboperators to static

--- cmake/operators.cmake
+++ cmake/operators.cmake
@@ -5,7 +5,7 @@
     ${SRC_DIR}/operators.cpp
 )

-add_library( operators SHARED ${OPERATORS_SRC} ${OPERATORS_HPP} )
+add_library( operators STATIC ${OPERATORS_SRC} ${OPERATORS_HPP} )
 target_link_libraries( operators
 )
 target_include_directories ( operators PUBLIC ${INCLUDE_DIR} )


Removed Win32 definition -DBOOST_THREAD_USE_DLL

This flag is already enabled by -DBOOST_ALL_DYN_LINK,
which we add wor Win32.

--- cmake/BALLConfigBoost.cmake
+++ cmake/BALLConfigBoost.cmake
@@ -27,5 +27,4 @@
 IF(WIN32)
 	ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
 	ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)
-	ADD_DEFINITIONS(-DBOOST_THREAD_USE_DLL)
 ENDIF()


adding advanced meshing to sim libraries

--- cmake/FindSimModSuite.cmake
+++ cmake/FindSimModSuite.cmake
@@ -18,6 +18,7 @@
 # not sure how simmodsuite will work within tribits - ignore for now
 set(SIMMODSUITE_LIBS "")
 set(SIM_LIB_NAMES
+  SimAdvMeshing
   SimPartitionedMesh-mpi
   SimMeshing
   SimModel


Add the install name dir logic

Add the install name dir logic

Change-Id: Ief11fbb73ab035944e03ccd51dd2074c5e949836

--- cmake/InstallLocation.cmake
+++ cmake/InstallLocation.cmake
@@ -42,6 +42,9 @@
 if(NOT CMAKE_INSTALL_RPATH)
   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
 endif()
+if(APPLE AND NOT CMAKE_INSTALL_NAME_DIR)
+  set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
+endif()
 if(UNIX AND ENABLE_RPATH)
   set(CMAKE_SKIP_BUILD_RPATH FALSE)
   set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)


cmake: support ZephyrBuildConfiguration_ROOT for package location

Fixes: #35890

The current implementation of Zephyr build configuration CMake package
only allows the build configuration package to be placed inside a
Zephyr workspace.

This commit extends the usability by allowing users to locate the
Zephyr build configuration CMake package outside the Zephyr workspace
and then refer to the package using
`-DZephyrBuildConfiguration_ROOT=<path>`
`set(ZephyrBuildConfiguration_ROOT <path>)`

This allows users greater flexibility in their workspace layouts.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -128,7 +128,17 @@
   set(ZEPHYR_BASE ${ENV_ZEPHYR_BASE} CACHE PATH "Zephyr base")
 endif()

-find_package(ZephyrBuildConfiguration NAMES ZephyrBuild PATHS ${ZEPHYR_BASE}/../* QUIET NO_DEFAULT_PATH NO_POLICY_SCOPE)
+find_package(ZephyrBuildConfiguration
+  QUIET NO_POLICY_SCOPE
+  NAMES ZephyrBuild
+  PATHS ${ZEPHYR_BASE}/../*
+  NO_CMAKE_PATH
+  NO_CMAKE_ENVIRONMENT_PATH
+  NO_SYSTEM_ENVIRONMENT_PATH
+  NO_CMAKE_PACKAGE_REGISTRY
+  NO_CMAKE_SYSTEM_PATH
+  NO_CMAKE_SYSTEM_PACKAGE_REGISTRY
+)

 # Note any later project() resets PROJECT_SOURCE_DIR
 file(TO_CMAKE_PATH "${ZEPHYR_BASE}" PROJECT_SOURCE_DIR)


Updates Boost’s default version to 1.72.0-p1. (#192)

This commit updates Boost’s default version to 1.72.0-p1 to take advantage of the #180 fix.

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -37,7 +37,7 @@
   # https://github.com/boostorg/build/issues/301
   hunter_default_version(Boost VERSION 1.64.0)
 else()
-  hunter_default_version(Boost VERSION 1.72.0-p0)
+  hunter_default_version(Boost VERSION 1.72.0-p1)
 endif()

 hunter_default_version(BoostCompute VERSION 0.5-p0)


[CMake] add_lit_target: Let lit.site.cfg free from "--param build_mode" on single configuration builds, like autoconf build.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -277,12 +277,16 @@
   endif()

   # Configuration-time: See Unit/lit.site.cfg.in
-  set(LLVM_BUILD_MODE "%(build_mode)s")
+  if (CMAKE_CFG_INTDIR STREQUAL ".")
+    set(LLVM_BUILD_MODE ".")
+  else ()
+    set(LLVM_BUILD_MODE "%(build_mode)s")
+  endif ()

   set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
   set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR})
-  set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_mode)s")
-  set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/%(build_mode)s")
+  set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/${LLVM_BUILD_MODE}")
+  set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/${LLVM_BUILD_MODE}")
   set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
   set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
   set(SHLIBPATH_VAR ${SHLIBPATH_VAR})
@@ -321,10 +325,12 @@
   parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
   set(LIT_ARGS "${ARG_ARGS} ${LLVM_LIT_ARGS}")
   separate_arguments(LIT_ARGS)
+  if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
+    list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
+  endif ()
   set(LIT_COMMAND
     ${PYTHON_EXECUTABLE}
     ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py
-    --param build_mode=${CMAKE_CFG_INTDIR}
     ${LIT_ARGS}
     )
   foreach(param ${ARG_PARAMS})


FindCbc should append includedirs for all the subprojects cbc depends on as well

--- cmake/modules/FindCbc.cmake
+++ cmake/modules/FindCbc.cmake
@@ -1,11 +1,13 @@
 INCLUDE(FindPackageHandleStandardArgs)

-SET(Cbc_ROOT_DIR "" CACHE PATH "Path to Coin-OR Cbc")
-IF(WIN32)
-    FIND_PATH(Cbc_INCLUDE_DIR CbcConfig.h PATHS ${Cbc_ROOT_DIR}/src/windows PATH_SUFFIXES coin cbc/coin)
-ELSE()
-    FIND_PATH(Cbc_INCLUDE_DIR CbcConfig.h PATHS ${Cbc_ROOT_DIR} PATH_SUFFIXES coin cbc/coin)
-ENDIF()
+FOREACH(COIN_PROJECT CoinUtils Osi Clp Cgl Cbc)
+    SET(${COIN_PROJECT}_ROOT_DIR "" CACHE PATH "Path to Coin-OR ${COIN_PROJECT}")
+    IF(WIN32)
+        FIND_PATH(${COIN_PROJECT}_INCLUDE_DIR ${COIN_PROJECT}Config.h PATHS ${${COIN_PROJECT}_ROOT_DIR}/src/windows PATH_SUFFIXES coin ${COIN_PROJECT}/coin)
+    ELSE()
+        FIND_PATH(${COIN_PROJECT}_INCLUDE_DIR ${COIN_PROJECT}Config.h PATHS ${${COIN_PROJECT}_ROOT_DIR} PATH_SUFFIXES coin ${COIN_PROJECT}/coin)
+    ENDIF()
+ENDFOREACH()

 IF(Cbc_INCLUDE_DIR)
     SET(_Cbc_COMMON_HEADER ${Cbc_INCLUDE_DIR}/CbcConfig.h)
@@ -40,6 +42,10 @@

 IF(Cbc_FOUND)
     SET(Cbc_INCLUDE_DIRS ${Cbc_INCLUDE_DIR})
+    FOREACH(COIN_PROJECT CoinUtils Osi Clp Cgl)
+        LIST(APPEND Cbc_INCLUDE_DIRS ${${COIN_PROJECT}_INCLUDE_DIR})
+    ENDFOREACH()
+
     SET(Cbc_LIBRARIES "${Cbc_LIBRARY};${Cbc_Solver_LIBRARY}")
     MARK_AS_ADVANCED(Cbc_ROOT_DIR Cbc_LIBRARY_RELEASE Cbc_LIBRARY_DEBUG Cbc_LIBRARY Cbc_INCLUDE_DIR)
 ENDIF()


added missing cleanup to mac build

added missing cleanup to mac build

--- cmake/packages/bundle.cmake
+++ cmake/packages/bundle.cmake
@@ -30,3 +30,10 @@
   COMMAND cp *.dmg ${PACKAGE_TARGET_DIR})

 list(APPEND COPY_PACKAGES_LIST copy_bundle_packages)
+
+add_custom_target(remove_packages
+  COMMAND rm -f *.dmg
+  COMMAND rm -rf _CPack_Packages
+  )
+
+list(APPEND CLEAN_PACKAGES_LIST remove_packages)


Add a reference to homebrew recipe for Mac OS X.

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

   Mac OS X

-    Coming soon...
+    brew install http://tarantool.org/dist/tarantool.rb

@@ -241,7 +241,7 @@

   Mac OS X

-    Coming soon...
+    brew install http://tarantool.org/dist/tarantool.rb


fix(build): The check library has removed the compat target on win32

--- tools/cmake/FindCheck.cmake
+++ tools/cmake/FindCheck.cmake
@@ -27,23 +27,11 @@
 	IF ( CHECK_INSTALL_DIR )
 		MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
 		SET ( CHECK_INCLUDE_DIR  "${CHECK_INSTALL_DIR}/include" )
-		FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
-        IF (WIN32)
-		    FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
-        ENDIF (WIN32)
+		FIND_LIBRARY( CHECK_LIBRARIES NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
 	ELSE ( CHECK_INSTALL_DIR )
 		FIND_PATH( CHECK_INCLUDE_DIR check.h )
-		FIND_LIBRARY( CHECK_LIBRARY NAMES check )
-        IF (WIN32)
-		    FIND_LIBRARY( COMPAT_LIBRARY NAMES compat )
-        ENDIF (WIN32)
+		FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
 	ENDIF ( CHECK_INSTALL_DIR )
-
-    IF (WIN32)
-        SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
-    ELSE ( WIN32)
-        SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" )
-    ENDIF (WIN32)

 	IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
 		SET( CHECK_FOUND 1 )
@@ -62,7 +50,4 @@
 ENDIF( NOT CHECK_FOUND )

 # Hide advanced variables from CMake GUIs
-MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES CHECK_LIBRARY)
-IF( WIN32 )
-    MARK_AS_ADVANCED( COMPAT_LIBRARY)
-ENDIF()
+MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES )


Doxygen: description fix

Doxygen: description fix

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -509,7 +509,7 @@
     set_target_properties("DOXY-generate-processor-previews"
                             PROPERTIES FOLDER "doc" EXCLUDE_FROM_ALL TRUE)

-    option(IVW_ENFORCE_PROCESSOR_PREVIEWS "Turn on this to disable generating processor previews when building doxygen documentation (DOXY-Inviwo)" OFF)
+    option(IVW_ENFORCE_PROCESSOR_PREVIEWS "Turn on to enforce generating processor previews when building doxygen documentation (DOXY-Inviwo)" ON)
     if(${IVW_ENFORCE_PROCESSOR_PREVIEWS})
         add_dependencies("DOXY-Inviwo" "DOXY-generate-processor-previews" "DOXY-Clear")
     else()


Graph Control 3.10.2 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 10 )
 set ( HPCC_POINT 2 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_SEQUENCE 1 )
 ###


Check library type before reading properties

Former-commit-id: fcbf33950961ad71ed2866a33a448ef6414d0419

--- cmake/getExpandedTarget.cmake
+++ cmake/getExpandedTarget.cmake
@@ -8,6 +8,8 @@
         if(TARGET ${lib})
             unset(interface_libs)
             unset(imported_lib)
+            unset(lib_type)
+            unset(lib_impt)
 #            message("Expanding target ${lib}")
             get_target_property(lib_type ${lib} TYPE)
             get_target_property(lib_impt ${lib} IMPORTED)
@@ -132,6 +134,8 @@
             list(APPEND target_names_expanded ${target_name})
             unset(interface_libs)
             unset(imported_lib)
+            unset(lib_type)
+            unset(lib_impt)
             get_target_property(interface_libs  ${target_name} INTERFACE_LINK_LIBRARIES)
             get_target_property(lib_type ${lib} TYPE)
             get_target_property(lib_impt ${lib} IMPORTED)
@@ -168,6 +172,8 @@
             unset(interface_libs)
             unset(private_libs)
             unset(imported_lib)
+            unset(lib_type)
+            unset(lib_impt)
             get_target_property(lib_type ${target_name} TYPE)
             get_target_property(lib_impt ${target_name} IMPORTED)
             if(lib_impt)


Simplify if() conditions on check result variables

Remove use of an old hack that takes advantage of the auto-dereference
behavior of the if() command to detect if a variable is defined.  The
hack has the form:

 if("${VAR} MATCHES "^${VAR}$")

where "${VAR}" is a macro argument reference.  Use if(NOT DEFINED) instead.
This also avoids warnings for CMake Policy CMP0054.

--- CMake/sitkCheckCXX11.cmake
+++ CMake/sitkCheckCXX11.cmake
@@ -21,7 +21,7 @@
   # cache the results.
   string(MD5 cmake_cxx_flags_hash "${CMAKE_CXX_FLAGS}")
   set(cache_var "${VARIABLE}_${hash_cmake_cxx_flags_hash}")
-  if("${cache_var}" MATCHES "^${cache_var}$")
+  if(NOT DEFINED "${cache_var}")
     message(STATUS "Performing Test ${VARIABLE}")
     set(requred_definitions "${CMAKE_REQUIRED_DEFINITIONS} -D${VARIABLE}")
     try_compile(${VARIABLE}


Fixes for ALI_AMORE

Fixes for ALI_AMORE

--- cmake/FindAMORE.cmake
+++ cmake/FindAMORE.cmake
@@ -12,12 +12,13 @@
   execute_process(COMMAND ${AMORE_CONFIG} --cflags --includes OUTPUT_VARIABLE AMOREFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
   execute_process(COMMAND ${AMORE_CONFIG} --ldflags --ldflags-da-static --libs OUTPUT_VARIABLE _lddaflags OUTPUT_STRIP_TRAILING_WHITESPACE)
   ALICE_CleanOutput(_lddaflags "${_lddaflags}")
+  set(AMOREFLAGS "-DALI_AMORE ${AMOREFLAGS}")
   if(DATE_FOUND)
     execute_process(COMMAND ${DATE_CONFIG} --rcproxylibs OUTPUT_VARIABLE _rcproxylib OUTPUT_STRIP_TRAILING_WHITESPACE)
   else()
     message(STATUS "AMORE requires DATE")
   endif(DATE_FOUND)
   set(AMOREDALIBS "-static ${_lddaflags} ${_rcproxylib}")
-else()
+  else()
   message(STATUS "AMORE not found")
 endif(AMORE_CONFIG)


fixed a bug in the FindCBLAS.cmake which resulted in it incorrectly reporting the library was not found

--- cmake/FindCBLAS.cmake
+++ cmake/FindCBLAS.cmake
@@ -43,19 +43,26 @@
         /usr/local/lib)
 endif()

-if (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
-    set(CBLAS_LIBRARIES ${CBLAS_LIBRARY})
-endif (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
+#if (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
+#   set(CBLAS_LIBRARIES ${CBLAS_LIBRARY})
+#endif (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)
+if (CBLAS_LIBRARY)
+   set(CBLAS_LIBRARIES ${CBLAS_LIBRARY})
+endif (CBLAS_LIBRARY)
+
+

 # handle the QUIETLY and REQUIRED arguments and set CBLAS_FOUND to TRUE if
 # all listed variables are TRUE
 include(FindPackageHandleCompat)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CBLAS DEFAULT_MSG CBLAS_LIBRARY CBLAS_LIBRARIES CBLAS_INCLUDE_DIR)
+#FIND_PACKAGE_HANDLE_STANDARD_ARGS(CBLAS DEFAULT_MSG CBLAS_LIBRARY CBLAS_LIBRARIES CBLAS_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CBLAS DEFAULT_MSG CBLAS_LIBRARY CBLAS_LIBRARIES)

 # Deprecated declarations.
-set(NATIVE_CBLAS_INCLUDE_PATH ${CBLAS_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT(NATIVE_CBLAS_LIB_PATH ${CBLAS_LIBRARY} PATH)
+#set(NATIVE_CBLAS_INCLUDE_PATH ${CBLAS_INCLUDE_DIR} )
+#GET_FILENAME_COMPONENT(NATIVE_CBLAS_LIB_PATH ${CBLAS_LIBRARY} PATH)

 # Hide in the cmake cache
-mark_as_advanced(CBLAS_LIBRARY CBLAS_INCLUDE_DIR)
+#mark_as_advanced(CBLAS_LIBRARY CBLAS_INCLUDE_DIR)
+mark_as_advanced(CBLAS_LIBRARY)


Check for 'libuv.*' in FindLibUV

Check for 'libuv.*' in FindLibUV

This is needed because vcpkg preprends the library name with 'lib'
(at least on Windows)

--- cmake/FindLibuv.cmake
+++ cmake/FindLibuv.cmake
@@ -60,9 +60,9 @@
 # - use LIBUV_DIR as well as LibUV_DIR for hints

 if (USE_STATIC_LIBS)
-  find_library(LibUV_LIBRARY NAMES uv_a uv HINTS ${LibUV_DIR} ${LibUV_DIR}/lib ${LIBUV_DIR} ${LIBUV_DIR}/lib)
+  find_library(LibUV_LIBRARY NAMES uv_a uv libuv HINTS ${LibUV_DIR} ${LibUV_DIR}/lib ${LIBUV_DIR} ${LIBUV_DIR}/lib)
 else()
-  find_library(LibUV_LIBRARY NAMES uv uv_a HINTS ${LibUV_DIR} ${LibUV_DIR}/lib ${LIBUV_DIR} ${LIBUV_DIR}/lib)
+  find_library(LibUV_LIBRARY NAMES uv uv_a libuv HINTS ${LibUV_DIR} ${LibUV_DIR}/lib ${LIBUV_DIR} ${LIBUV_DIR}/lib)
 endif()
 mark_as_advanced(LibUV_LIBRARY)


Depend on the .pxd too

Depend on the .pxd too

--- cmake/UseCython.cmake
+++ cmake/UseCython.cmake
@@ -14,7 +14,7 @@
         OUTPUT ${name}.cpp
         COMMAND cython
         ARGS -I ${CYTHON_INCLUDE_DIRECTORIES} -o ${name}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/${name}.pyx
-        DEPENDS ${name}.pyx
+        DEPENDS ${name}.pyx ${name}.pxd
         COMMENT "Cythonizing ${name}.pyx")
     # When linking Python extension modules, a special care must be taken about
     # the link flags, which is platform dependent:


build: fix small typo in cmake doxygen build

A search word spelled as "searhc" in the LLVM_DOXYGEN_SEARCHENGINE_URL cmake
variable docstring.

Patch by Daniel Otero!

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -491,7 +491,7 @@

     option(LLVM_DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
     if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
-      set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external searhc.")
+      set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external search.")
       set(LLVM_DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
     endif()
   endif()


Revert "Enabling testing ASAN on AArch64"

This reverts commit r227966, which turned ASAN on on AArhc64 and may be the
cause of the bots never finishing the check-all. I'll re-apply once we're
sure that bot can cope with it.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -192,7 +192,7 @@
 filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
   x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mips64 mipsel mips64el)
 filter_available_targets(ASAN_SUPPORTED_ARCH
-  x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mipsel mips64 mips64el)
+  x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel mips64 mips64el)
 filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(LSAN_SUPPORTED_ARCH x86_64)
 # LSan common files should be available on all architectures supported


cmake: fix LINK_FLAGS_RELEASE typo

cmake: fix LINK_FLAGS_RELEASE typo

* The variable name was spelt wrong and never took effect.

--- cmake/gcc_stm32.cmake
+++ cmake/gcc_stm32.cmake
@@ -52,7 +52,7 @@
 SET(CMAKE_C_FLAGS_RELEASE "-Os -flto" CACHE INTERNAL "c compiler flags release")
 SET(CMAKE_CXX_FLAGS_RELEASE "-Os -flto" CACHE INTERNAL "cxx compiler flags release")
 SET(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm compiler flags release")
-SET(CMAKE_EXE_LINKER_FLAGS_RELESE "-flto" CACHE INTERNAL "linker flags release")
+SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "-flto" CACHE INTERNAL "linker flags release")

 SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_PREFIX}/${TARGET_TRIPLET} ${EXTRA_FIND_PATH})
 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)


[cmake] minor update: better to check NON-equality to Debug

--- cmake/import_qt.cmake
+++ cmake/import_qt.cmake
@@ -135,7 +135,7 @@
 		message (FATAL_ERROR "add_qt_rpath_link should only be used on Unix")
 	endif ()

-	if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+	if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
 		set (
 			CMAKE_EXE_LINKER_FLAGS
 			"${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath-link,'${QT_CMAKE_DIR}/..'"


Make necessary changes in CMake so that the Direct3D 11 Renderer is built by default if and only if the necessary DirectX support is available.

--HG--
branch : v0-8

--- cmake/FindDirectXSDK.cmake
+++ cmake/FindDirectXSDK.cmake
@@ -8,7 +8,11 @@
 if (MINGW)

     set (DIRECTXSDK_FOUND TRUE)
-    set (DIRECTXSDK_MAX_D3D 11)
+    if( MINGW_W64_FOUND AND (MINGW_W64_VER_MAJOR LESS 4) )
+        set( DIRECTXSDK_MAX_D3D 10 )
+    else()
+        set (DIRECTXSDK_MAX_D3D 11)
+    endif()

 else ()


Change rpath configuration for OpenMesh

Change rpath configuration for OpenMesh

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@298 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -102,8 +102,9 @@
   elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)
     set_target_properties (
       ${target} PROPERTIES
-      INSTALL_NAME_DIR "@executable_path/../lib/${CMAKE_PROJECT_NAME}"
-      BUILD_WITH_INSTALL_RPATH 1
+      #INSTALL_NAME_DIR "@executable_path/../lib/${CMAKE_PROJECT_NAME}"
+      INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_PROJECT_NAME}"
+#      BUILD_WITH_INSTALL_RPATH 1
       SKIP_BUILD_RPATH 0
     )
   elseif (NOT APPLE)


llvm11: link against libClangToolingCore

This is needed to successfully link against llvm, clang, and lld 11.

--- cmake/Findclang.cmake
+++ cmake/Findclang.cmake
@@ -73,6 +73,7 @@
   FIND_AND_ADD_CLANG_LIB(clangRewrite)
   FIND_AND_ADD_CLANG_LIB(clangCrossTU)
   FIND_AND_ADD_CLANG_LIB(clangIndex)
+  FIND_AND_ADD_CLANG_LIB(clangToolingCore)
 endif()

 include(FindPackageHandleStandardArgs)


Fix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -44,6 +44,8 @@
 # library checks
 include(CheckLibraryExists)
 check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
+check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
+check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
 check_library_exists(dl dlopen "" HAVE_LIBDL)

 # function checks
@@ -64,8 +66,6 @@
 check_symbol_exists(malloc_zone_statistics malloc/malloc.h
                     HAVE_MALLOC_ZONE_STATISTICS)
 check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
-check_symbol_exists(pthread_rwlock_init pthread.h HAVE_PTHREAD_RWLOCK_INIT)
-check_symbol_exists(pthread_getspecific pthread.h HAVE_PTHREAD_GETSPECIFIC)
 check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)

 check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)


more changes for fedora18

more changes for fedora18

--- cmake/cpack_rpm.cmake
+++ cmake/cpack_rpm.cmake
@@ -71,6 +71,7 @@
   "%ignore /usr"
   "%ignore /usr/bin"
   "%ignore /usr/include"
+  "%ignore /usr/lib"
   "%ignore /usr/lib64"
   "%ignore /usr/sbin"
   "%ignore /usr/share"


Install (copy) FMILibrary

Install (copy) FMILibrary

--- dependencies/fmilibrary.cmake
+++ dependencies/fmilibrary.cmake
@@ -12,4 +12,5 @@
 if (EXISTS ${fmi_home})
   file(GLOB lib_files ${fmi_home}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}fmilib_shared${CMAKE_SHARED_LIBRARY_SUFFIX}*)
   install(FILES ${lib_files} DESTINATION lib)
+  install(DIRECTORY ${fmi_home} DESTINATION dependencies)
 endif()


FindVOTCA_TOOLS.cmake: update copyright

FindVOTCA_TOOLS.cmake: update copyright

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -6,7 +6,7 @@
 #  VOTCA_TOOLS_FOUND        - True if expat found.
 #  VOTCA_TOOLS_HAS_SQLITE3  - True if votca tools was build with sqlite3 support
 #
-# Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
+# Copyright 2009-2018 The VOTCA Development Team (http://www.votca.org)
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.


Add OpenCV-Extra 3.3.1

Add OpenCV-Extra 3.3.1

--- cmake/projects/OpenCV-Extra/hunter.cmake
+++ cmake/projects/OpenCV-Extra/hunter.cmake
@@ -7,6 +7,16 @@
 include(hunter_download)
 include(hunter_pick_scheme)

+hunter_add_version(
+    PACKAGE_NAME
+    OpenCV-Extra
+    VERSION
+    "3.3.1"
+    URL
+    "https://github.com/opencv/opencv_contrib/archive/3.3.1.tar.gz"
+    SHA1
+    3c9167e14af097762f1d689355929c964260ada1
+)

 hunter_add_version(
     PACKAGE_NAME


[cmake] More casing fixes

[cmake] More casing fixes

--- cmake/FindLibexecinfo.cmake
+++ cmake/FindLibexecinfo.cmake
@@ -1,9 +1,9 @@
-# Try to find LibExecinfo functionality
+# Try to find Libexecinfo functionality
 # Once done this will define
 #
-#  LIBEXECINFO_FOUND - system has LibExecinfo
-#  LIBEXECINFO_INCLUDE_DIR - LibExecinfo include directory
-#  LIBEXECINFO_LIBRARIES - Libraries needed to use LibExecinfo
+#  LIBEXECINFO_FOUND - system has Libexecinfo
+#  LIBEXECINFO_INCLUDE_DIR - Libexecinfo include directory
+#  LIBEXECINFO_LIBRARIES - Libraries needed to use Libexecinfo
 #
 # TODO: This will enable translations only if Gettext functionality is
 # present in libc. Must have more robust system for release, where Gettext
@@ -17,7 +17,7 @@
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

 if(LIBEXECINFO_INCLUDE_DIR AND LIBEXECINFO_LIB_FOUND)
-  set(LibExecinfo_FIND_QUIETLY TRUE)
+  set(Libexecinfo_FIND_QUIETLY TRUE)
 endif()

 unset(LIBEXECINFO_INCLUDE_DIR CACHE)


CMake: finding GSL and printing info on where found

--- cmake/Modules/FindGSL.cmake
+++ cmake/Modules/FindGSL.cmake
@@ -1,4 +1,8 @@
 # Try to find gnu scientific library GSL
+#
+# Source:
+# http://gnuradio.org/redmine/projects/gnuradio/repository/revisions/8524736fe3c5812b5e8e0a85af45c4775a2d4ca2/entry/cmake/Modules/FindGSL.cmake
+#
 # See
 # http://www.gnu.org/software/gsl/  and
 # http://gnuwin32.sourceforge.net/packages/gsl.htm
@@ -18,129 +22,131 @@

 INCLUDE(FindPkgConfig)
 PKG_CHECK_MODULES(GSL "gsl >= 1.10")
+
 IF(NOT GSL_FOUND)
+  set( GSL_FOUND OFF )
+  set( GSL_CBLAS_FOUND OFF )

-set( GSL_FOUND OFF )
-set( GSL_CBLAS_FOUND OFF )
+  # Windows, but not for Cygwin and MSys where gsl-config is available
+  if( WIN32 AND NOT CYGWIN AND NOT MSYS )
+  	# look for headers
+    find_path( GSL_INCLUDE_DIRS
+      NAMES gsl/gsl_cdf.h gsl/gsl_randist.h
+      )
+    if( GSL_INCLUDE_DIRS )
+    	# look for gsl library
+      find_library( GSL_LIBRARY
+        NAMES gsl
+      )
+      if( GSL_LIBRARY )
+        set( GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
+        get_filename_component( GSL_LIBRARY_DIRS ${GSL_LIBRARY} PATH )
+        set( GSL_FOUND ON )
+      endif( GSL_LIBRARY )

-# Windows, but not for Cygwin and MSys where gsl-config is available
-if( WIN32 AND NOT CYGWIN AND NOT MSYS )
-	# look for headers
-  find_path( GSL_INCLUDE_DIRS
-    NAMES gsl/gsl_cdf.h gsl/gsl_randist.h
+  		# look for gsl cblas library
+      find_library( GSL_CBLAS_LIBRARY
+          NAMES gslcblas
+        )
+      if( GSL_CBLAS_LIBRARY )
+        set( GSL_CBLAS_FOUND ON )
+      endif( GSL_CBLAS_LIBRARY )
+
+      set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} )
+    endif( GSL_INCLUDE_DIRS )
+
+    mark_as_advanced(
+      GSL_INCLUDE_DIRS
+      GSL_LIBRARIES
+      GSL_CBLAS_LIBRARIES
     )
-  if( GSL_INCLUDE_DIRS )
-  	# look for gsl library
-    find_library( GSL_LIBRARY
-      NAMES gsl
-    )
-    if( GSL_LIBRARY )
-      set( GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
-      get_filename_component( GSL_LIBRARY_DIRS ${GSL_LIBRARY} PATH )
-      set( GSL_FOUND ON )
-    endif( GSL_LIBRARY )
+  else( WIN32 AND NOT CYGWIN AND NOT MSYS )
+    if( UNIX OR MSYS )
+  		find_program( GSL_CONFIG_EXECUTABLE gsl-config
+  			/usr/bin/
+  			/usr/local/bin
+  		)

-		# look for gsl cblas library
-    find_library( GSL_CBLAS_LIBRARY
-        NAMES gslcblas
-      )
-    if( GSL_CBLAS_LIBRARY )
-      set( GSL_CBLAS_FOUND ON )
-    endif( GSL_CBLAS_LIBRARY )
+  		if( GSL_CONFIG_EXECUTABLE )
+  			set( GSL_FOUND ON )

-    set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} )
-  endif( GSL_INCLUDE_DIRS )
+        # run the gsl-config program to get cxxflags
+        execute_process(
+          COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --cflags
+          OUTPUT_VARIABLE GSL_CFLAGS
+          RESULT_VARIABLE RET
+          ERROR_QUIET
+          )
+        if( RET EQUAL 0 )
+          string( STRIP "${GSL_CFLAGS}" GSL_CFLAGS )
+          separate_arguments( GSL_CFLAGS )

-  mark_as_advanced(
-    GSL_INCLUDE_DIRS
-    GSL_LIBRARIES
-    GSL_CBLAS_LIBRARIES
-  )
-else( WIN32 AND NOT CYGWIN AND NOT MSYS )
-  if( UNIX OR MSYS )
-		find_program( GSL_CONFIG_EXECUTABLE gsl-config
-			/usr/bin/
-			/usr/local/bin
-		)
+          # parse definitions from cflags; drop -D* from CFLAGS
+          string( REGEX MATCHALL "-D[^;]+"
+            GSL_DEFINITIONS  "${GSL_CFLAGS}" )
+          string( REGEX REPLACE "-D[^;]+;" ""
+            GSL_CFLAGS "${GSL_CFLAGS}" )

-		if( GSL_CONFIG_EXECUTABLE )
-			set( GSL_FOUND ON )
+          # parse include dirs from cflags; drop -I prefix
+          string( REGEX MATCHALL "-I[^;]+"
+            GSL_INCLUDE_DIRS "${GSL_CFLAGS}" )
+          string( REPLACE "-I" ""
+            GSL_INCLUDE_DIRS "${GSL_INCLUDE_DIRS}")
+          string( REGEX REPLACE "-I[^;]+;" ""
+            GSL_CFLAGS "${GSL_CFLAGS}")

-      # run the gsl-config program to get cxxflags
-      execute_process(
-        COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --cflags
-        OUTPUT_VARIABLE GSL_CFLAGS
-        RESULT_VARIABLE RET
-        ERROR_QUIET
-        )
-      if( RET EQUAL 0 )
-        string( STRIP "${GSL_CFLAGS}" GSL_CFLAGS )
-        separate_arguments( GSL_CFLAGS )
+          message("GSL_DEFINITIONS=${GSL_DEFINITIONS}")
+          message("GSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS}")
+          message("GSL_CFLAGS=${GSL_CFLAGS}")
+        else( RET EQUAL 0 )
+          set( GSL_FOUND FALSE )
+        endif( RET EQUAL 0 )

-        # parse definitions from cflags; drop -D* from CFLAGS
-        string( REGEX MATCHALL "-D[^;]+"
-          GSL_DEFINITIONS  "${GSL_CFLAGS}" )
-        string( REGEX REPLACE "-D[^;]+;" ""
-          GSL_CFLAGS "${GSL_CFLAGS}" )
+        # run the gsl-config program to get the libs
+        execute_process(
+          COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --libs
+          OUTPUT_VARIABLE GSL_LIBRARIES
+          RESULT_VARIABLE RET
+          ERROR_QUIET
+          )
+        if( RET EQUAL 0 )
+          string(STRIP "${GSL_LIBRARIES}" GSL_LIBRARIES )
+          separate_arguments( GSL_LIBRARIES )

-        # parse include dirs from cflags; drop -I prefix
-        string( REGEX MATCHALL "-I[^;]+"
-          GSL_INCLUDE_DIRS "${GSL_CFLAGS}" )
-        string( REPLACE "-I" ""
-          GSL_INCLUDE_DIRS "${GSL_INCLUDE_DIRS}")
-        string( REGEX REPLACE "-I[^;]+;" ""
-          GSL_CFLAGS "${GSL_CFLAGS}")
+          # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
+          string( REGEX MATCHALL "-L[^;]+"
+            GSL_LIBRARY_DIRS "${GSL_LIBRARIES}" )
+          string( REPLACE "-L" ""
+            GSL_LIBRARY_DIRS "${GSL_LIBRARY_DIRS}" )
+        else( RET EQUAL 0 )
+          set( GSL_FOUND FALSE )
+        endif( RET EQUAL 0 )

-        message("GSL_DEFINITIONS=${GSL_DEFINITIONS}")
-        message("GSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS}")
-        message("GSL_CFLAGS=${GSL_CFLAGS}")
-      else( RET EQUAL 0 )
-        set( GSL_FOUND FALSE )
-      endif( RET EQUAL 0 )
+  			MARK_AS_ADVANCED(
+  				GSL_CFLAGS
+  			)
+  			message( STATUS "Using GSL from ${GSL_PREFIX}" )
+  		else( GSL_CONFIG_EXECUTABLE )
+  			message( STATUS "FindGSL: gsl-config not found.")
+  		endif( GSL_CONFIG_EXECUTABLE )
+  	endif( UNIX OR MSYS )
+  endif( WIN32 AND NOT CYGWIN AND NOT MSYS )

-      # run the gsl-config program to get the libs
-      execute_process(
-        COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --libs
-        OUTPUT_VARIABLE GSL_LIBRARIES
-        RESULT_VARIABLE RET
-        ERROR_QUIET
-        )
-      if( RET EQUAL 0 )
-        string(STRIP "${GSL_LIBRARIES}" GSL_LIBRARIES )
-        separate_arguments( GSL_LIBRARIES )
+  if( GSL_FOUND )
+    if( NOT GSL_FIND_QUIETLY )
+      message( STATUS "FindGSL: Found both GSL headers and library" )
+    endif( NOT GSL_FIND_QUIETLY )
+  else( GSL_FOUND )
+    if( GSL_FIND_REQUIRED )
+      message( FATAL_ERROR "FindGSL: Could not find GSL headers or library" )
+    endif( GSL_FIND_REQUIRED )
+  endif( GSL_FOUND )

-        # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
-        string( REGEX MATCHALL "-L[^;]+"
-          GSL_LIBRARY_DIRS "${GSL_LIBRARIES}" )
-        string( REPLACE "-L" ""
-          GSL_LIBRARY_DIRS "${GSL_LIBRARY_DIRS}" )
-      else( RET EQUAL 0 )
-        set( GSL_FOUND FALSE )
-      endif( RET EQUAL 0 )
+  #needed for gsl windows port but safe to always define
+  LIST(APPEND GSL_DEFINITIONS "-DGSL_DLL")

-			MARK_AS_ADVANCED(
-				GSL_CFLAGS
-			)
-			message( STATUS "Using GSL from ${GSL_PREFIX}" )
-		else( GSL_CONFIG_EXECUTABLE )
-			message( STATUS "FindGSL: gsl-config not found.")
-		endif( GSL_CONFIG_EXECUTABLE )
-	endif( UNIX OR MSYS )
-endif( WIN32 AND NOT CYGWIN AND NOT MSYS )
-
-if( GSL_FOUND )
-  if( NOT GSL_FIND_QUIETLY )
-    message( STATUS "FindGSL: Found both GSL headers and library" )
-  endif( NOT GSL_FIND_QUIETLY )
-else( GSL_FOUND )
-  if( GSL_FIND_REQUIRED )
-    message( FATAL_ERROR "FindGSL: Could not find GSL headers or library" )
-  endif( GSL_FIND_REQUIRED )
-endif( GSL_FOUND )
-
-#needed for gsl windows port but safe to always define
-LIST(APPEND GSL_DEFINITIONS "-DGSL_DLL")
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDE_DIRS)
+  INCLUDE(FindPackageHandleStandardArgs)
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDE_DIRS)
+ELSE(NOT GSL_FOUND)
+  message( STATUS "FindGSL: found gsl via pkg-config, using GSL from ${GSL_PREFIX}" )
 ENDIF(NOT GSL_FOUND)


Fix mkldnn build bug in Ubuntu

Fix mkldnn build bug in Ubuntu

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -24,7 +24,7 @@
 SET(MKLDNN_INC_DIR        "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE)

 IF(WIN32 OR APPLE)
-    MESSAGE(WARNING
+    MESSAGE(WARNING
         "Windows or Mac is not supported with MKLDNN in Paddle yet."
         "Force WITH_MKLDNN=OFF")
     SET(WITH_MKLDNN OFF CACHE STRING "Disable MKLDNN in Windows and MacOS" FORCE)
@@ -57,8 +57,10 @@
     GIT_TAG             "a29d8487a63afca3d5b8c5bbdbb473cf8ccc6e51"
     PREFIX              ${MKLDNN_SOURCES_DIR}
     UPDATE_COMMAND      ""
+    CMAKE_ARGS          -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+    CMAKE_ARGS          -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
     CMAKE_ARGS          -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
-    CMAKE_ARGS          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+    CMAKE_ARGS          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     CMAKE_ARGS          -DMKLROOT=${MKLML_ROOT}
     CMAKE_ARGS          -DCMAKE_C_FLAGS=${MKLDNN_CFLAG}
     CMAKE_ARGS          -DCMAKE_CXX_FLAGS=${MKLDNN_CXXFLAG}


Move the setting of LLVM_BUILD_MODE to a macro so that we can re-use it in compiler-rt

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

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1124,6 +1124,15 @@
   endforeach()
 endfunction(llvm_canonicalize_cmake_booleans)

+macro(set_llvm_build_mode)
+  # Configuration-time: See Unit/lit.site.cfg.in
+  if (CMAKE_CFG_INTDIR STREQUAL ".")
+    set(LLVM_BUILD_MODE ".")
+  else ()
+    set(LLVM_BUILD_MODE "%(build_mode)s")
+  endif ()
+endmacro()
+
 # This function provides an automatic way to 'configure'-like generate a file
 # based on a set of common and custom variables, specifically targeting the
 # variables needed for the 'lit.site.cfg' files. This function bundles the
@@ -1147,12 +1156,7 @@

   set(SHLIBEXT "${LTDL_SHLIB_EXT}")

-  # Configuration-time: See Unit/lit.site.cfg.in
-  if (CMAKE_CFG_INTDIR STREQUAL ".")
-    set(LLVM_BUILD_MODE ".")
-  else ()
-    set(LLVM_BUILD_MODE "%(build_mode)s")
-  endif ()
+  set_llvm_build_mode()

   # They below might not be the build tree but provided binary tree.
   set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})


Check for locally installed ogre

Check for locally installed ogre

--- build/modules/FindOGRE.cmake
+++ build/modules/FindOGRE.cmake
@@ -54,13 +54,13 @@
   ENDIF(OGRE_FRAMEWORKS)

 ELSE(WIN32)  # Linux etc
-
   FIND_PACKAGE(PkgConfig)
   IF(NOT PKG_CONFIG_FOUND)
     MESSAGE("Could not find pkg-config (to search for OGRE)")
   ELSE(NOT PKG_CONFIG_FOUND)
+    SET(ENV{PKG_CONFIG_PATH} /home/daniel/sirikata/dependencies/lib/pkgconfig)
     IF(OGRE_MINIMUM_VERSION)
-      PKG_CHECK_MODULES(OGRE OGRE >= ${OGRE_MINIMUM_VERSION})  # will set OGRE_FOUND
+      PKG_CHECK_MODULES( OGRE OGRE >= ${OGRE_MINIMUM_VERSION})  # will set OGRE_FOUND
     ELSE(OGRE_MINIMUM_VERSION)
       PKG_CHECK_MODULES(OGRE OGRE)  # will set OGRE_FOUND
     ENDIF(OGRE_MINIMUM_VERSION)


Use JAVASCRIPT_STYLE_TESTS flag to control running eslint/puglint tests

This allows downstreams (in my case COVALIC) to run static analysis
without having to run the setup/teardown tests for the web client
runtime.

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -25,12 +25,12 @@
 endfunction()

 function(add_eslint_test name input)
-  if (NOT BUILD_JAVASCRIPT_TESTS)
+  if (NOT JAVASCRIPT_STYLE_TESTS)
     return()
   endif()

   if (NOT ESLINT_EXECUTABLE)
-    message(FATAL_ERROR "CMake variable ESLINT_EXECUTABLE is not set. Run 'npm install' or disable BUILD_JAVASCRIPT_TESTS.")
+    message(FATAL_ERROR "CMake variable ESLINT_EXECUTABLE is not set. Run 'npm install' or disable JAVASCRIPT_STYLE_TESTS.")
   endif()

   set(_args ESLINT_IGNORE_FILE ESLINT_CONFIG_FILE)
@@ -57,12 +57,12 @@
 endfunction()

 function(add_puglint_test name path)
-  if (NOT BUILD_JAVASCRIPT_TESTS)
+  if (NOT JAVASCRIPT_STYLE_TESTS)
     return()
   endif()

   if (NOT PUGLINT_EXECUTABLE)
-    message(FATAL_ERROR "CMake variable PUGLINT_EXECUTABLE is not set. Run 'npm install' or disable BUILD_JAVASCRIPT_TESTS.")
+    message(FATAL_ERROR "CMake variable PUGLINT_EXECUTABLE is not set. Run 'npm install' or disable JAVASCRIPT_STYLE_TESTS.")
   endif()

   add_test(


Simplify the conditional branch to find the SDL_android_main.c.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -512,11 +512,10 @@
     # This source file could not be added when building SDL static library because it needs SDL_Main() which is not yet available at library building time
     # The SDL_Main() is defined by Android application that could be resided in other CMake projects outside of Urho3D CMake project which makes things a little bit complicated
     if (URHO3D_HOME)
-        # First attempt to search using project source directory
+        # Search using project source directory which for sure is not rooted
         find_file (ANDROID_MAIN_C_PATH SDL_android_main.c PATHS ${URHO3D_HOME}/Source/ThirdParty/SDL/src/main/android DOC "Path to SDL_android_main.c" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-    endif ()
-    if (NOT ANDROID_MAIN_C_PATH)
-        # Attempt another search using Urho3D SDK installation location which could be rooted
+    else ()
+        # Search using Urho3D SDK installation location which could be rooted
         find_file (ANDROID_MAIN_C_PATH SDL_android_main.c PATH_SUFFIXES ${PATH_SUFFIX} DOC "Path to SDL_android_main.c")
     endif ()
     if (ANDROID_MAIN_C_PATH)


updated glowl version

updated glowl version

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -84,7 +84,7 @@

     add_external_headeronly_project(glowl
       GIT_REPOSITORY https://github.com/invor/glowl.git
-      GIT_TAG "d7aa3d4c5c9568b8bb275c8cfaee1d6c5d7049b5"
+      GIT_TAG "dafee75f11c5d759df30ff651d6763e4e674dd0e"
       INCLUDE_DIR "include")
     target_compile_definitions(glowl INTERFACE GLOWL_OPENGL_INCLUDE_GLAD2)


COMP: fix missing ITKGDCM dependency

COMP: fix missing ITKGDCM dependency

This dependency is missing since InsightSoftwareConsortium/ITK#1768.

--- itk-module.cmake
+++ itk-module.cmake
@@ -5,6 +5,7 @@
 set(RTK_IO_DEPENDS
   ITKIOCSV
   ITKIOGDCM
+  ITKGDCM
   ITKIOMeta
   ITKIORAW
   ITKIOTIFF


Update FindSFML with the one provided with SFML 2.3 (this especially fixes the dependencies search in case of static build)

--- cmake/Modules/FindSFML.cmake
+++ cmake/Modules/FindSFML.cmake
@@ -89,15 +89,16 @@
         set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp")
     endif()
     FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS)
-    STRING(REGEX MATCH ".*#define SFML_VERSION_MAJOR ([0-9]+).*#define SFML_VERSION_MINOR ([0-9]+).*" SFML_CONFIG_HPP_CONTENTS "${SFML_CONFIG_HPP_CONTENTS}")
+    STRING(REGEX MATCH ".*#define SFML_VERSION_MAJOR ([0-9]+).*#define SFML_VERSION_MINOR ([0-9]+).*#define SFML_VERSION_PATCH ([0-9]+).*" SFML_CONFIG_HPP_CONTENTS "${SFML_CONFIG_HPP_CONTENTS}")
     STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}")
     STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}")
-    math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10 + ${SFML_FIND_VERSION_MINOR}")
+    STRING(REGEX REPLACE ".*#define SFML_VERSION_PATCH ([0-9]+).*" "\\1" SFML_VERSION_PATCH "${SFML_CONFIG_HPP_CONTENTS}")
+    math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10000 + ${SFML_FIND_VERSION_MINOR} * 100 + ${SFML_FIND_VERSION_PATCH}")

     # if we could extract them, compare with the requested version number
     if (SFML_VERSION_MAJOR)
         # transform version numbers to an integer
-        math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10 + ${SFML_VERSION_MINOR}")
+        math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10000 + ${SFML_VERSION_MINOR} * 100 + ${SFML_VERSION_PATCH}")

         # compare them
         if(SFML_VERSION LESS SFML_REQUESTED_VERSION)
@@ -105,10 +106,11 @@
         endif()
     else()
         # SFML version is < 2.0
-        if (SFML_REQUESTED_VERSION GREATER 19)
+        if (SFML_REQUESTED_VERSION GREATER 10900)
             set(SFML_VERSION_OK FALSE)
             set(SFML_VERSION_MAJOR 1)
             set(SFML_VERSION_MINOR x)
+            set(SFML_VERSION_PATCH x)
         endif()
     endif()
 endif()
@@ -179,7 +181,7 @@
     if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
         # library found
         set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE)
-
+
         # if both are found, set SFML_XXX_LIBRARY to contain both
         if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
             set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug     ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}
@@ -238,7 +240,8 @@

     # macro that searches for a 3rd-party library
     macro(find_sfml_dependency output friendlyname)
-        find_library(${output} NAMES ${ARGN} PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib)
+        # No lookup in environment variables (PATH on Windows), as they may contain wrong library versions
+        find_library(${output} NAMES ${ARGN} PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib NO_SYSTEM_ENVIRONMENT_PATH)
         if(${${output}} STREQUAL "${output}-NOTFOUND")
             unset(output)
             set(FIND_SFML_DEPENDENCIES_NOTFOUND "${FIND_SFML_DEPENDENCIES_NOTFOUND} ${friendlyname}")
@@ -254,7 +257,7 @@
             set(SFML_SYSTEM_DEPENDENCIES "pthread")
         endif()
         if(FIND_SFML_OS_LINUX)
-            set(SFML_SYSTEM_DEPENDENCIES "rt")
+            set(SFML_SYSTEM_DEPENDENCIES ${SFML_SYSTEM_DEPENDENCIES} "rt")
         endif()
         if(FIND_SFML_OS_WINDOWS)
             set(SFML_SYSTEM_DEPENDENCIES "winmm")
@@ -278,22 +281,25 @@
     if(NOT ${FIND_SFML_WINDOW_COMPONENT} EQUAL -1)

         # find libraries
+        if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD)
+            find_sfml_dependency(X11_LIBRARY "X11" X11)
+            find_sfml_dependency(LIBXCB_LIBRARIES "XCB" xcb libxcb)
+            find_sfml_dependency(X11_XCB_LIBRARY "X11-xcb" X11-xcb libX11-xcb)
+            find_sfml_dependency(XCB_RANDR_LIBRARY "xcb-randr" xcb-randr libxcb-randr)
+            find_sfml_dependency(XCB_IMAGE_LIBRARY "xcb-image" xcb-image libxcb-image)
+        endif()
+
         if(FIND_SFML_OS_LINUX)
-            find_sfml_dependency(X11_LIBRARY "X11" X11)
-            find_sfml_dependency(XRANDR_LIBRARY "Xrandr" Xrandr)
-            find_sfml_dependency(UDEV_LIBRARIES "UDev" udev)
+            find_sfml_dependency(UDEV_LIBRARIES "UDev" udev libudev)
         endif()

         # update the list
         if(FIND_SFML_OS_WINDOWS)
             set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "opengl32" "winmm" "gdi32")
-        elseif(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD)
-            set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${XRANDR_LIBRARY})
-            if(FIND_SFML_OS_FREEBSD)
-                set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "usbhid")
-            else()
-                set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} ${UDEV_LIBRARIES})
-            endif()
+        elseif(FIND_SFML_OS_LINUX)
+            set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY} ${XCB_IMAGE_LIBRARY} ${UDEV_LIBRARIES})
+        elseif(FIND_SFML_OS_FREEBSD)
+            set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${LIBXCB_LIBRARIES} ${X11_XCB_LIBRARY} ${XCB_RANDR_LIBRARY} ${XCB_IMAGE_LIBRARY} "usbhid")
         elseif(FIND_SFML_OS_MACOSX)
             set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "-framework OpenGL -framework Foundation -framework AppKit -framework IOKit -framework Carbon")
         endif()
@@ -303,14 +309,13 @@
     # sfml-graphics
     list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT)
     if(NOT ${FIND_SFML_GRAPHICS_COMPONENT} EQUAL -1)
-
+
         # find libraries
         find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype)
-        find_sfml_dependency(GLEW_LIBRARY "GLEW" glew GLEW glew32 glew32s glew64 glew64s)
         find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg)

         # update the list
-        set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${GLEW_LIBRARY} ${JPEG_LIBRARY})
+        set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
         set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES})
     endif()

@@ -320,11 +325,15 @@

         # find libraries
         find_sfml_dependency(OPENAL_LIBRARY "OpenAL" openal openal32)
-        find_sfml_dependency(SNDFILE_LIBRARY "libsndfile" sndfile)
+        find_sfml_dependency(OGG_LIBRARY "Ogg" ogg)
+        find_sfml_dependency(VORBIS_LIBRARY "Vorbis" vorbis)
+        find_sfml_dependency(VORBISFILE_LIBRARY "VorbisFile" vorbisfile)
+        find_sfml_dependency(VORBISENC_LIBRARY "VorbisEnc" vorbisenc)
+        find_sfml_dependency(FLAC_LIBRARY "FLAC" flac)

         # update the list
-        set(SFML_AUDIO_DEPENDENCIES ${OPENAL_LIBRARY} ${SNDFILE_LIBRARY})
-        set(SFML_DEPENDENCIES ${SFML_AUDIO_DEPENDENCIES} ${SFML_DEPENDENCIES})
+        set(SFML_AUDIO_DEPENDENCIES ${OPENAL_LIBRARY} ${FLAC_LIBRARY} ${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})
+        set(SFML_DEPENDENCIES ${SFML_DEPENDENCIES} ${SFML_AUDIO_DEPENDENCIES})
     endif()

 endif()
@@ -332,7 +341,7 @@
 # handle errors
 if(NOT SFML_VERSION_OK)
     # SFML version not ok
-    set(FIND_SFML_ERROR "SFML found but version too low (requested: ${SFML_FIND_VERSION}, found: ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR})")
+    set(FIND_SFML_ERROR "SFML found but version too low (requested: ${SFML_FIND_VERSION}, found: ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH})")
     set(SFML_FOUND FALSE)
 elseif(SFML_STATIC_LIBRARIES AND FIND_SFML_DEPENDENCIES_NOTFOUND)
     set(FIND_SFML_ERROR "SFML found but some of its dependencies are missing (${FIND_SFML_DEPENDENCIES_NOTFOUND})")
@@ -352,6 +361,6 @@
 endif()

 # handle success
-if(SFML_FOUND)
-    message(STATUS "Found SFML ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR} in ${SFML_INCLUDE_DIR}")
-endif()
+if(SFML_FOUND AND NOT SFML_FIND_QUIETLY)
+    message(STATUS "Found SFML ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH} in ${SFML_INCLUDE_DIR}")
+endif()


Added comments to avr_crosscompile.cmake

--- cmake/avr_crosscompile.cmake
+++ cmake/avr_crosscompile.cmake
@@ -10,7 +10,11 @@
 # what the cxx compiler and binutils are called.
 set(CMAKE_C_COMPILER avr-gcc)

-set(PROGRAMMER avrispmkII)
+# Setup the programmer that is used to write to the MCU
+# run `avrdude -c ?` for a list of valid ID's
+# run `avrdude -p ?` for a list of valid MCU's
+find_program(PROGRAMMER avrdude)
+set(PROGRAMMER_ID avrispmkII)
 set(PROGRAMMER_MCU c128)

 # Make sure we have a working copy of the correct objcopy
@@ -19,9 +23,8 @@
     set(CMAKE_OBJCOPY ${AVROBJCOPY_PROGRAM})
 endif(NOT CMAKE_OBJCOPY)

-find_program(AVRDUDE avrdude)
-
-# Generates an intel hex file from a compile binary elf file
+# Sets up a custom command and target that Generates an intel hex file from a
+# compiled binary elf file.
 function(avr_create_hex elf_file)
 	add_custom_command(
 		OUTPUT ${elf_file}.hex
@@ -38,15 +41,17 @@
 		)
 endfunction()

+# Sets up a target that calls the programmer to flash the MCU with the given
+# binary. It automaticly converts the elf_file to the correct hex format
 function(avr_make_flashable elf_file)
 	avr_create_hex(${elf_file})

 	add_custom_target(${elf_file}_writeflash
-		COMMAND ${AVRDUDE}
-		ARGS 	-c ${PROGRAMMER}
-				-p ${PROGRAMMER_MCU}
-				-P usb -B 8
-				-U flash:w:${elf_file}.hex
+		COMMAND ${PROGRAMMER}
+					-c ${PROGRAMMER_ID}
+					-p ${PROGRAMMER_MCU}
+					-P usb -B 8
+					-U flash:w:${elf_file}.hex
 		DEPENDS ${elf_file}_hex
 		VERBATIM
 		)


[cmake] [OCaml] Make ocamldoc targets depend on output files

OCaml doc builds fail without .cmi files, and .cmi files are collected
in ocaml_outputs. Therefore, make doc targets depend on ocaml_outputs as
well.

Fixes: https://llvm.org/bugs/show_bug.cgi?id=23777

Patch by Michał Górny <mgorny@gentoo.org>

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

--- cmake/modules/AddOCaml.cmake
+++ cmake/modules/AddOCaml.cmake
@@ -149,7 +149,7 @@
             "-I" "${LLVM_LIBRARY_DIR}/ocaml/"
             "-dump" "${bin}/${name}.odoc"
             ${ocaml_pkgs} ${ocaml_inputs}
-    DEPENDS ${ocaml_inputs}
+    DEPENDS ${ocaml_inputs} ${ocaml_outputs}
     COMMENT "Building OCaml documentation for ${name}"
     VERBATIM)


not necessary

not necessary

svn path=/trunk/KDE/kdepim/; revision=519544

--- cmake/modules/FindKDE4.cmake
+++ cmake/modules/FindKDE4.cmake
@@ -55,16 +55,4 @@
    MESSAGE(FATAL_ERROR "Could not find KDE4")
 ENDIF (KDE4_FIND_REQUIRED AND NOT KDE4_FOUND)

-set(LIB_KDECORE ${QT_AND_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${X11_X11_LIB} DCOP ${ZLIB_LIBRARY})

-set(LIB_KDEUI ${LIB_KDECORE} kdeui )
-
-set(LIB_KIO ${LIB_KDEUI} kio)
-
-set(LIB_KPARTS ${LIB_KIO} kparts)
-
-set(LIB_KUTILS ${LIB_KPARTS} kutils)
-
-set(LIB_KDE3SUPPORT ${QT_QT3SUPPORT_LIBRARY} ${LIB_KUTILS} kde3support)
-
-


bug when creating cython debug line with newer cmake

Using cmake's configuration dependant command line thing. But the condition should be put separately
for each word on the line.

--- scripts/PythonModule.cmake
+++ scripts/PythonModule.cmake
@@ -282,13 +282,11 @@
         -o "${CMAKE_CURRENT_BINARY_DIR}/${c_source}" ${inclusion}
     )
     if(NOT CMAKE_VERSION VERSION_LESS "2.8.10")
-        set(cygdb_line
-            "--gdb --gdb-outdir ${PROJECT_BINARY_DIR}/cython_debug_files")
+        set(cond "$<$<OR:$<CONFIG:RelWithDebInfo>,$<CONFIG:Debug>>:")
         set(cmdline
-            "$<$<OR:$<CONFIG:RelWithDebInfo>,$<CONFIG:Debug>>:${cygdb_line}>")
-        set(arguments "${arguments} ${cmdline}")
-    endif()
-
+            "${cond}--gdb> ${cond}--gdb-outdir> ${cond}${PROJECT_BINARY_DIR}/cython_debug_files>")
+    endif()
+    message(STATUS "c source ${c_source} -- ${arguments} -- ${DEPENDENCIES}")
     add_custom_command(
         OUTPUT "${c_source}"
         COMMAND ${arguments}


Override sqlpp11-connector's cmake module path.

--- cmake/modules/Build-sqlpp11-connector-mysql.cmake
+++ cmake/modules/Build-sqlpp11-connector-mysql.cmake
@@ -9,7 +9,7 @@
     sqlpp11-connector-mysql
     GIT_REPOSITORY https://github.com/RavenX8/sqlpp11-connector-mysql
     GIT_TAG c6e81fd9ffe8ff63d9d9fba84053aaca20194272
-    CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DSQLPP11_INCLUDE_DIR=${SQLPP11_INCLUDE_DIR} -DDATE_INCLUDE_DIR=${DATE_INCLUDE_DIR} -DCMAKE_INSTALL_PREFIX=${SQLPP11_MYSQL_INSTALL_DIR} -DENABLE_TESTS=OFF
+    CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${SQLPP11_MYSQL_INSTALL_DIR} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DSQLPP11_INCLUDE_DIR=${SQLPP11_INCLUDE_DIR} -DDATE_INCLUDE_DIR=${DATE_INCLUDE_DIR} -DENABLE_TESTS=OFF
     BUILD_BYPRODUCTS ${_byproducts}
     DEPENDS SQLPP11::SQLPP11
     INSTALL_DIR ${SQLPP11_MYSQL_INSTALL_DIR}
@@ -23,7 +23,7 @@
     sqlpp11-connector-mysql
     GIT_REPOSITORY https://github.com/RavenX8/sqlpp11-connector-mysql
     GIT_TAG c6e81fd9ffe8ff63d9d9fba84053aaca20194272
-    CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${SQLPP11_MYSQL_INSTALL_DIR} -DSQLPP11_INCLUDE_DIR=${SQLPP11_INCLUDE_DIR} -DDATE_INCLUDE_DIR=${DATE_INCLUDE_DIR} -DENABLE_TESTS=OFF
+    CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${SQLPP11_MYSQL_INSTALL_DIR} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DSQLPP11_INCLUDE_DIR=${SQLPP11_INCLUDE_DIR} -DDATE_INCLUDE_DIR=${DATE_INCLUDE_DIR} -DENABLE_TESTS=OFF
     BUILD_BYPRODUCTS ${_byproducts}
     DEPENDS SQLPP11::SQLPP11
     INSTALL_DIR ${SQLPP11_MYSQL_INSTALL_DIR}


GraphControl 3.10.4-3rc Release Candidate 3

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

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 10 )
 set ( HPCC_POINT 4 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 2 )
+set ( HPCC_SEQUENCE 3 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Bump to version 0.2.12

Bump to version 0.2.12

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 0.2.11)
+set(autowiring_VERSION 0.2.12)


Fix GIT_SUBMODULE mode for nested submodule (fixes #395) (#437)

--- cmake/modules/hunter_pack_git_submodule.cmake
+++ cmake/modules/hunter_pack_git_submodule.cmake
@@ -45,38 +45,57 @@

   set(top_git_directory "${output}")

-  set(cmd "${git_executable}" submodule status "${x_GIT_SUBMODULE}")
-  execute_process(
-      COMMAND ${cmd}
-      WORKING_DIRECTORY "${top_git_directory}"
-      RESULT_VARIABLE result
-      OUTPUT_VARIABLE output
-      ERROR_VARIABLE error
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-      ERROR_STRIP_TRAILING_WHITESPACE
-  )
-
-  if(NOT result EQUAL "0")
-    string(REPLACE ";" " " cmd "${cmd}")
-    hunter_internal_error(
-        "Command failed: '${cmd}' (${result}, ${output}, ${error})"
-        "To reproduce error go to '${top_git_directory}' and"
-        "run command '${cmd}'"
-    )
-  endif()
-
-  set(submodule_file "${top_git_directory}/.gitmodules")
-  if(NOT EXISTS "${submodule_file}")
-    hunter_internal_error("File not found: '${submodule_file}'")
-  endif()
-  set_property(
-      DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${submodule_file}"
-  )
-
   set(submodule_dir "${top_git_directory}/${x_GIT_SUBMODULE}")
   if(NOT EXISTS "${submodule_dir}")
     hunter_internal_error("Directory not exist: '${submodule_dir}'")
   endif()
+
+  set(cmd "${git_executable}" rev-parse --show-toplevel)
+  execute_process(
+      COMMAND ${cmd}
+      WORKING_DIRECTORY "${submodule_dir}/../"
+      RESULT_VARIABLE result
+      OUTPUT_VARIABLE output
+      ERROR_VARIABLE error
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      ERROR_STRIP_TRAILING_WHITESPACE
+  )
+
+  if(NOT result EQUAL "0")
+    hunter_internal_error(
+        "Command failed: ${cmd} (${result}, ${output}, ${error})"
+    )
+  endif()
+
+  set(parent_git_directory "${output}")
+
+  set(cmd "${git_executable}" submodule status "${submodule_dir}")
+  execute_process(
+      COMMAND ${cmd}
+      WORKING_DIRECTORY "${parent_git_directory}"
+      RESULT_VARIABLE result
+      OUTPUT_VARIABLE output
+      ERROR_VARIABLE error
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      ERROR_STRIP_TRAILING_WHITESPACE
+  )
+
+  if(NOT result EQUAL "0")
+    string(REPLACE ";" " " cmd "${cmd}")
+    hunter_internal_error(
+        "Command failed: '${cmd}' (${result}, ${output}, ${error})"
+        "To reproduce error go to '${parent_git_directory}' and"
+        "run command '${cmd}'"
+    )
+  endif()
+
+  set(submodule_file "${parent_git_directory}/.gitmodules")
+  if(NOT EXISTS "${submodule_file}")
+    hunter_internal_error("File not found: '${submodule_file}'")
+  endif()
+  set_property(
+      DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${submodule_file}"
+  )

   set(cmd "${git_executable}" status --porcelain)
   execute_process(


Changes to match the specification given in tracker item 3242.  https://tracker.physiomeproject.org/show_bug.cgi?id=3242

git-svn-id: b9baf8c2d14a71b3ba9c27a102eb6e792fc13348@9432 3c1deb5b-d424-0410-962d-aba41a686d42

--- core/source/configure/cmiss_shared_object.h.cmake
+++ core/source/configure/cmiss_shared_object.h.cmake
@@ -2,27 +2,30 @@
 #ifndef CMISS_SHARED_OBJECT_H
 #define CMISS_SHARED_OBJECT_H

+// Handle the exporting of symbols from a dynamic shared object
+// across different oses.
+
 #if defined _WIN32 || defined __CYGWIN__
-  #define ZINC_DLL_IMPORT __declspec(dllimport)
-  #define ZINC_DLL_EXPORT __declspec(dllexport)
+  #define ZINC_DSO_IMPORT __declspec(dllimport)
+  #define ZINC_DSO_EXPORT __declspec(dllexport)
 #else
   #if __GNUC__ >= 4
-    #define ZINC_DLL_IMPORT __attribute__ ((visibility ("default")))
-    #define ZINC_DLL_EXPORT __attribute__ ((visibility ("default")))
+    #define ZINC_DSO_IMPORT __attribute__ ((visibility ("default")))
+    #define ZINC_DSO_EXPORT __attribute__ ((visibility ("default")))
   #else
-    #define ZINC_DLL_IMPORT
-    #define ZINC_DLL_EXPORT
+    #define ZINC_DSO_IMPORT
+    #define ZINC_DSO_EXPORT
   #endif
 #endif

 // Now we use the generic helper definitions above to define ZINC_API.
-// ZINC_API is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
+// ZINC_API is used for the public API symbols. It either DSO imports or DSO exports (or does nothing for static build)

 #ifdef ZINC_SHARED_OBJECT // defined if Zinc is compiled as a shared object
-  #ifdef ZINC_EXPORTS // defined if we are building the Zinc DLL (instead of using it)
-    #define ZINC_API ZINC_DLL_EXPORT
+  #ifdef ZINC_EXPORTS // defined if we are building the Zinc DSO (instead of using it)
+    #define ZINC_API ZINC_DSO_EXPORT
   #else
-    #define ZINC_API ZINC_DLL_IMPORT
+    #define ZINC_API ZINC_DSO_IMPORT
   #endif // ZINC_EXPORTS
 #else // ZINC_SHARED_OBJECT is not defined: this means Zinc is a static lib.
   #define ZINC_API


Improve search of the OCCT libraries.

Improve search of the OCCT libraries.

--- adm_local/cmake_files/deprecated/FindCAS.cmake
+++ adm_local/cmake_files/deprecated/FindCAS.cmake
@@ -56,13 +56,6 @@
   SET(CAS_CPPFLAGS "${CAS_CPPFLAGS} -DCAS_VERSION_DEVELOPMENT")
 ENDIF(CAS_VERSION_DEVELOPMENT STREQUAL 1)

-IF(NOT WINDOWS)
-  FIND_LIBRARY(Xmu Xmu)
-  IF(Xmu)
-    SET(CAS_LDPATH ${Xmu})
-  ENDIF(Xmu)
-ENDIF(NOT WINDOWS)
-
 IF(WINDOWS)
   IF(CMAKE_BUILD_TYPE STREQUAL Debug)
     SET(CASROOT_LIBDIR ${CASROOT}/win32/libd)
@@ -73,100 +66,109 @@
   SET(CASROOT_LIBDIR ${CASROOT}/lib)
 ENDIF(WINDOWS)

-FIND_LIBRARY(BinLPlugin BinLPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(BinPlugin BinPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(BinTObjPlugin BinTObjPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(BinXCAFPlugin BinXCAFPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(FWOSPlugin FWOSPlugin PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(mscmd mscmd PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(PTKernel PTKernel PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(StdLPlugin StdLPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(StdPlugin StdPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKAdvTools TKAdvTools PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKBin TKBin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKBinL TKBinL PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKBinTObj TKBinTObj PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKBinXCAF TKBinXCAF PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKBO TKBO PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKBool TKBool PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKBRep TKBRep PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKCAF TKCAF PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKCDF TKCDF PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKCDLFront TKCDLFront PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKCPPClient TKCPPClient PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKCPPExt TKCPPExt PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKCPPIntExt TKCPPIntExt PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKCPPJini TKCPPJini PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKCSFDBSchema TKCSFDBSchema PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKDCAF TKDCAF PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKDraw TKDraw PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKernel TKernel PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKFeat TKFeat PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKFillet TKFillet PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKG2d TKG2d PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKG3d TKG3d PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKGeomAlgo TKGeomAlgo PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKGeomBase TKGeomBase PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKHLR TKHLR PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKIDLFront TKIDLFront PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKIGES TKIGES PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKLCAF TKLCAF PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKMath TKMath PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKMesh TKMesh PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKMeshVS TKMeshVS PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKNIS TKNIS PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKOffset TKOffset PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKOpenGl TKOpenGl PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKPCAF TKPCAF PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKPLCAF TKPLCAF PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKPrim TKPrim PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKPShape TKPShape PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKService TKService PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKShapeSchema TKShapeSchema PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKShHealing TKShHealing PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKStdLSchema TKStdLSchema PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKStdSchema TKStdSchema PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKSTEP TKSTEP PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKSTEP209 TKSTEP209 PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKSTEPAttr TKSTEPAttr PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKSTEPBase TKSTEPBase PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKSTL TKSTL PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKTCPPExt TKTCPPExt PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKTObj TKTObj PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKTObjDRAW TKTObjDRAW PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKTopAlgo TKTopAlgo PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKTopTest TKTopTest PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKV2d TKV2d PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKV3d TKV3d PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKViewerTest TKViewerTest PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKVRML TKVRML PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKWOK TKWOK PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKWOKTcl TKWOKTcl PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXCAF TKXCAF PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXCAFSchema TKXCAFSchema PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKXDEDRAW TKXDEDRAW PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXDEIGES TKXDEIGES PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXDESTEP TKXDESTEP PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXMesh TKXMesh PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXml TKXml PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXmlL TKXmlL PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXmlTObj TKXmlTObj PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXmlXCAF TKXmlXCAF PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(TKXSBase TKXSBase PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(TKXSDRAW TKXSDRAW PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(wokcmd wokcmd PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(wokdeliverysteps wokdeliverysteps PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(wokdfltsteps wokdfltsteps PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(wokobjssteps wokobjssteps PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(wokorbixsteps wokorbixsteps PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(woksteps woksteps PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(woktoolscmd woktoolscmd PATHS ${CASROOT_LIBDIR})
-# FIND_LIBRARY(wokutilscmd wokutilscmd PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(XCAFPlugin XCAFPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(XmlLPlugin XmlLPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(XmlPlugin XmlPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(XmlTObjPlugin XmlTObjPlugin PATHS ${CASROOT_LIBDIR})
-FIND_LIBRARY(XmlXCAFPlugin XmlXCAFPlugin PATHS ${CASROOT_LIBDIR})
+SET(CMAKE_LIBRARY_PATH ${CASROOT_LIBDIR})
+
+IF(NOT WINDOWS)
+  FIND_LIBRARY(Xmu Xmu)
+  IF(Xmu)
+    SET(CAS_LDPATH ${Xmu})
+  ENDIF(Xmu)
+ENDIF(NOT WINDOWS)
+
+#FIND_LIBRARY(BinLPlugin BinLPlugin)
+#FIND_LIBRARY(BinPlugin BinPlugin)
+#FIND_LIBRARY(BinTObjPlugin BinTObjPlugin)
+#FIND_LIBRARY(BinXCAFPlugin BinXCAFPlugin)
+FIND_LIBRARY(FWOSPlugin FWOSPlugin)
+# FIND_LIBRARY(mscmd mscmd)
+FIND_LIBRARY(PTKernel PTKernel)
+FIND_LIBRARY(StdLPlugin StdLPlugin)
+FIND_LIBRARY(StdPlugin StdPlugin)
+FIND_LIBRARY(TKAdvTools TKAdvTools)
+FIND_LIBRARY(TKBin TKBin)
+FIND_LIBRARY(TKBinL TKBinL)
+FIND_LIBRARY(TKBinTObj TKBinTObj)
+FIND_LIBRARY(TKBinXCAF TKBinXCAF)
+FIND_LIBRARY(TKBO TKBO)
+FIND_LIBRARY(TKBool TKBool)
+FIND_LIBRARY(TKBRep TKBRep)
+FIND_LIBRARY(TKCAF TKCAF)
+FIND_LIBRARY(TKCDF TKCDF)
+# FIND_LIBRARY(TKCDLFront TKCDLFront)
+# FIND_LIBRARY(TKCPPClient TKCPPClient)
+# FIND_LIBRARY(TKCPPExt TKCPPExt)
+# FIND_LIBRARY(TKCPPIntExt TKCPPIntExt)
+# FIND_LIBRARY(TKCPPJini TKCPPJini)
+# FIND_LIBRARY(TKCSFDBSchema TKCSFDBSchema)
+# FIND_LIBRARY(TKDCAF TKDCAF)
+# FIND_LIBRARY(TKDraw TKDraw)
+FIND_LIBRARY(TKernel TKernel)
+FIND_LIBRARY(TKFeat TKFeat)
+FIND_LIBRARY(TKFillet TKFillet)
+FIND_LIBRARY(TKG2d TKG2d)
+FIND_LIBRARY(TKG3d TKG3d)
+FIND_LIBRARY(TKGeomAlgo TKGeomAlgo)
+FIND_LIBRARY(TKGeomBase TKGeomBase)
+FIND_LIBRARY(TKHLR TKHLR)
+# FIND_LIBRARY(TKIDLFront TKIDLFront)
+FIND_LIBRARY(TKIGES TKIGES)
+FIND_LIBRARY(TKLCAF TKLCAF)
+FIND_LIBRARY(TKMath TKMath)
+FIND_LIBRARY(TKMesh TKMesh)
+FIND_LIBRARY(TKMeshVS TKMeshVS)
+FIND_LIBRARY(TKNIS TKNIS)
+FIND_LIBRARY(TKOffset TKOffset)
+FIND_LIBRARY(TKOpenGl TKOpenGl)
+FIND_LIBRARY(TKPCAF TKPCAF)
+FIND_LIBRARY(TKPLCAF TKPLCAF)
+FIND_LIBRARY(TKPrim TKPrim)
+FIND_LIBRARY(TKPShape TKPShape)
+FIND_LIBRARY(TKService TKService)
+FIND_LIBRARY(TKShapeSchema TKShapeSchema)
+FIND_LIBRARY(TKShHealing TKShHealing)
+FIND_LIBRARY(TKStdLSchema TKStdLSchema)
+FIND_LIBRARY(TKStdSchema TKStdSchema)
+FIND_LIBRARY(TKSTEP TKSTEP)
+FIND_LIBRARY(TKSTEP209 TKSTEP209)
+FIND_LIBRARY(TKSTEPAttr TKSTEPAttr)
+FIND_LIBRARY(TKSTEPBase TKSTEPBase)
+FIND_LIBRARY(TKSTL TKSTL)
+# FIND_LIBRARY(TKTCPPExt TKTCPPExt)
+FIND_LIBRARY(TKTObj TKTObj)
+# FIND_LIBRARY(TKTObjDRAW TKTObjDRAW)
+FIND_LIBRARY(TKTopAlgo TKTopAlgo)
+# FIND_LIBRARY(TKTopTest TKTopTest)
+FIND_LIBRARY(TKV2d TKV2d)
+FIND_LIBRARY(TKV3d TKV3d)
+# FIND_LIBRARY(TKViewerTest TKViewerTest)
+FIND_LIBRARY(TKVRML TKVRML)
+# FIND_LIBRARY(TKWOK TKWOK)
+# FIND_LIBRARY(TKWOKTcl TKWOKTcl)
+FIND_LIBRARY(TKXCAF TKXCAF)
+FIND_LIBRARY(TKXCAFSchema TKXCAFSchema)
+# FIND_LIBRARY(TKXDEDRAW TKXDEDRAW)
+FIND_LIBRARY(TKXDEIGES TKXDEIGES)
+FIND_LIBRARY(TKXDESTEP TKXDESTEP)
+FIND_LIBRARY(TKXMesh TKXMesh)
+FIND_LIBRARY(TKXml TKXml)
+FIND_LIBRARY(TKXmlL TKXmlL)
+FIND_LIBRARY(TKXmlTObj TKXmlTObj)
+FIND_LIBRARY(TKXmlXCAF TKXmlXCAF)
+FIND_LIBRARY(TKXSBase TKXSBase)
+# FIND_LIBRARY(TKXSDRAW TKXSDRAW)
+# FIND_LIBRARY(wokcmd wokcmd)
+# FIND_LIBRARY(wokdeliverysteps wokdeliverysteps)
+# FIND_LIBRARY(wokdfltsteps wokdfltsteps)
+# FIND_LIBRARY(wokobjssteps wokobjssteps)
+# FIND_LIBRARY(wokorbixsteps wokorbixsteps)
+# FIND_LIBRARY(woksteps woksteps)
+# FIND_LIBRARY(woktoolscmd woktoolscmd)
+# FIND_LIBRARY(wokutilscmd wokutilscmd)
+FIND_LIBRARY(XCAFPlugin XCAFPlugin)
+FIND_LIBRARY(XmlLPlugin XmlLPlugin)
+FIND_LIBRARY(XmlPlugin XmlPlugin)
+FIND_LIBRARY(XmlTObjPlugin XmlTObjPlugin)
+FIND_LIBRARY(XmlXCAFPlugin XmlXCAFPlugin)

 SET(CAS_KERNEL ${TKernel} ${TKMath})
 SET(CAS_OCAF ${TKernel} ${TKMath} ${TKCDF} ${TKLCAF})


changed some warnings to errors

changed some warnings to errors

--- cmake_compiler_settings/cmake/gcc_flags.cmake
+++ cmake_compiler_settings/cmake/gcc_flags.cmake
@@ -20,12 +20,12 @@
 add_compile_options(-Werror=pointer-arith -fno-nonansi-builtins -fstrict-enums -fvisibility-inlines-hidden)

 # multiple declaration, shadowing, eval undefined identifier
-add_compile_options(-Wshadow -Wundef -Wredundant-decls)
+add_compile_options(-Wshadow -Wundef -Werror=redundant-decls)

 add_compile_options(-Werror=ignored-qualifiers)

 # class/structs and init
-add_compile_options(-Wnon-virtual-dtor -Wctor-dtor-privacy -Werror=non-virtual-dtor -Werror=reorder -Werror=uninitialized -Werror=maybe-uninitialized -Werror=delete-non-virtual-dtor)
+add_compile_options(-Wctor-dtor-privacy -Werror=non-virtual-dtor -Werror=reorder -Werror=uninitialized -Werror=maybe-uninitialized -Werror=delete-non-virtual-dtor)
 if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 6)
 	add_compile_options(-Werror=init-self -Werror=memset-transposed-args)
 elseif(CMAKE_CXX_COMPILER_VERSION LESSER_EQUAL 4)
@@ -47,7 +47,7 @@
 add_compile_options(-Wnonnull -Wcast-qual -Wcast-align -Werror=null-dereference)

 # arithmetic/numeric warnings
-add_compile_options(-Wfloat-equal -Wsign-compare -Wconversion -Wsign-promo -Werror=shift-overflow -ftrapv)
+add_compile_options(-Wfloat-equal -Wsign-compare -Werror=conversion  -Wsign-promo -Werror=shift-overflow -ftrapv)

 # logical operations
 add_compile_options(-Wlogical-op)
@@ -165,7 +165,7 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fpie -fpic -fPIC")

 if( CMAKE_SYSTEM_NAME STREQUAL "Windows" )
-    # enable ASLR
+	# enable ASLR
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,dynamicbase ")
 	# enable DEP
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,nxcompat")


Do not warn on ALLOW_MEMORY_GROWTH=1

Do not warn on ALLOW_MEMORY_GROWTH=1

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -48,7 +48,7 @@
     set(EMCC_FLAGS "${EMCC_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
     set(EMCC_FLAGS "${EMCC_FLAGS} -s LINKABLE=1")
     set(EMCC_FLAGS "${EMCC_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
-    set(EMCC_FLAGS "${EMCC_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
+    set(EMCC_FLAGS "${EMCC_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -Wno-almost-asm")

     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EMCC_FLAGS}")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EMCC_FLAGS}")


Add option BUILD_FUZZERS and config to build fuzzing tests

Patch adds support of fuzzing for local running and running
on OSS-Fuzz infrastructure [1]. Support can be enabled with option
BUILD_FUZZERS that disabled by default. Config fuzzer_config
includes options that should be used for building fuzzing tests.

How-To Build:

$ cmake -DBUILD_FUZZERS=ON \
	-DCMAKE_C_COMPILER="/usr/bin/clang" \
	-DCMAKE_CXX_COMPILER="/usr/bin/clang++"
	-B build -S .
$ make -j -C build

1. https://google.github.io/oss-fuzz/getting-started/new-project-guide/

Closes #6680

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -179,3 +179,54 @@
 if (IOS)
 	include(ConfigOptionsiOS)
 endif(IOS)
+
+option(BUILD_FUZZERS "Use BUILD_FUZZERS to build fuzzing tests" OFF)
+
+if (BUILD_FUZZERS)
+    if (NOT OSS_FUZZ)
+        add_compile_flags("C;CXX" -fsanitize=fuzzer-no-link)
+    endif ()
+
+    if (OSS_FUZZ AND NOT DEFINED ENV{LIB_FUZZING_ENGINE})
+        message(SEND_ERROR
+            "OSS-Fuzz builds require the environment variable "
+            "LIB_FUZZING_ENGINE to be set. If you are seeing this "
+            "warning, it points to a deeper problem in the ossfuzz "
+            "build setup.")
+    endif ()
+
+    if (CMAKE_COMPILER_IS_GNUCC)
+        message(FATAL_ERROR
+            "\n"
+            "Fuzzing is unsupported with GCC compiler. Use Clang:\n"
+            " $ CC=clang CXX=clang++ cmake . <...> -DBUILD_FUZZERS=ON && make -j\n"
+            "\n")
+    endif ()
+
+    set(BUILD_TESTING ON)
+
+    # A special target with fuzzer and sanitizer flags.
+    add_library(fuzzer_config INTERFACE)
+
+    target_compile_options(
+        fuzzer_config
+        INTERFACE
+            $<$<NOT:$<BOOL:${OSS_FUZZ}>>:
+            -fsanitize=fuzzer
+            >
+            $<$<BOOL:${OSS_FUZZ}>:
+            ${CXX}
+            ${CXXFLAGS}
+            >
+        )
+    target_link_libraries(
+        fuzzer_config
+        INTERFACE
+            $<$<NOT:$<BOOL:${OSS_FUZZ}>>:
+            -fsanitize=fuzzer
+            >
+            $<$<BOOL:${OSS_FUZZ}>:
+            $ENV{LIB_FUZZING_ENGINE}
+            >
+    )
+endif()


Fix FindPythonPip.cmake module

Fix FindPythonPip.cmake module

It seems that `find_program()` function uses the `<VAR>` parameter as
program name hint. That made `find_program(pip NAMES pip2)` pick
`/usr/bin/pip` instead of `/usr/bin/pip2`.

--- cmake/FindPythonPip.cmake
+++ cmake/FindPythonPip.cmake
@@ -20,11 +20,14 @@
         message(STATUS "Trying to find \"${NAME}\" program...")
     endif()

-    find_program(pip NAMES ${NAME})
+    find_program(pip_program
+        NAMES ${NAME}
+        PATHS /bin
+    )

-    if(pip)
+    if(pip_program)
         # get found pip version:
-        execute_process(COMMAND ${pip} --version OUTPUT_VARIABLE pip_version)
+        execute_process(COMMAND ${pip_program} --version OUTPUT_VARIABLE pip_version)
         string(STRIP "${pip_version}" pip_version)

         # Parse the python version number:
@@ -37,11 +40,11 @@
         string(STRIP "${pip_python_version_minor}" _PYTHON_PIP_PYTHON_VERSION_MINOR)
         set(_PYTHON_PIP_PYTHON_VERSION_STRING "${_PYTHON_PIP_PYTHON_VERSION_MAJOR}.${_PYTHON_PIP_PYTHON_VERSION_MINOR}")

-        set(_PYTHON_PIP_EXECUTABLE "${pip}")
+        set(_PYTHON_PIP_EXECUTABLE "${pip_program}")

         if(PythonPip_DEBUG)
             message(STATUS "Found:")
-            message(STATUS "  Executable: ${pip}")
+            message(STATUS "  Executable: ${pip_program}")
             message(STATUS "  Version (full):   ${pip_version}")
             message(STATUS "  Version (string): ${_PYTHON_PIP_PYTHON_VERSION_STRING}")
             message(STATUS "  Version (major):  ${_PYTHON_PIP_PYTHON_VERSION_MAJOR}")


Set gcc to Position-Independent Code

Set gcc to Position-Independent Code

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -88,11 +88,15 @@
 	endif()
 	set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")

-	if (HALLEY_ENABLE_STATIC_STDLIB)
-		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+	if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
+		if (HALLEY_ENABLE_STATIC_STDLIB)
 			set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
 			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
 		endif()
+
+		# These are needed for DLLs built on GCC
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
 	endif()
 endif()


Removed debugging message

Removed debugging message

--- cmake/LibraryConfig.cmake
+++ cmake/LibraryConfig.cmake
@@ -9,10 +9,9 @@

 # Set a default build type if none was specified
 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-  message(STATUS "Setting build type to 'Release'.")
   set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
 endif()
-# Set the possible values of build type for cmake-gui
+# Possible values of build type for cmake-gui
 if(DEFINED CMAKE_BUILD_TYPE)
   set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
     "Debug" "Release" "MinSizeRel" "RelWithDebInfo")


Forgot changes to cmake/ZincPackaging.cmake file.  OS X PackageMaker does not support restructured text format, changing to .txt instead.  https://tracker.physiomeproject.org/show_bug.cgi?id=3556

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -42,7 +42,7 @@
 	MESSAGE( STATUS "Please implement NSIS installer for me." )
 	SET( CPACK_GENERATOR "Zip" )
 ELSEIF( APPLE )
-	SET( CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/distrib/osx/welcome.rst" )
+	SET( CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/distrib/osx/welcome.txt" )
 	LIST( LENGTH LENGTH_ARCHS CMAKE_OSX_ARCHITECTURES )
 	message(STATUS "la=${LENGTH_ARCHS}-${CMAKE_OSX_ARCHITECTURES}")
 	message(STATUS "la=${CMAKE_SYSTEM_NAME}-${CMAKE_OSX_ARCHITECTURES}")
@@ -61,7 +61,7 @@

 SET( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" )
 SET( CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README" )
-SET( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/distrib/description.rst" )
+SET( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/distrib/description.txt" )
 SET( CPACK_PACKAGE_VENDOR "physiomeproject" )

 message(STATUS "CPack package name: 'zinc-${ZINC_VERSION}-${ZINC_ARCHITECTURE}-${ZINC_SYSTEM}'" )


Update of MLSL git tag (#2474)

Update of MLSL git tag (#2474)

* Update of MLSL git tag

* Use last MLSL commit

* Use last valid MLSL commit

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

 set(MLSL_GIT_URL https://github.com/intel/MLSL)
-set(MLSL_GIT_TAG d1bcc74cccdd86cae8841dab67723c811ddbd592)
+set(MLSL_GIT_TAG 98a683cb861514259480aff2e54c8fce4bec67e5)

 find_program(MAKE_EXE NAMES gmake nmake make)


cmake: qi_create_gtest : prefer using a qibuild port of gtest

We have to do this because gtest is not supposed to work when installed ...

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -73,6 +73,21 @@
     return()
   endif()

+  set(_using_qibuild_gtest TRUE)
+  # Make sure we are using the qibuild flavored gtest
+  # package:
+  find_package(gtest_main QUIET)
+  if(NOT GTEST_MAIN_PACKAGE_FOUND)
+    set(_using_qibuild_gtest FALSE)
+    if(NOT QI_GTEST_QIBUID_WARNED)
+      qi_info("Could not find qibuild flavored gtest. (not GTEST_MAIN package)
+      Please use a qibuild port of gtest or be ready to
+      experience weird link errors ...
+      ")
+      qi_set_global(QI_GTEST_QIBUID_WARNED TRUE)
+    endif()
+  endif()
+
   if (DEFINED BUILD_TESTS AND NOT BUILD_TESTS)
     qi_debug("Test(${name}) disabled by BUILD_TESTS=OFF")
     return()
@@ -84,6 +99,9 @@
   # First, create the target
   qi_create_bin(${name} SRC ${ARG_SRC} ${ARG_UNPARSED_ARGUMENTS} NO_INSTALL)
   qi_use_lib(${name} GTEST ${ARG_DEPENDS})
+  if(${_using_qibuild_gtest})
+    qi_use_lib(${name} GTEST_MAIN)
+  endif()

   # Build a correct xml output name
   set(_xml_output "${_TESTS_RESULTS_FOLDER}/${name}.xml")


COMP: add ENABLE_SHARED option

COMP: add ENABLE_SHARED option

--- Modules/Adapters/CurlAdapters/otb-module.cmake
+++ Modules/Adapters/CurlAdapters/otb-module.cmake
@@ -1,6 +1,7 @@
 set(DOCUMENTATION "Adapters for the Curl library.")

 otb_module(OTBCurlAdapters
+ENABLE_SHARED
   DEPENDS
     OTBCommon
     OTBITK


Fixup FindKernelHeaders.cmake

Fixup FindKernelHeaders.cmake

- Fix some errors in the docstrings (e.g. telling you to set
  KernelHeaders_INCLUDE_DIR instead of KernelHeaders_INCLUDE_PATH)

- Ensure that the case where you manually specify header location is distinct
  from the case where we use the system headers. This avoids awkwardness where
  you set a slightly mistaken path and it just silently falls back to building
  against your system headers.

--- src/CMake/FindKernelHeaders.cmake
+++ src/CMake/FindKernelHeaders.cmake
@@ -1,10 +1,17 @@
-FIND_PATH(KernelHeaders_INCLUDE_DIR NAMES "linux/bpf.h" PATHS ${KernelHeaders_INCLUDE_PATH} /include /usr/include DOC "The kernel header directory (path to <linux/bpf.h>)")
+SET(Doc "The kernel header directory (path to <linux/bpf.h>)")
+IF(KernelHeaders_INCLUDE_PATH)
+  FIND_PATH(KernelHeaders_INCLUDE_DIR NAMES "linux/bpf.h" PATHS ${KernelHeaders_INCLUDE_PATH} DOC ${Doc} NO_DEFAULT_PATH)
+ELSE()
+  FIND_PATH(KernelHeaders_INCLUDE_DIR NAMES "linux/bpf.h" DOC ${Doc})
+ENDIF()
+

 SET(KernelHeaders_FOUND FALSE)

 IF(KernelHeaders_INCLUDE_DIR)
   SET(KernelHeaders_FOUND TRUE)
-  message("Found Linux kernel headers. KernelHeaders_INCLUDE_DIR: ${bpf_INCLUDE_DIR}")
-MESSAGE(WARNING "Couldn't find kernel headers. Have you set KernelHeaders_INCLUDE_PATH to the directory containing linux/bpf.h? Try again with cmake -DKernelHeaders_INCLUDE_DIR=/path/to/kernel/include/uapi/.")
+  message("Found Linux kernel headers. KernelHeaders_INCLUDE_DIR: ${KernelHeaders_INCLUDE_DIR}")
+ELSE()
+  MESSAGE(WARNING "Couldn't find kernel headers. Have you set KernelHeaders_INCLUDE_PATH to the directory containing linux/bpf.h? Try again with cmake -DKernelHeaders_INCLUDE_PATH=/path/to/kernel/usr/include/.")
   SET(KernelHeaders_FOUND FALSE)
 ENDIF()


Set preference for link with pythonlib 2.7 instead others versions installed

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3484 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyPython.cmake
+++ trunk/cmake-modules/FindThirdPartyPython.cmake
@@ -29,6 +29,8 @@
 ENDIF(WIN32)

 IF(UNIX)
+	# Prefert Python 2.7 supported by OV python-plugin
+	SET(Python_ADDITIONAL_VERSIONS 2.7)
 	INCLUDE("FindPythonLibs")
 	IF(PYTHONLIBS_FOUND)
 		MESSAGE(STATUS "  Found Python...")


ffmpeg/4.x: update FFmpeg plugin

ffmpeg/4.x: update FFmpeg plugin

ffmpeg: 4.1.3 -> 4.2.1
libvpx: 1.8.0 -> 1.8.1

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,9 +1,9 @@
-# Binaries branch name: ffmpeg/master_20190616
-# Binaries were created for OpenCV: 7b099e0fe2d929e55d6705b6ad510c2c9081606b
-ocv_update(FFMPEG_BINARIES_COMMIT "998718df34e35ea0fa429724875fc3900faa266f")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "f03b47fb809edd2e06b6db135cbd3e49")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "5c4571459570c288d874704244c428b5")
-ocv_update(FFMPEG_FILE_HASH_CMAKE "f710891525a04586d565d0e700e62a9c")
+# Binaries branch name: ffmpeg/master_20190910
+# Binaries were created for OpenCV: bea2c7545243ba2dabce6badc94dd55894a8e5ca
+ocv_update(FFMPEG_BINARIES_COMMIT "197f87f7e811a9ded35d989b37e50501ff6afaa4")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "ab380c9dde361f30dd3604f88eef6c48")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "90260a4da737fc045c9279567313ee9d")
+ocv_update(FFMPEG_FILE_HASH_CMAKE "ad57c038ba34b868277ccbe6dd0f9602")

 function(download_win_ffmpeg script_var)
   set(${script_var} "" PARENT_SCOPE)


Introduce and check for minimum compiler version

--- Compiler.cmake
+++ Compiler.cmake
@@ -3,6 +3,13 @@
 # Sets compiler optimization, definition and warnings according to
 # chosen compiler. Supported compilers are XL, Intel, Clang, gcc (4.1
 # or later) and Visual Studio (2008 or later).
+#
+# Input Variables
+# * COMMON_MINIMUM_GCC_VERSION check for a minimum gcc version, default 4.4
+#
+# Output Variables
+# * GCC_COMPILER_VERSION The compiler version if gcc is used
+

 # Compiler name
 if(CMAKE_CXX_COMPILER_ID STREQUAL "XL")
@@ -15,6 +22,10 @@
   set(CMAKE_COMPILER_IS_GNUCXX_PURE ON)
 endif()
 # use MSVC for Visual Studio
+
+if(NOT COMMON_MINIMUM_GCC_VERSION)
+  set(COMMON_MINIMUM_GCC_VERSION 4.4)
+endif()

 option(ENABLE_WARN_DEPRECATED "Enable deprecation warnings" OFF)
 if(ENABLE_WARN_DEPRECATED)
@@ -40,6 +51,10 @@
   if(CMAKE_COMPILER_IS_CLANG)
     set(COMMON_GCC_FLAGS
       "${COMMON_GCC_FLAGS} -Qunused-arguments -ferror-limit=5 -ftemplate-depth-1024")
+  else()
+    if(GCC_COMPILER_VERSION VERSION_LESS COMMON_MINIMUM_GCC_VERSION)
+      message(FATAL_ERROR "Using gcc ${GCC_COMPILER_VERSION}, need at least ${COMMON_MINIMUM_GCC_VERSION}")
+    endif()
   endif()

   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_GCC_FLAGS}")


cmake: dts: removing generated <board>.dts_compiled

The file <board>.dts_compiled was made obsolete in 8d8b06978c.

<board>.dts_compiled contains only a reference to zephyr.dts.

Users interested in devicetree should be familiar with zephyr.dts,
therefore it's time to remove the unused <board>.dts_compiled.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -247,11 +247,6 @@
     message(STATUS "Generated device_extern.h: ${DEVICE_EXTERN_H}")
   endif()

-  # A file that used to be generated by 'dtc'. zephyr.dts is the new
-  # equivalent. Will be removed in Zephyr 2.3.
-  file(WRITE ${PROJECT_BINARY_DIR}/${BOARD}.dts_compiled
-       "See zephyr.dts for the final merged devicetree.")
-
 else()
   file(WRITE ${DEVICETREE_UNFIXED_H} "/* WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY! */")
   file(WRITE ${DEVICE_EXTERN_H} "/* WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY! */")


Check more carefully for Lua #25

Check more carefully for Lua #25

--- cmake/lua.cmake
+++ cmake/lua.cmake
@@ -1,12 +1,12 @@
 message(STATUS "Looking for Lua 5.2")
 find_package(Lua52 QUIET)
-if(NOT DEFINED LUA_INCLUDE_DIR)
+if((NOT ${LUA_FOUND}) OR (NOT DEFINED LUA_INCLUDE_DIR) OR (${LUA_INCLUDE_DIR} MATCHES "LUA_INCLUDE_DIR-NOTFOUND"))
   message(STATUS "Looking for Lua 5.1")
   find_package(Lua51 QUIET)
-  if(NOT DEFINED LUA_INCLUDE_DIR)
+  if((NOT ${LUA_FOUND}) OR (NOT DEFINED LUA_INCLUDE_DIR) OR (${LUA_INCLUDE_DIR} MATCHES "LUA_INCLUDE_DIR-NOTFOUND"))
     message(STATUS "Looking for any Lua")
     find_package(Lua QUIET)
-    if(NOT DEFINED LUA_INCLUDE_DIR)
+    if((NOT ${LUA_FOUND}) OR (NOT DEFINED LUA_INCLUDE_DIR) OR (${LUA_INCLUDE_DIR} MATCHES "LUA_INCLUDE_DIR-NOTFOUND"))
       message(FATAL_ERROR "Lua was not found but is required")
     endif()
   endif()


fix vmime api detection errors with vmime versions older than 0.9.2

--- CMakeModules/FindVMime.cmake
+++ CMakeModules/FindVMime.cmake
@@ -52,7 +52,7 @@
             ARGS "${VMIME_VERSION_DEFINE_STRING} | ${PERL_EXECUTABLE} -pe 'if(($_)=/([0-9]+([.][0-9]+)+)/){}'"
             OUTPUT_VARIABLE VMIME_VERSION_RAW_STRING )
         EXEC_PROGRAM ( "echo"
-            ARGS "${VMIME_API_DEFINE_STRING} | ${PERL_EXECUTABLE} -pe 'if(($_)=/([0-9]+([.][0-9]+)+)/){}'"
+            ARGS "${VMIME_API_DEFINE_STRING} | ${PERL_EXECUTABLE} -pe 'if(($_)=/([0-9]+([.|:][0-9]+)+)/){}'"
             OUTPUT_VARIABLE VMIME_API_RAW_STRING )
     ELSE (  )
         IF ( DEFINED AWK_EXECUTABLE )
@@ -107,14 +107,23 @@
         ENDIF (  )
     ENDIF (  )

-    STRING ( REPLACE "." ";" VMIME_VERSION_LIST ${VMIME_VERSION_STRING} )
-    STRING ( REPLACE "." ";" VMIME_API_LIST ${VMIME_API_STRING} )
+    STRING ( REPLACE "." ";" VMIME_VERSION_LIST "${VMIME_VERSION_STRING}" )
+    LIST ( LENGTH VMIME_VERSION_LIST VMIME_VERSION_LIST_LENGTH )

-    LIST ( LENGTH VMIME_VERSION_LIST VMIME_VERSION_LIST_LENGTH )
+    IF ( NOT VMIME_VERSION_LIST_LENGTH EQUAL 3 )
+        MESSAGE ( FATAL_ERROR "Could not determine VMime version" )
+    ENDIF (  )
+
+    STRING ( REPLACE "." ";" VMIME_API_LIST "${VMIME_API_STRING}" )
     LIST ( LENGTH VMIME_API_LIST VMIME_API_LIST_LENGTH )

-    IF ( NOT VMIME_VERSION_LIST_LENGTH EQUAL 3 AND NOT VMIME_API_LIST_LENGTH EQUAL 3 )
-        MESSAGE ( FATAL_ERROR "Could not determine VMime version" )
+    IF ( NOT VMIME_API_LIST_LENGTH EQUAL 3 )
+        STRING ( REPLACE ":" ";" VMIME_API_LIST "${VMIME_API_STRING}" )
+        LIST ( LENGTH VMIME_API_LIST VMIME_API_LIST_LENGTH )
+
+        IF ( NOT VMIME_API_LIST_LENGTH EQUAL 3 )
+            MESSAGE ( FATAL_ERROR "Could not determine VMime API" )
+        ENDIF (  )
     ENDIF (  )

     LIST ( GET VMIME_VERSION_LIST 0 VMIME_VERSION_MAJOR )


ENH: Automatic move of files to module Core/ComplexImage

--- Modules/Core/ComplexImage/otb-module.cmake
+++ Modules/Core/ComplexImage/otb-module.cmake
@@ -9,6 +9,7 @@
     OTBITK
     OTBImageBase
     OTBImageIO
+    OTBTestKernel

   DESCRIPTION
     "${DOCUMENTATION}"


COMP: Add ITK patches for DCMTK

COMP: Add ITK patches for DCMTK

These are required to use the name-mangled ITK internal third party
libraries and add Emscripten support.

--- Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake
+++ Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake
@@ -1,14 +1,22 @@
 # Set GIT tag here for use in multiple CMakeLists.txt
 #
 set(DCMTK_GIT_REPOSITORY "https://github.com/InsightSoftwareConsortium/DCMTK.git")
-# 2018.01.16 patched
+# 2020.02.14 patched
 # Patch list:
-# COMP: Uses ITK PNG instead of system PNG
-# BUG: when using ITK_ZLIB, wasn't finding zlib header
-# COMP: Set 3rd party package CMake variables only if needed
-# COMP: Mods to allow using ITK libs
-# Support CMAKE_CROSSCOMPILING_EMULATOR
-# Support the generation of arith.h with Emscription
-# Do not use non-type template argument -1 in variadic template

-set(DCMTK_GIT_TAG "14393c0baa743469b5826bea724c048e221dd08b") # 20200215 master
+ #Francois Budin (1):
+       #COMP: Uses ITK PNG instead of system PNG
+
+ #Hans Johnson (1):
+       #COMP: Mods to allow using ITK libs
+
+ #Jean-Christophe Fillion-Robin (1):
+       #COMP: Set 3rd party package CMake variables only if needed
+
+ #Matt McCormick (2):
+       #Support CMAKE_CROSSCOMPILING_EMULATOR
+       #Support the generation of arith.h with Emscription
+
+
+
+set(DCMTK_GIT_TAG "972d43e13acde08c186f6e02816b18d2fbaba4cc") # 20200214_DCMTK_PATCHES_FOR_ITK


[cmake] Follow LLVM's lead in creating exported tool targets for clang tools.

This is needed by downstream projects such as swift to get proper cmake
dependency information for LLVM/Clang targets.

A few months ago I added support for exporting this information for Clang
libraries. In order to be incremental, I did not add support for exporting clang
tools as well at that time. Now such support is needed, so I am committing this
incremental code.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@284658 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -139,6 +139,7 @@
         -DCMAKE_INSTALL_COMPONENT=${name}
         -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
     endif()
+    set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
   endif()
 endmacro()


Tweak commentary.

Tweak commentary.

svn path=/trunk/; revision=6948

--- cmake/modules/instdirs.cmake
+++ cmake/modules/instdirs.cmake
@@ -1,6 +1,4 @@
 # cmake/modules/installdirs.cmake
-#
-# Start driver initializations
 #
 # Copyright (C) 2006  Alan W. Irwin
 #


Don't use llvm library from homebrew since this caused mixing of
new and older libc++ libraries.

Don't tune for intel when using clang or appleclang on darwin.

--- default_build_settings.cmake
+++ default_build_settings.cmake
@@ -46,27 +46,16 @@

 function(setup_vespa_default_build_settings_darwin)
   message("-- Setting up default build settings for darwin")
-  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
-    set(DEFAULT_LLVM_INCLUDE_DIRECTORY "/usr/local/opt/llvm/include")
-    set(DEFAULT_LLVM_LINK_DIRECTORY "/usr/local/opt/llvm/lib")
-    set(DEFAULT_VESPA_LLVM_VERSION "12" PARENT_SCOPE)
-  else()
-    set(DEFAULT_VESPA_LLVM_VERSION "12" PARENT_SCOPE)
-  endif()
+  set(DEFAULT_VESPA_LLVM_VERSION "12" PARENT_SCOPE)
   set(DEFAULT_CMAKE_PREFIX_PATH "${VESPA_DEPS}" "/usr/local/opt/bison" "/usr/local/opt/flex" "/usr/local/opt/openssl@1.1" "/usr/local/opt/openblas" "/usr/local/opt/icu4c" PARENT_SCOPE)
   set(DEFAULT_EXTRA_LINK_DIRECTORY "${VESPA_DEPS}/lib" "/usr/local/opt/bison/lib" "/usr/local/opt/flex/lib" "/usr/local/opt/icu4c/lib" "/usr/local/opt/openssl@1.1/lib" "/usr/local/opt/openblas/lib")
-  if(DEFINED DEFAULT_LLVM_LINK_DIRECTORY)
-    list(APPEND DEFAULT_EXTRA_LINK_DIRECTORY "${DEFAULT_LLVM_LINK_DIRECTORY}")
-  endif()
   list(APPEND DEFAULT_EXTRA_LINK_DIRECTORY "/usr/local/lib")
   set(DEFAULT_EXTRA_LINK_DIRECTORY "${DEFAULT_EXTRA_LINK_DIRECTORY}" PARENT_SCOPE)
   set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${VESPA_DEPS}/include" "/usr/local/opt/flex/include" "/usr/local/opt/icu4c/include" "/usr/local/opt/openssl@1.1/include" "/usr/local/opt/openblas/include")
-  if(DEFINED DEFAULT_LLVM_INCLUDE_DIRECTORY)
-    list(APPEND DEFAULT_EXTRA_INCLUDE_DIRECTORY "${DEFAULT_LLVM_INCLUDE_DIRECTORY}")
-  endif()
   list(APPEND DEFAULT_EXTRA_INCLUDE_DIRECTORY "/usr/local/include")
   set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${DEFAULT_EXTRA_INCLUDE_DIRECTORY}" PARENT_SCOPE)
 endfunction()
+
 function(setup_vespa_default_build_settings_fedora_32)
   message("-- Setting up default build settings for fedora 32")
   set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${VESPA_DEPS}/include" "/usr/include/openblas" PARENT_SCOPE)
@@ -246,6 +235,7 @@
     if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
       if(VESPA_OS_DISTRO STREQUAL "fedora" AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
         set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-march=westmere -mtune=haswell")
+      elseif(APPLE AND (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")))
       else()
         set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-mtune=intel")
       endif()


Correct vespa-deps lib dir for debian 10.

--- default_build_settings.cmake
+++ default_build_settings.cmake
@@ -104,6 +104,8 @@

 function(setup_vespa_default_build_settings_debian_10)
   message("-- Setting up default build settings for debian 10")
+  set(DEFAULT_EXTRA_LINK_DIRECTORY "${VESPA_DEPS}/lib" PARENT_SCOPE)
+  set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${VESPA_DEPS}/include" PARENT_SCOPE)
   set(DEFAULT_VESPA_LLVM_VERSION "7" PARENT_SCOPE)
 endfunction()


Fix ARM_NEON_2_x86_SSE version

Fix ARM_NEON_2_x86_SSE version

--- cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake
+++ cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake
@@ -13,7 +13,7 @@
     PACKAGE_NAME
     ARM_NEON_2_x86_SSE
     VERSION
-    1.2-p0
+    1.0.0
     URL
     "https://github.com/hunter-packages/ARM_NEON_2_x86_SSE/archive/v1.0.0.tar.gz"
     SHA1


[nrfconnect] Fixed script for generating factory data (#23170)

Fixed two problems related to factory data generation
- interpretation of PIDs written with lower and upper case
- wrong path to the default certs.

--- config/nrfconnect/chip-module/generate_factory_data.cmake
+++ config/nrfconnect/chip-module/generate_factory_data.cmake
@@ -63,10 +63,11 @@
     # convert decimal PID to its hexadecimal representation to find out certification files in repository
     math(EXPR LOCAL_PID "${CONFIG_CHIP_DEVICE_PRODUCT_ID}" OUTPUT_FORMAT HEXADECIMAL)
     string(SUBSTRING ${LOCAL_PID} 2 -1 raw_pid)
+    string(TOUPPER ${raw_pid} raw_pid_upper)
     # all certs are located in ${CHIP_ROOT}/credentials/development/attestation
     # it can be used during development without need to generate new certifications
-    string(APPEND script_args "--dac_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid}-Cert.der\"\n")
-    string(APPEND script_args "--dac_key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid}-Key.der\"\n")
+    string(APPEND script_args "--dac_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Cert.der\"\n")
+    string(APPEND script_args "--dac_key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Key.der\"\n")
     string(APPEND script_args "--pai_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-noPID-Cert.der\"\n")
 else()
     find_program(chip_cert_exe NAMES chip-cert REQUIRED)
@@ -79,6 +80,7 @@
 string(APPEND script_args "--spake2_salt \"${CONFIG_CHIP_DEVICE_SPAKE2_SALT}\"\n")
 string(APPEND script_args "--discriminator ${CONFIG_CHIP_DEVICE_DISCRIMINATOR}\n")
 string(APPEND script_args "--passcode ${CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE}\n")
+string(APPEND script_args "--include_passcode\n")
 string(APPEND script_args "--overwrite\n")

 # check if spake2 verifier should be generated using script


Suppress cpplint warnings about RTTI.

Suppress cpplint warnings about RTTI.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -182,6 +182,8 @@
 	# potentially useful, but generates some crazy false positives
 	# (it claims <unordered_map> is a C header!?):
 	-build/include_order
+	# things disallowed by Google's coding standards, but not ours:
+	-runtime/rtti
 )
 string(REPLACE ";" "," CPPLINT_DEFAULT_FILTERS
 	"--filter=${CPPLINT_DEFAULT_FILTER_LIST}")


update externals to version ignoring build warnings

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -10,7 +10,7 @@
 if (NOT EXISTS "${CMAKE_BINARY_DIR}/script-externals")
   message(STATUS "Downloading external scripts")
   execute_process(COMMAND
-    ${GIT_EXECUTABLE} clone -b v2.5 https://github.com/UniStuttgart-VISUS/megamol-cmake-externals.git script-externals --depth 1
+    ${GIT_EXECUTABLE} clone -b v2.6 https://github.com/UniStuttgart-VISUS/megamol-cmake-externals.git script-externals --depth 1
     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif ()


post-copy-dylibs: blind fix

post-copy-dylibs: blind fix

--- cmake/qibuild/templates/post-copy-dylibs.cmake
+++ cmake/qibuild/templates/post-copy-dylibs.cmake
@@ -34,6 +34,8 @@
   endif()
 endforeach()

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

 file(COPY ${_in_dylibs} DESTINATION ${QI_SDK_DIR}/${QI_SDK_LIB})


Update SAGE finder to meet Buildyard installation

--- FindSAGE.cmake
+++ FindSAGE.cmake
@@ -29,7 +29,7 @@

 find_path(_SAGE_INCLUDE_DIR sage.h
   HINTS ${CMAKE_SOURCE_DIR}/../../.. $ENV{SAGE_ROOT} ${SAGE_ROOT}
-  PATH_SUFFIXES include
+  PATH_SUFFIXES include sage/include
   PATHS /usr/local/sage /usr /usr/local /opt /opt/local)

 if(_SAGE_INCLUDE_DIR AND EXISTS "${_SAGE_INCLUDE_DIR}/sage.h")
@@ -64,12 +64,12 @@

 find_library(SAGE_SAIL_LIBRARY sail
   HINTS ${CMAKE_SOURCE_DIR}/../../.. $ENV{SAGE_ROOT} ${SAGE_ROOT}
-  PATH_SUFFIXES lib lib64
+  PATH_SUFFIXES lib lib64 sage/lib sage/lib64
   PATHS /usr/local/sage /usr /usr/local /opt /opt/local)

 find_library(SAGE_QUANTA_LIBRARY quanta
   HINTS ${CMAKE_SOURCE_DIR}/../../.. $ENV{SAGE_ROOT} ${SAGE_ROOT}
-  PATH_SUFFIXES lib lib64
+  PATH_SUFFIXES lib lib64 sage/lib sage/lib64
   PATHS /usr/local/sage /usr /usr/local /opt /opt/local)

 # Inform the users with an error message based on what version they


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -18,6 +18,7 @@
 Name[et]=DirectShow9
 Name[hu]=DirectShow9
 Name[it]=DirectShow9
+Name[nb]=DirectShow9
 Name[nds]=DirectShow9
 Name[nl]=DirectShow9
 Name[pa]=ਡਾਇਰੈਕਟ-ਸ਼ੋ9
@@ -35,6 +36,7 @@
 Name[zh_TW]=DirectShow9

 Comment=Phonon DirectShow9 backend
+Comment[bs]=DirectShow9 kao pozadina Phonona
 Comment[ca]=Dorsal DirectShow9 del Phonon
 Comment[ca@valencia]=Dorsal DirectShow9 del Phonon
 Comment[cs]=Podpůrná vrstva DirectShow9 pro Phonon
@@ -44,6 +46,7 @@
 Comment[et]=Phononi DirectShow9 taustaprogramm
 Comment[hu]=Phonon DirectShow9-modul
 Comment[it]=Motore DirectShow9 di Phonon
+Comment[nb]=Phonon-motor for DirectShow9
 Comment[nds]=DirectShow9-Hülpprogramm för Phonon
 Comment[nl]=DirectShow9-backend van Phonon
 Comment[pa]=ਫੋਨੋਨ DirectShow9 ਬੈਕਐਂਡ