Write CMake params as a "recmake" script so that developers can call that to easily recmake with the same parameters as the previous configuration.

This commit is contained in:
Jukka Jylänki
2016-07-11 19:57:47 +03:00
parent 620dc7b1da
commit 5ad39c9cf4

1
emsdk
View File

@@ -627,6 +627,7 @@ def cmake_configure(generator, build_root, src_root, build_type, extra_cmake_arg
else: generator = []
cmdline = ['cmake'] + generator + ['-DCMAKE_BUILD_TYPE='+build_type, '-DPYTHON_EXECUTABLE='+sys.executable] + extra_cmake_args + [src_root]
print('Running CMake: ' + str(cmdline))
open(os.path.join(build_root, 'recmake.' + ('bat' if WINDOWS else 'sh')), 'w').write(' '.join(cmdline)) # Create a file 'recmake.bat/sh' in the build root that user can call to manually recmake the build tree with the previous build params
ret = subprocess.check_call(cmdline, cwd=build_root)
if ret != 0:
print('CMake invocation failed with exit code ' + ret + '!', file=sys.stderr)