For a 32-bit build I used the "x86 Native Tools Command Prompt for VS 2019" then did a change directory to the build folder.
Second, I found a hint here:
https://stackoverflow.com/questions/62448981/cmake-msbuild-fails-to-build-vctargetspath-vcxproj"I was able to work around this error by using -A Win32. Not sure why -w64 doesn't work for VS2019."
When -A Win32 was used to build the project (instead of -A x86), the project built successfully.
For 32-bit Release and Debug builds I use:
cmake .. -G "Visual Studio 16 2019" -A Win32 -DBOOST_ROOT="C:\local\boost" -DCMAKE_BUILD_TYPE=Release -DSTATIC_RUNTIME=1
cmake .. -G "Visual Studio 16 2019" -A Win32 -DBOOST_ROOT="C:\local\boost" -DCMAKE_BUILD_TYPE=Debug -DSTATIC_RUNTIME=1