Fix discrepancy in emcmake vs emconfigure scripts that CMAKE_CROSSCOMPILING_EMULATOR was was set only if emcmake was called, and not when emconfigure was used. The intention is that emcmake is just an alias to emconfigure.

This commit is contained in:
Jukka Jylänki 2015-09-15 13:33:39 +03:00
Родитель cc38a8bcce
Коммит 8bc65b8139
3 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -4,10 +4,5 @@ import os, subprocess, sys
from tools import shared
configure_path = shared.path_from_root('emconfigure')
node_js = shared.NODE_JS
if type(node_js) is list: node_js = ' '.join(node_js)
node_js = node_js.replace('"', '\"')
exit(subprocess.call([shared.PYTHON, configure_path] + \
[sys.argv[1]] + \
['-DCMAKE_CROSSCOMPILING_EMULATOR="' + node_js +'"'] + sys.argv[2:]))
exit(subprocess.call([shared.PYTHON, configure_path] + sys.argv[1:]))

Просмотреть файл

@ -31,9 +31,14 @@ variables so that emcc etc. are used. Typical usage:
(but you can run any command instead of configure)
'''
elif 'cmake' in sys.argv[1]:
node_js = shared.NODE_JS
if type(node_js) is list: node_js = ' '.join(node_js)
node_js = node_js.replace('"', '\"')
sys.argv = sys.argv[:2] + ['-DCMAKE_CROSSCOMPILING_EMULATOR="' + node_js +'"'] + sys.argv[2:]
try:
shared.Building.configure(sys.argv[1:])
shared.Building.configure(sys.argv[1:])
except CalledProcessError, e:
sys.exit(e.returncode)
sys.exit(e.returncode)

Просмотреть файл

@ -433,6 +433,7 @@ f.close()
cmd = [emconfigure, 'cmake', '-DCMAKE_BUILD_TYPE=' + configuration, cmake_arguments[i], '-G', generator, cmakelistsdir]
env = os.environ.copy()
print str(cmd)
ret = Popen(cmd, stdout=None if EM_BUILD_VERBOSE_LEVEL >= 2 else PIPE, stderr=None if EM_BUILD_VERBOSE_LEVEL >= 1 else PIPE, env=env).communicate()
if len(ret) > 1 and ret[1] != None and len(ret[1].strip()) > 0:
logging.error(ret[1]) # If there were any errors, print them directly to console for diagnostics.