如何移动CMake创建的文件夹? [英] How do I move my folders created by CMake?

查看:206
本文介绍了如何移动CMake创建的文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CMake在为Visual C ++生成项目文件时使用绝对路径。

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.

如何将CMake项目文件夹移动到任意位置而不会触发重新编译?

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

推荐答案

摘录自 CMAKE_USE_RELATIVE_PATHS 变量:


通常,无法将CMake生成的makefile移动到其他位置不管此变量的值如何。

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

这篇关于如何移动CMake创建的文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆