CLion的根目录中是否可能没有cmake构建文件(CMakeLists.txt) [英] Is it possible to have cmake build file (CMakeLists.txt) not in root in CLion
本文介绍了CLion的根目录中是否可能没有cmake构建文件(CMakeLists.txt)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在CLion的根目录中不包含cmake构建文件(CMakeLists.txt)?
Is it possible to have cmake build file (CMakeLists.txt) not in root directory in CLion?
我目前正在从事不包含cmake构建文件的项目不在CLion项目的根目录中(在out / Debug目录中)。我希望CLion打开此项目的根目录,并使用out / Debug中的cmake。
I am currently working on project where cmake build file is not in not in the root directory of a CLion project (in out/Debug directory). I want CLion to open root of this project, and use cmake from out/Debug.
可能吗?
示例:
Is is possible? EXAMPLE:
|- main.cpp
|- classs.cpp
|- class.h
|- build1
|- CMakeLists.txt
|- build2
|- CMakeLists.txt
这有点不寻常,但是请考虑生成cmake文件的情况。
This is a little bit unusual, but think of situation when cmake file is generated.
推荐答案
澄清一下,CLION提供了解决方案。
Just to clarify, CLION has solution for it.
请执行以下操作:
use 'Welcome Screen | Open Project', point to CMakeLists.txt
use 'Tools | CMake | Change Project Root', and point to the actual project's root.
这篇关于CLion的根目录中是否可能没有cmake构建文件(CMakeLists.txt)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文