summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcedricchevalier19 <cedric.chevalier@cea.fr>2020-06-26 21:06:43 +0200
committerGitHub <noreply@github.com>2020-06-26 14:06:43 -0500
commit529c659bd07d2842886c90e66b122b833f3a9bf3 (patch)
tree39179548d2811bc10e2e5608199f552b74355af8
parentc8e6a9e5358f0b57dc88478e9b61aa1bb959b6ec (diff)
downloadspack-529c659bd07d2842886c90e66b122b833f3a9bf3.tar.gz
spack-529c659bd07d2842886c90e66b122b833f3a9bf3.tar.bz2
spack-529c659bd07d2842886c90e66b122b833f3a9bf3.tar.xz
spack-529c659bd07d2842886c90e66b122b833f3a9bf3.zip
First fix for SPACK_DEPENDENCIES problem when doing setup (#10715)
* First fix for SPACK_DEPENDENCIES problem when doing setup * Get rid of transitive include path in setup. * Export SPACK_INCLUDE_DIRS into spconfig.py
-rw-r--r--lib/spack/spack/cmd/setup.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py
index 246e3b4275..1d98e3ec4e 100644
--- a/lib/spack/spack/cmd/setup.py
+++ b/lib/spack/spack/cmd/setup.py
@@ -39,13 +39,6 @@ def setup_parser(subparser):
arguments.add_common_arguments(cd_group, ['clean', 'dirty'])
-def spack_transitive_include_path():
- return ';'.join(
- os.path.join(dep, 'include')
- for dep in os.environ['SPACK_DEPENDENCIES'].split(os.pathsep)
- )
-
-
def write_spconfig(package, dirty):
# Set-up the environment
spack.build_environment.setup_package(package, dirty)
@@ -57,8 +50,8 @@ def write_spconfig(package, dirty):
paths = os.environ['PATH'].split(':')
paths = [item for item in paths if 'spack/env' not in item]
env['PATH'] = ':'.join(paths)
- env['SPACK_TRANSITIVE_INCLUDE_PATH'] = spack_transitive_include_path()
env['CMAKE_PREFIX_PATH'] = os.environ['CMAKE_PREFIX_PATH']
+ env['SPACK_INCLUDE_DIRS'] = os.environ['SPACK_INCLUDE_DIRS']
env['CC'] = os.environ['SPACK_CC']
env['CXX'] = os.environ['SPACK_CXX']
env['FC'] = os.environ['SPACK_FC']
@@ -84,7 +77,7 @@ env = dict(os.environ)
if name.find('PATH') < 0:
fout.write('env[%s] = %s\n' % (repr(name), repr(val)))
else:
- if name == 'SPACK_TRANSITIVE_INCLUDE_PATH':
+ if name == 'SPACK_INCLUDE_DIRS':
sep = ';'
else:
sep = ':'