Made C++ work in Ninja.

pull/15/head
Jussi Pakkanen 12 years ago
parent 7ea37a733e
commit b3074e49eb
  1. 2
      environment.py
  2. 6
      interpreter.py

@ -86,7 +86,7 @@ class CCompiler():
class CXXCompiler(CCompiler):
def __init__(self, exelist):
CCompiler.__init__(self, exelist)
self.language = 'c++'
self.language = 'cxx'
def can_compile(self, filename):
suffix = filename.split('.')[-1]

@ -438,14 +438,12 @@ class Interpreter():
for lang in args:
if lang.lower() == 'c':
comp = self.environment.detect_c_compiler()
comp.sanity_check(self.environment.get_scratch_dir())
self.build.compilers.append(comp)
elif lang.lower() == 'c++':
comp = self.environment.detect_cxx_compiler()
comp.sanity_check(self.environment.get_scratch_dir())
self.build.compilers.append(comp)
else:
raise InvalidCode('Tried to use unknown language "%s".' % lang)
comp.sanity_check(self.environment.get_scratch_dir())
self.build.compilers.append(comp)
def func_find_dep(self, node, args):
self.validate_arguments(args, 1, [str])

Loading…
Cancel
Save