Apparently `ty` is being too strict here and warning about `Any` possibly being `PathLike` which is not supported on older Pythons.
```
error[deprecated]: The overload of `which` is deprecated
--> src\bonsai\bonsai\bim\module\drawing\operator.py:2267:34
|
2267 | command[0] = shutil.which(command[0]) or command[0]
| ^^^^^^^^^^^^ On Windows before Python 3.12, using a PathLike as `cmd` would always fail or return `None`.
error[deprecated]: The overload of `which` is deprecated
--> src\bonsai\bonsai\tool\drawing.py:1324:30
|
1324 | command[0] = shutil.which(command[0]) or command[0]
| ^^^^^^^^^^^^ On Windows before Python 3.12, using a PathLike as `cmd` would always fail or return `None`.
```
Commented out long time ago in ec04644.
Nowadays static linking would be done differently - using `CMAKE_MSVC_RUNTIME_LIBRARY`, but we don't really support static runtime.
Example error that occurred:
```
CMake Error in CMakeLists.txt:
IMPORTED_LOCATION not set for imported target "RocksDB::rocksdb"
configuration "MinSizeRel".
```
manifold was introduced in a19d398, but its `goto :manifold` occurred too early in the file skipping bunch of dependencies - I guess that's why it was removed in 6ad5fbb, but then new target, qt was using `Successful` as the next label, so `manifold` end up being always skipped.
Making it reachable as we do use it in nix/build-all.
CGAL never runs `find_package` for `Boost`, `GMP` or `MPFR` during its configuration and never hardcodes their paths to the generated configs. So providing them have no effect. It's also can be confirmed by `build-deps.cmd` on Windows running all this time without the most of these args. Though it was settings `BOOST_ROOT` but it had no effect too.
Probably it's some kind of artifact from CGAL past when it's used to be non-header-only library.
Caching of version path was introduced in c5f6d47, awhile ago, removing it, since all new installations are already using the cache instead of this default fallback.
`robocopy` line was an artifact from old layout.
It was only needed to set `PYTHON_INSTALLER` correctly, but
`PYTHON_INSTALLER` is actually only used when arch is not x64/arm64,
exactly the only cases when `PYTHON_AMD64_POSTFIX` is set.
It's dating back to the original implementation in 5c0eb05, it was
needed to avoid rebuilding opencollada. Not needed anymore since
previous installations are now recognized.
We mark some dependency installations using empty `.release/debug_installation` files to support coexisting release/debug installations, which is needed on Windows to be able to easily switch between Release/Debug builds of IfcOpenShell and avoiding conflicts when different binaries are using different debubg/non-debug runtimes.
It was introduced in 517ba237f and `mark_based_on_artifacts` was pre-existing installations based on the found artifacts, all new installations were not relying on this for marking. Since it's been some time, dropping this workaround.
Introduced in 2e35b07 when moving to github releases, removing it since
it's been 20 months already.
Added temporary clean up step to remove previous installation.
I've found this commit 4400a6e that was introducing this option to the main cmake, but I'm not sure if it ever was propagated to the main branch or was reverted inside one of the merges.
But anyway, `USE_STATIC_MSVC_RUNTIME` is currently used only in svgfill, not used in the main cmake and works out of sync with main cmake (it sets `Boost_USE_STATIC_RUNTIME` to `OFF` instead of guard+setting it to `ON`).
So removing this option and syncing the code.
Resolves the warnings below:
```
CMake Deprecation Warning at CMakeLists.txt:207 (message):
Use SQLite3_INCLUDE_DIR instead of SQLITE3_INCLUDE_DIR
CMake Deprecation Warning at CMakeLists.txt:211 (message):
Use SQLite3_LIBRARY instead of SQLITE3_LIBRARY
```
It was introduced a (very) long time ago (c7bf03e), was barely changed since then and seems unused by now.
Apparently it was used mainly to get installation's Python to PATH (`set PATH=%PYTHONHOME%;%PATH%`). It was also setting and env variables based on the cache as a side effect.
If needed, we'll be able reintroduce it later, delegating most of the logic to Python.
`TARGET_ARCH` has exactly the same values as `VS_PLATFORM` - "x64", "ARM", "ARM64") except it has `x86` instead of `Win32`, but this value is never actually used, so both variables end up using interchangeably, making code harder to reason about - you needed to remember that they're exactly the same except the case when the variable is passed directly to VS (either through `cmake -A` or some `msbuild` command), then user must use `VS_PLATFORM`. So we might just use one variable always.
`START` is set to `0` for "amd64" / "x64" and `1` in all other cases, effectively just skipping `GENERATORS[0]` in case when "amd64" or "x64" is present.
Which is now useless, since `GENERATORS[0]` doesn't exist anymore.
They were added awhile ago in 67666ed for overcoming some win32 issues, which is not around anymore.
And now `VS_HOST` is never set (and therefore `VS_TOOLSET_HOST` is always empty too) and likely to be never used.