lean4-htt/src/shell
Garmelon 5e13e71a84
chore: fix cmake if conditions (#12213)
Due to the way variable expansion and if interact in cmake, unquoted
variable expansions should essentially never be used inside if and may
lead to unexpected behavior. Also, quoted variable expansions can
usually be replaced by the unquoted variable name.

For more details, see this section in the cmake docs:
https://cmake.org/cmake/help/latest/command/if.html#variable-expansion

As one example of the kinds of issues that can occur with unquoted
variable expansions, consider this check from
`src/shell/CMakeLists.txt`, which tries to ensure that a test is only
run in non-WASM builds.

```cmake
if(NOT ${EMSCRIPTEN})
```

If the variable `EMSCRIPTEN` is empty or not defined (as is the case in
a non-WASM build), `${EMSCRIPTEN}` expands to 0 arguments, meaning the
check becomes

```cmake
if(NOT)
```

Since the `NOT` is unquoted, the if now tries to resolve it as a
variable. Since the variable `NOT` does not exist, the condition is
false and the test is never executed, even in non-WASM builds.
2026-01-28 15:37:18 +00:00
..
app.manifest fix: UTF-8 file path support for lean on Windows 2021-09-22 12:21:52 +02:00
CMakeLists.txt chore: fix cmake if conditions (#12213) 2026-01-28 15:37:18 +00:00
lean.cpp chore: reintroduce lean.cpp in separate commit so Git doesn't freak out 2021-09-16 07:03:37 -07:00
lean_js.cpp chore: remove dead code 2020-10-27 09:37:21 -07:00
manifest.rc fix: UTF-8 file path support for lean on Windows 2021-09-22 12:21:52 +02:00
mk_lean_sh.sh