[SCons] Remove deprecated 'legacy_headers' option
This commit is contained in:
parent
6266986d7b
commit
d0b3ad3d4b
1 changed files with 0 additions and 37 deletions
37
SConstruct
37
SConstruct
|
|
@ -535,11 +535,6 @@ config_options = [
|
|||
local filesystem.""",
|
||||
'',
|
||||
PathVariable.PathAccept),
|
||||
BoolVariable(
|
||||
'legacy_headers',
|
||||
"""Create symbolic links for headers that were installed to the
|
||||
'kernel' subdirectory in previous versions of Cantera.""",
|
||||
False),
|
||||
BoolVariable(
|
||||
'VERBOSE',
|
||||
"""Create verbose output about what scons is doing.""",
|
||||
|
|
@ -1247,38 +1242,6 @@ if addInstallActions:
|
|||
headerBase = 'include/cantera'
|
||||
install(env.RecursiveInstall, '$inst_incdir', 'include/cantera')
|
||||
|
||||
# Make symlinks to replicate old header directory structure
|
||||
if env['legacy_headers']:
|
||||
print ('WARNING: Installation of legacy headers is deprecated. '
|
||||
'This installation option will be removed in Cantera 2.2.')
|
||||
install(env.Command, pjoin('$inst_incdir', 'kernel'), [], Mkdir("$TARGET"))
|
||||
install('$inst_incdir', 'platform/legacy/Cantera_legacy.h')
|
||||
|
||||
if env['OS'] == 'Windows':
|
||||
cmd = Copy("$TARGET", "$SOURCE")
|
||||
else:
|
||||
def RelativeSymlink(target, source, env):
|
||||
if os.path.exists(target[0].path):
|
||||
os.remove(target[0].path)
|
||||
srcpath = psplit(source[0].abspath)
|
||||
tgtpath = psplit(target[0].abspath)
|
||||
nCommon = max(i for i,(dir1,dir2) in enumerate(zip(srcpath, tgtpath))
|
||||
if dir1 == dir2)
|
||||
relsrc = os.sep.join(['..'] + srcpath[nCommon-1:])
|
||||
os.symlink(relsrc, target[0].abspath)
|
||||
|
||||
cmd = RelativeSymlink
|
||||
|
||||
for name in os.listdir('include/cantera'):
|
||||
if not os.path.isdir(pjoin('include/cantera', name)):
|
||||
continue
|
||||
for filename in os.listdir(pjoin('include/cantera', name)):
|
||||
if not filename.endswith('.h'):
|
||||
continue
|
||||
headerdir = pjoin(instRoot, 'include', 'cantera')
|
||||
install(env.Command, pjoin(headerdir, 'kernel', filename),
|
||||
pjoin(headerdir, name, filename), cmd)
|
||||
|
||||
# Data files
|
||||
install('$inst_datadir', mglob(env, pjoin('build','data'), 'cti', 'xml'))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue