How to add option to the compiler?

try adding the flag it says you need as a compile option.

target_compile_options(qt_cmake PUBLIC "/Zc:__cplusplus")

Here is a stack overflow post that looks relevant c++ - Cannot set __cplusplus to C++17 standard with Visual Studio and CMake - Stack Overflow