OK, I figured out my CMake issue. Investigating, it seems the loop was happening at the beginning when Ninja or Make was simply copying various includes such as SDL2.h from include to build/include.
I've been building a lot of this stuff on the ram disk, which is formatted JFS. I copied the tree to C: and retried CMake.
Success, both with using Make and Ninja. At least they both run to about 17% when the build dies, seemingly to a missing include,
[ 17%] Building C object CMakeFiles/SDL2main.dir/src/main/dummy/SDL_dummy_main.c.o
In file included from C:/SDL2/build/include/SDL2/SDL_assert.h:25,
from C:/SDL2/src/SDL_internal.h:208,
from C:/SDL2/src/main/dummy/SDL_dummy_main.c:4:
C:/SDL2/build/include/SDL2/SDL_stdinc.h:196:9: error: unknown type name 'int8_t'
196 | typedef int8_t Sint8;
| ^~~~~~
C:/SDL2/build/include/SDL2/SDL_stdinc.h:203:9: error: unknown type name 'uint8_t'
lots more similar errors with *_t variables.
This is the last SDL2, 2.32.10. Guess the next step is to look at the Bitwise source, merge it in and hopefully get it building with CMake.
Then take all the OS/2 stuff and apply it to the latest SDL3 and go from there.
Still weird that the ramdisk has these problems