aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xenvironment.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/environment.py b/environment.py
index 02fe841..e4bb2ff 100755
--- a/environment.py
+++ b/environment.py
@@ -28,7 +28,7 @@ def detect_c_compiler(execmd):
if (out.startswith('cc ') or out.startswith('gcc')) and \
'Free Software Foundation' in out:
return GnuCCompiler(exelist)
- raise EnvironmentException('Unknown compiler ' + execmd)
+ raise EnvironmentException('Unknown compiler "' + execmd + '"')
class CCompiler():
def __init__(self, exelist):
@@ -42,6 +42,12 @@ class CCompiler():
def get_output_flags(self):
return ['-o']
+
+ def can_compile(self, filename):
+ suffix = filename.split['.'][-1]
+ if suffix == 'c' or suffix == 'h':
+ return True
+ return False
class GnuCCompiler(CCompiler):
std_warn_flags = ['-Wall', '-Winvalid-pch']