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'
mosra
left a comment
There was a problem hiding this comment.
Thank you, this is a very valuable addition as well! 👍
| 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.
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.
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'