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 co
CMake comes with Kitware's OS abstraction/detection library kwsys
:
KWSys provides a platform-independent API to many common system features that are implemented differently on every platform.
The execute_process()
magic is happening in ProcessWin32.c using CreateProcessW()
or ProcessUNIX.c using execvp()
depending of which version of CMake you are using.
So - as @Tsyvarev has commented - your behavior could either be the Win32/64 version of CMake with MinGW
/MSYS
in the PATH
environment (finding the Unix specific commands given) or the MinGW32/64 version of CMake run from MSYS
.
Also you may consider the use of something like the FindUnixCommands to get absolute paths to the Unix tools in question.
Reference