[Scons] prevent installation to source directory

This commit is contained in:
Ingmar Schoegl 2019-11-04 10:05:54 -06:00 committed by Ray Speth
parent ce47733c42
commit 43d02e95e3

View file

@ -729,6 +729,11 @@ print()
# *** Configure system-specific properties ***
# ********************************************
# Prevent setting prefix for Cantera installation to source directory
if os.path.abspath(env['prefix']) == Dir('.').abspath:
print('ERROR: cannot install Cantera into source directory.')
exit(1)
# Copy in external environment variables
if env['env_vars'] == 'all':
env['ENV'].update(os.environ)