Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if cmake is on the PATH in emcmake.py #22489

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Peter0x44
Copy link

@Peter0x44 Peter0x44 commented Sep 3, 2024

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

@Peter0x44
Copy link
Author

Peter0x44 commented Sep 3, 2024

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.

emcmake.py Outdated Show resolved Hide resolved
emcmake.py Outdated Show resolved Hide resolved
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
auto-merge was automatically disabled September 3, 2024 23:26

Head branch was pushed to by a user without write access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants