Remove usage of CMAKE_GENERATOR_PLATFORM. this variable is not set unless -A
Remove usage of CMAKE_GENERATOR_PLATFORM. this variable is not set unless -A option is used or the environment variable CMAKE_GENERATOR_PLATFORM is set. See https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_PLATFORM.html