﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Error-文章分类-cmake 乱谈</title><link>http://www.cppblog.com/Error/category/19515.html</link><description /><language>zh-cn</language><lastBuildDate>Fri, 22 Feb 2013 21:24:56 GMT</lastBuildDate><pubDate>Fri, 22 Feb 2013 21:24:56 GMT</pubDate><ttl>60</ttl><item><title>转 Emacs CMake mode使用  </title><link>http://www.cppblog.com/Error/articles/197998.html</link><dc:creator>Enic</dc:creator><author>Enic</author><pubDate>Fri, 22 Feb 2013 05:38:00 GMT</pubDate><guid>http://www.cppblog.com/Error/articles/197998.html</guid><wfw:comment>http://www.cppblog.com/Error/comments/197998.html</wfw:comment><comments>http://www.cppblog.com/Error/articles/197998.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Error/comments/commentRss/197998.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Error/services/trackbacks/197998.html</trackback:ping><description><![CDATA[<p>CMake mode for emacs 提供了一些好的功能，一直都没有注意到这个mode，今天正式开始使用。</p> <p>首先，下载cmake-mode.el文件</p> <p sizcache="0" sizset="33">﻿﻿<a href="http://www.cmake.org/CMakeDocs/cmake-mode.el">http://www.cmake.org/CMakeDocs/cmake-mode.el</a><br /></p> <p><br /></p> <p>放到自己的emacs plugin目录下：</p> <p>/opt/emacs_plugins/cmake-mode.el</p> <p><br /></p> <p>然后在.emacs文件中设置如下：</p> <p>&nbsp;</p> <div bg_plain"=""> <div> <div><strong>[plain]</strong> <a title="view plain" href="http://blog.csdn.net/sheismylife/article/details/7197392#">view  plain</a><a title="copy" href="http://blog.csdn.net/sheismylife/article/details/7197392#">copy</a><a title="print" href="http://blog.csdn.net/sheismylife/article/details/7197392#">print</a><a title="?" href="http://blog.csdn.net/sheismylife/article/details/7197392#">?</a></div></div> <ol> <li>(setq&nbsp;load-path&nbsp;(cons&nbsp;(expand-file-name&nbsp;"/opt/emacs_plugins")&nbsp;load-path))&nbsp;&nbsp;</li> <li>(require&nbsp;'cmake-mode)&nbsp;&nbsp;</li> <li>(setq&nbsp;auto-mode-alist&nbsp;&nbsp;</li> <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(append&nbsp;'(("CMakeLists\\.txt\\'"&nbsp;.&nbsp;cmake-mode)&nbsp;&nbsp;</li> <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;("\\.cmake\\'"&nbsp;.&nbsp;cmake-mode))&nbsp;&nbsp;</li> <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto-mode-alist))&nbsp;&nbsp;</li></ol></div><pre style="display: none" name="code">(setq load-path (cons (expand-file-name "/opt/emacs_plugins") load-path)) (require 'cmake-mode) (setq auto-mode-alist       (append '(("CMakeLists\\.txt\\'" . cmake-mode)                 ("\\.cmake\\'" . cmake-mode))               auto-mode-alist))</pre><br /><br /> <p>&nbsp;</p> <p>重新启动Emacs后，打开我的CMake工程的CMakeLists.txt文件,里面command关键字都已经变成高亮。</p> <p>M-x 执行&nbsp;cmake-help-list-commands 后，可以看到所有当前CMake版本支持的命令。</p> <p>将光标停在某个command（比如AUX_SOURCE_DIRECTORY)之上，运行cmake-help-command  会看到关于AUX_SOURCE_DIRECTORY command的详细介绍。</p> <p><br /></p> <p>其他功能后面慢慢体会吧。</p><img src ="http://www.cppblog.com/Error/aggbug/197998.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Error/" target="_blank">Enic</a> 2013-02-22 13:38 <a href="http://www.cppblog.com/Error/articles/197998.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cmake乱谈1</title><link>http://www.cppblog.com/Error/articles/179626.html</link><dc:creator>Enic</dc:creator><author>Enic</author><pubDate>Thu, 21 Jun 2012 09:36:00 GMT</pubDate><guid>http://www.cppblog.com/Error/articles/179626.html</guid><wfw:comment>http://www.cppblog.com/Error/comments/179626.html</wfw:comment><comments>http://www.cppblog.com/Error/articles/179626.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Error/comments/commentRss/179626.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Error/services/trackbacks/179626.html</trackback:ping><description><![CDATA[<div><br />1.CMAKE中的系统环境变量<br />&nbsp; 1)怎么引用系统环境变量：$ENV{PATH}<br />&nbsp; 2)怎么只修改本次configure会话的环境变量SET(ENV{PATH} "1"&nbsp; PATH)<br /><br />2.CMAKE中怎么定义可以在GUI、命令行configure的时候设置的变量<br />&nbsp;&nbsp; &nbsp;SET(var1 13 CACHE STRING "")</div><img src ="http://www.cppblog.com/Error/aggbug/179626.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Error/" target="_blank">Enic</a> 2012-06-21 17:36 <a href="http://www.cppblog.com/Error/articles/179626.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>