Skip to content

Commit 270cf38

Browse files
authored
Merge pull request #102 from BetterCallBene/feature/fix-where-is-vc-error
Fix where cl error in cmake environment
2 parents 6dea344 + 2484966 commit 270cf38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pygccxml/parser/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ def create_compiler_path(xml_generator, compiler_path):
429429
['where', 'cl'],
430430
stdout=subprocess.PIPE,
431431
stderr=subprocess.PIPE)
432-
compiler_path = p.stdout.read().decode("utf-8").rstrip()
432+
# Fix where cl error. In cmake environment there are more then one Visual Studio path are found.
433+
compiler_path = p.stdout.read().decode("utf-8").rstrip().split("\r\n")[0].rstrip()
433434
p.wait()
434435
p.stdout.close()
435436
p.stderr.close()

0 commit comments

Comments
 (0)