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
This commit is contained in:
parent
c8e6a9e535
commit
529c659bd0
@ -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 @@ def cmdlist(str):
|
||||
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 = ':'
|
||||
|
Loading…
Reference in New Issue
Block a user