Skip to content
Snippets Groups Projects
Unverified Commit 17d0c63d authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin
Browse files

COMP: Update imstkSolveDependencies module based on commontk/Artichoke@edfc828

This commit backports changes associated with commontk/Artichoke PR-37
See https://github.com/commontk/Artichoke/pull/37

It ensures ``User Package Registry`` look up using ``find_*`` commands
is disabled.

List of changes:

$ git shortlog 4176c39f9..edfc828 --no-merges
Jean-Christophe Fillion-Robin (3):
      ExternalProjectDependency: Fix variable type of automatically propagated options
      circleci: Use dockbuild/centos7-devtoolset7-gcc7 instead of dockbuild/centos6
      ExternalProjectDependency: Ensure ``User Package Registry`` look up using ``find_*`` commands is disabled
parent 6bf0192c
No related branches found
No related tags found
No related merge requests found
......@@ -447,16 +447,37 @@ function(_sb_get_external_project_arguments proj varname)
set(_ep_arguments "")
# Automatically propagate CMake options
foreach(_cmake_option IN ITEMS
CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_JOB_POOL_COMPILE
CMAKE_JOB_POOL_LINK
CMAKE_JOB_POOLS
# Option CMAKE_FIND_USE_PACKAGE_REGISTRY was introduced in CMake 3.16
if(CMAKE_VERSION VERSION_GREATER "3.15")
if(NOT DEFINED CMAKE_FIND_USE_PACKAGE_REGISTRY)
set(CMAKE_FIND_USE_PACKAGE_REGISTRY OFF)
endif()
else()
if(NOT DEFINED CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY)
set(CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY ON)
endif()
endif()
# Set list of CMake options to propagate
set(_options
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL
CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY:BOOL
CMAKE_JOB_POOL_COMPILE:STRING
CMAKE_JOB_POOL_LINK:STRING
CMAKE_JOB_POOLS:STRING
)
if(CMAKE_VERSION VERSION_GREATER "3.15")
list(APPEND _options
CMAKE_FIND_USE_PACKAGE_REGISTRY:BOOL
)
endif()
# Automatically propagate CMake options
foreach(_cmake_option_and_type IN LISTS _options)
_sb_extract_varname_and_vartype(${_cmake_option_and_type} _cmake_option _cmake_option_type)
if(DEFINED ${_cmake_option})
list(APPEND _ep_arguments CMAKE_CACHE_ARGS
-D${_cmake_option}:BOOL=${${_cmake_option}}
-D${_cmake_option}:${_cmake_option_type}=${${_cmake_option}}
)
endif()
endforeach()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment