Call CMake Cygwin with windows style path (C:\)

If cygwins cmake is called with windows style paths and the build directory is missing, cmake will create two build directories from -B "C:\\dir1\\dir2\\project\\build":

Is there any possibility to manipulate those paths before CMake creates and uses them? Or set a variable so CMake will parse above path as a windows style one?

Additionaly, calling CMake with a windows style path, will lead to non obvious problems when adding sources inside binary dir, or using ExternalProject etc. (no warning is given)

Tools in the cygwin environment are not able to handle windows paths. This is also the case for CMake and this behavior will not change.
You can use cygpath tool to convert windows paths to cygwin ones.

yes, cygpath is an explicit way of translating those paths. But i’m search an implicit way of transforming those paths while calling CMake or setting a CMAKE variable.

For now i found CMAKE_HOME_DIRECTORY which can be given as arg/preset to CMake, but CMake needs to be run from project folder as cwd or the variable value needs to be set to the project folder. The later case looks like a non portable variant.

Keep in mind, that there are various IDEs to handle calls to cmake, e.g., CMake Tools for VSCode. So explicit calls to cygpath are not possible, see Bug with cmake.buildDirectory · Issue #4038 · microsoft/vscode-cmake-tools · GitHub

Why do you want to use the cygwin variant of CMake if you are in a pure Windows environment? Use the Windows one!!