emscripten
emscripten copied to clipboard
Check if cmake is on the PATH in emcmake.py
Currently, users who run emcmake without cmake on the PATH are greeted with confusing errors like:
emcmake cmake ..
configure: cmake .. -DCMAKE_TOOLCHAIN_FILE=D:\src\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=D:/src/emsdk/node/18.20.3_64bit/bin/node.exe -G Ninja emcmake: error: 'cmake .. -DCMAKE_TOOLCHAIN_FILE=D:\src\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=D:/src/emsdk/node/18.20.3_64bit/bin/node.exe -G Ninja' failed: [WinError 2] The system cannot find the file specified
I'm not sure if users have any reason not to have CMake on their PATH, maybe the error could be adjusted to only happen if argv[0] == "cmake" or so.
Also, open to suggestions to change the wording.
I think some flaky install for a test failed and stopped this from getting merged.
Failures
- ninja (exited 1) - ninja not installed. An error occurred during installation:
Error downloading 'ninja.1.13.1' from 'https://community.chocolatey.org/api/v2/package/ninja/1.13.1'.
- pkgconfiglite (exited 1) - pkgconfiglite not installed. An error occurred during installation:
Error downloading 'pkgconfiglite.0.28.0' from 'https://community.chocolatey.org/api/v2/package/pkgconfiglite/0.28'.