.
This commit is contained in:
parent
e59363eaa1
commit
14de4b67ef
@ -82,10 +82,7 @@ def compiler_find(args):
|
|||||||
"""
|
"""
|
||||||
paths = args.add_paths or None
|
paths = args.add_paths or None
|
||||||
new_compilers = spack.compilers.find_compilers(
|
new_compilers = spack.compilers.find_compilers(
|
||||||
path_hints=paths,
|
path_hints=paths, scope=args.scope, mixed_toolchain=args.mixed_toolchain
|
||||||
scope=args.scope,
|
|
||||||
mixed_toolchain=args.mixed_toolchain,
|
|
||||||
max_workers=args.jobs,
|
|
||||||
)
|
)
|
||||||
if new_compilers:
|
if new_compilers:
|
||||||
n = len(new_compilers)
|
n = len(new_compilers)
|
||||||
|
@ -243,7 +243,6 @@ def find_compilers(
|
|||||||
*,
|
*,
|
||||||
scope: Optional[str] = None,
|
scope: Optional[str] = None,
|
||||||
mixed_toolchain: bool = False,
|
mixed_toolchain: bool = False,
|
||||||
max_workers: Optional[int] = None,
|
|
||||||
) -> List["spack.compiler.Compiler"]:
|
) -> List["spack.compiler.Compiler"]:
|
||||||
"""Searches for compiler in the paths given as argument. If any new compiler is found, the
|
"""Searches for compiler in the paths given as argument. If any new compiler is found, the
|
||||||
configuration is updated, and the list of new compiler objects is returned.
|
configuration is updated, and the list of new compiler objects is returned.
|
||||||
@ -254,7 +253,6 @@ def find_compilers(
|
|||||||
scope: configuration scope to modify
|
scope: configuration scope to modify
|
||||||
mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for
|
mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for
|
||||||
a certain language
|
a certain language
|
||||||
max_workers: number of processes used to search for compilers
|
|
||||||
"""
|
"""
|
||||||
import spack.detection
|
import spack.detection
|
||||||
|
|
||||||
@ -267,9 +265,7 @@ def find_compilers(
|
|||||||
default_paths.extend(windows_os.WindowsOs().compiler_search_paths)
|
default_paths.extend(windows_os.WindowsOs().compiler_search_paths)
|
||||||
compiler_pkgs = spack.repo.PATH.packages_with_tags(COMPILER_TAG, full=True)
|
compiler_pkgs = spack.repo.PATH.packages_with_tags(COMPILER_TAG, full=True)
|
||||||
|
|
||||||
detected_packages = spack.detection.by_path(
|
detected_packages = spack.detection.by_path(compiler_pkgs, path_hints=default_paths)
|
||||||
compiler_pkgs, path_hints=default_paths, max_workers=max_workers
|
|
||||||
)
|
|
||||||
|
|
||||||
valid_compilers = {}
|
valid_compilers = {}
|
||||||
for name, detected in detected_packages.items():
|
for name, detected in detected_packages.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user