Skip to content

Commit 15e0acf

Browse files
committed
Only forward CXX to SCons if defined in environment
Apparently SCons breaks otherwise.
1 parent 5c8e275 commit 15e0acf

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

tests/SConstruct

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ else:
88
CCFLAGS = ''
99
LIBS = ['pthread']
1010

11-
env = Environment(
12-
CXX=os.environ.get('CXX'),
13-
CPPPATH=os.environ.get('INCLUDE'),
14-
CCFLAGS=CCFLAGS,
15-
LIBPATH=os.environ.get('LIBPATH'),
16-
LIBS=LIBS,
17-
)
11+
kwargs = {
12+
'CPPPATH': os.environ.get('INCLUDE'),
13+
'CCFLAGS': CCFLAGS,
14+
'LIBPATH': os.environ.get('LIBPATH'),
15+
'LIBS': LIBS,
16+
}
17+
if 'CXX' in os.environ:
18+
kwargs['CXX'] = os.environ['CXX']
19+
20+
env = Environment(**kwargs)
1821
genv = env.Clone(LIBS=['gtest'] + LIBS)
1922

2023
Export('env genv')

0 commit comments

Comments
 (0)