Skip to content

Commit 6345f59

Browse files
committed
emmaken support for cmake c++ builds
1 parent 3ef5028 commit 6345f59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/emmaken.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def path_from_root(*pathelems):
5151
# If this is a CMake config, just do that
5252
CMAKE_CONFIG = 'CMakeFiles/cmTryCompileExec.dir' in ' '.join(sys.argv)# or 'CMakeCCompilerId' in ' '.join(sys.argv)
5353
if CMAKE_CONFIG:
54-
exit(os.execvp('gcc', ['gcc'] + sys.argv[1:]))
54+
compiler = 'g++' if 'CXXCompiler' in ' '.join(sys.argv) else 'gcc'
55+
exit(os.execvp(compiler, [compiler] + sys.argv[1:]))
5556

5657
try:
5758
print 'emmaken.py: ', ' '.join(sys.argv)

0 commit comments

Comments
 (0)