diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-09-26 10:25:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-26 10:25:12 +0200 |
commit | 90236bc9f54a0fccbf0e133d09ce258b379e5ae3 (patch) | |
tree | a334303268026587730514fa5ba6a5c1bb314249 | |
parent | 31e5318c240e12d59b01972cbaf92680ef4be6bd (diff) | |
download | spack-90236bc9f54a0fccbf0e133d09ce258b379e5ae3.tar.gz spack-90236bc9f54a0fccbf0e133d09ce258b379e5ae3.tar.bz2 spack-90236bc9f54a0fccbf0e133d09ce258b379e5ae3.tar.xz spack-90236bc9f54a0fccbf0e133d09ce258b379e5ae3.zip |
Update target comparison semantic for a few packages (#12947)
Use spec.target.family instead of spec.architecture.target
6 files changed, 14 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/blast-plus/package.py b/var/spack/repos/builtin/packages/blast-plus/package.py index c02d010776..7722e1b2a4 100644 --- a/var/spack/repos/builtin/packages/blast-plus/package.py +++ b/var/spack/repos/builtin/packages/blast-plus/package.py @@ -105,7 +105,7 @@ class BlastPlus(AutotoolsPackage): '--without-boost', ] - if 'aarch64' not in spec.architecture.target.lower(): + if spec.target.family != 'aarch64': config_args.append('--with-64') if '+static' in spec: config_args.append('--with-static') diff --git a/var/spack/repos/builtin/packages/catalyst/package.py b/var/spack/repos/builtin/packages/catalyst/package.py index 6c62aa0039..1289ace524 100644 --- a/var/spack/repos/builtin/packages/catalyst/package.py +++ b/var/spack/repos/builtin/packages/catalyst/package.py @@ -225,8 +225,7 @@ class Catalyst(CMakePackage): else: cmake_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=OFF') - arch = spec.architecture - if(arch.platform == 'linux' and arch.target == 'aarch64'): + if spec.platform == 'linux' and spec.target == 'aarch64': cmake_args.append('-DCMAKE_CXX_FLAGS=-DPNG_ARM_NEON_OPT=0') cmake_args.append('-DCMAKE_C_FLAGS=-DPNG_ARM_NEON_OPT=0') diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index f149537a51..e10b447dca 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -90,7 +90,6 @@ class Hpctoolkit(AutotoolsPackage): def configure_args(self): spec = self.spec - target = spec.architecture.target args = [ '--with-binutils=%s' % spec['binutils'].prefix, @@ -117,7 +116,7 @@ class Hpctoolkit(AutotoolsPackage): if spec.satisfies('@gpu'): args.append('--with-mbedtls=%s' % spec['mbedtls'].prefix) - if target == 'x86_64': + if spec.target.family == 'x86_64': args.append('--with-xed=%s' % spec['intel-xed'].prefix) if '+papi' in spec: diff --git a/var/spack/repos/builtin/packages/openfoam/package.py b/var/spack/repos/builtin/packages/openfoam/package.py index 5ee8bcf0bb..2a1bdb6e0e 100644 --- a/var/spack/repos/builtin/packages/openfoam/package.py +++ b/var/spack/repos/builtin/packages/openfoam/package.py @@ -788,8 +788,8 @@ class OpenfoamArch(object): # spec.architecture.platform is like `uname -s`, but lower-case platform = spec.architecture.platform - # spec.architecture.target is like `uname -m` - target = spec.architecture.target + # spec.target.family is like `uname -m` + target = spec.target.family if platform == 'linux': if target == 'x86_64': diff --git a/var/spack/repos/builtin/packages/ross/package.py b/var/spack/repos/builtin/packages/ross/package.py index 13a2624ec2..62d65cc095 100644 --- a/var/spack/repos/builtin/packages/ross/package.py +++ b/var/spack/repos/builtin/packages/ross/package.py @@ -26,7 +26,7 @@ class Ross(CMakePackage): args = [] args.append("-DBUILD_SHARED_LIBS=ON") - args.append("-DARCH=%s" % self.spec.architecture.target) + args.append("-DARCH=%s" % self.spec.target) args.append("-DCMAKE_C_COMPILER=%s" % self.spec['mpi'].mpicc) args.append("-DCMAKE_CXX_COMPILER=%s" % self.spec['mpi'].mpicxx) diff --git a/var/spack/repos/builtin/packages/templight/package.py b/var/spack/repos/builtin/packages/templight/package.py index 1a492bc82c..34f75964e1 100644 --- a/var/spack/repos/builtin/packages/templight/package.py +++ b/var/spack/repos/builtin/packages/templight/package.py @@ -135,16 +135,18 @@ class Templight(CMakePackage): targets = ['NVPTX', 'AMDGPU'] - if 'x86' in spec.architecture.target.lower(): + if spec.target.family == 'x86' or spec.target.family == 'x86_64': targets.append('X86') - elif 'arm' in spec.architecture.target.lower(): + elif spec.target.family == 'arm': targets.append('ARM') - elif 'aarch64' in spec.architecture.target.lower(): + elif spec.target.family == 'aarch64': targets.append('AArch64') - elif 'sparc' in spec.architecture.target.lower(): + elif spec.target.family == 'sparc' or spec.target.family == 'sparc64': targets.append('Sparc') - elif ('ppc' in spec.architecture.target.lower() or - 'power' in spec.architecture.target.lower()): + elif (spec.target.family == 'ppc64' or + spec.target.family == 'ppc64le' or + spec.target.family == 'ppc' or + spec.target.family == 'ppcle'): targets.append('PowerPC') cmake_args.append( |