mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
a308ea38f3
Since commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16,
v4.2.0-rc1~607^2~3) we've considered the `.wasm` to be the `try_compile`
output because we need `COPY_FILE` to get it for extracting `INFO:`
strings during our inspection checks. This breaks `try_run` because
`node`, used via `CMAKE_CROSSCOMPILING_EMULATOR`, expects the `.js`.
Revert to considering the `.js` to be the primary output file, but
switch to the `.wasm` in `COPY_FILE`'s implementation.
Fixes: #27421
9 lines
229 B
CMake
9 lines
229 B
CMake
enable_language(C)
|
|
try_run(RUN_RESULT
|
|
COMPILE_RESULT
|
|
SOURCE_FROM_CONTENT main.c "int main(void) { return 12; }\n"
|
|
NO_CACHE
|
|
)
|
|
message(STATUS "COMPILE_RESULT='${COMPILE_RESULT}'")
|
|
message(STATUS "RUN_RESULT='${RUN_RESULT}'")
|