将CEDET ede-cpp-root-project命令放在.emacs文件之外 [英] Putting CEDET ede-cpp-root-project commands outside the .emacs file

查看:303
本文介绍了将CEDET ede-cpp-root-project命令放在.emacs文件之外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在工作的EDE项目,但我想将该命令放在该项目的源代码树中,而不是我的.emacs文件中。这可能吗?



我已尝试使用目录变量并且emacs加载该文件,但它确实有任何影响。为此,我将以下代码放在项目根目录中的.dir-locals.el中:

 ((nil 
。((ede-cpp-root-projectMyProj
:nameMyProj Project
:file/home/jlisee/projects/myproj_code/CMakeLists.txt
:include -path'(/ packages)
:system-include-path'(/ opt / myproj / local / include)
:spp-table'((CONST ))


解决方案

项目类型为ede-cpp-root是专门为将项目文件保留在源代码树中的人员。如果您希望源代码树中有项目类型,还有其他选项。



如果您正在使用最新版本的CEDET,您可以启用通用项目类型,反过来支持cmake(它看起来像你在使用?)

 (ede-enable-generic-projects)

在CMake的此通用项目中,使用

  Mx ede-customize-project RET 

添加包含路径,宏表等。



如果您不使用makefile,cmake或其他任何内容,可以使用一些代码创建自己的通用项目类型你的.emacs文件。看到ede通用的提及CMake的所有内容,应该是很明显的3件事情要创建。



我认为现有的项目类型使用CMakeLists而不是CMakeLists。 txt,所以也许现有的代码需要调整。


I have a working EDE project, but I would like to locate the command in a file in the source tree for that project and not in my .emacs file. Is this possible?

I have tried using directory variables and emacs loads the file, but it does have any affect. To do this I placed the following code in .dir-locals.el in the project root:

((nil 
 . ((ede-cpp-root-project "MyProj"
     :name "MyProj Project"
     :file "/home/jlisee/projects/myproj_code/CMakeLists.txt"
     :include-path '( "/packages" )
     :system-include-path '( "/opt/myproj/local/include" )
     :spp-table '( ("CONST" . "const") )
     ))))

解决方案

The project type ede-cpp-root is for people who specifically want to keep the project file out of their source tree. If you want a project type in your source tree, there are other options.

If you are using a recent version of CEDET, you can instead enable the generic project types which in turn supports cmake (which it looks like you are using?)

(ede-enable-generic-projects)

Once in this generic project for CMake, use

 M-x ede-customize-project RET

to add in include paths, macro tables, and the like.

If you aren't using makefiles, cmake, or whatever, you can create your own generic project type with a bit of code in your .emacs file. Look in ede-generic for everything that mentions CMake, and it should be pretty obvious what 3 things to create.

I think the existing project type uses CMakeLists, not CMakeLists.txt, so perhaps the existing code needs a tweak.

这篇关于将CEDET ede-cpp-root-project命令放在.emacs文件之外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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