set working dir for sanity check compilation

This commit is contained in:
Nicolas Schneider 2016-05-26 12:00:45 +02:00
parent 7aa24c7d0a
commit 60bca15e78
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ class CCompiler(Compiler):
ofile.close()
# Compile sanity check
cmdlist = self.exelist + extra_flags + [source_name] + self.get_output_args(binary_name)
pc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
pc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=work_dir)
(stdo, stde) = pc.communicate()
stdo = stdo.decode()
stde = stde.decode()