I've got the following lines in my CMakeLists.txt file. I'm running CMake 3.5.2 on Windows 7, and using Visual Studio 12 2013 as the generator with "Use default native compilers" checked in the gui.
find_path(FORTRAN_DIR NAMES cdll.cpp fdll.f90 Makefile PATHS ../source)
execute_process(COMMAND uname -a)
MSYS_NT-6.1 MYCOMPUTERNAMEHERE 2.5.2(0.297/5/3) 2016-07-15 08:31 x86_64 Msys
execute_process(COMMAND which make)
CMake comes with Kitware's OS abstraction/detection library
KWSys provides a platform-independent API to many common system features that are implemented differently on every platform.
So - as @Tsyvarev has commented - your behavior could either be the Win32/64 version of CMake with
MSYS in the
PATH environment (finding the Unix specific commands given) or the MinGW32/64 version of CMake run from
Also you may consider the use of something like the
FindUnixCommands to get absolute paths to the Unix tools in question.