How are CMake execute_process commands run?

筅森魡賤 提交于 2019-11-29 13:15:16
Florian

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!