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
Look for emcc in the path as a last resort #8
Conversation
both toolchain files call 'find_file(_EMCC emcc)' and if '_EMCC' exists on the file system, they use its parent folder as 'EMSCRIPTEN_PREFIX'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is a very valuable addition as well! 👍
generic/Emscripten-wasm.cmake
Outdated
set(EMSCRIPTEN_PREFIX "/usr/lib/emscripten") | ||
endif() | ||
unset(_EMCC) | ||
#find_file always sets a cache variable. we dont want this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having this variable could be a valid use case, in fact -- imagine having two separate Emscripten installations (for whatever reason) and the toolchain picking the wrong one because its emcc
leaked into PATH
. Then, to debug this, one could spot the variable being set to an incorrect value (and use EMSCRIPTEN_PREFIX
next time). A bit bad is that there's now two ways to do the same thing (either setting EMSCRIPTEN_PREFIX
or this _EMCC
), but I don't have an immediate idea how to make it better :)
So, alternatively, could the variable be named _EMSCRIPTEN_EMCC_EXECUTABLE
and this called on it so it's hidden by default but "inspectable" when one needs to?
mark_as_advanced(_EMSCRIPTEN_EMCC_EXECUTABLE)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're totally right. It slipped my mind that there might be a 'reason' for not being able to disable saving to the cache.
Merged as 23cd3a4, thank you! :) I'll be updating the |
Of course, thank you for your hard work on these libraries! |
both toolchain files call 'find_file(_EMCC emcc)' and if '_EMCC'
exists on the file system, they use its parent folder as
'EMSCRIPTEN_PREFIX'