How do I move my folders created by CMake?

2019-09-09 14:09发布

CMake uses absolute paths when it generates project files for Visual C++.

Sometimes, I need to move my project folder to some other drive.

But when I move the folder (and try to replace all the paths in the project files), this triggers a long, arduous recompilation process that wastes a lot of my time for absolutely no reason.

How do I move CMake project folder(s) to an arbitrary location without triggering a recompilation?

1条回答
劫难
2楼-- · 2019-09-09 14:46

From the documentation of CMAKE_USE_RELATIVE_PATHS var:

In general, it is not possible to move CMake generated makefiles to a different location regardless of the value of this variable.

查看更多
登录 后发表回答