Hi CMake users, Enscript (http://www.codento.com/people/mtr/genscript) is, I guess, one of the most powerful pretty printing tool for code. It's used by many other programs which need syntax highlightning. It can generate nice documents in several format (ps, html, rtf...)
Enscript highlightning system does not support CMake source files in
the last version and Google told me anyone has written the required
file `cmake.st'.
So I made a very naive one which only identify:
- commands
- variables
- strings
You can find `CMakeLists.txt.pdf' in attachment for an example of the
document generated by enscript.
To install it:
copy the `cmake.st' (provided in attachment) in the
%INSTALL_DIR%/share/enscript/hl directory and patch the
`%INSTALL_DIR%/share/enscript/hl/enscript.st':
--- hl/enscript.st.orig 2006-09-21 10:58:24.000000000 +0200
+++ hl/enscript.st 2006-09-21 10:57:40.000000000 +0200
@@ -470,6 +470,7 @@
namerules
{
/\.(c|h)$/ c;
+ /\.cmake$/ cmake;
+ /CMakeLists.*/ cmake;
/\.(c++|C|H|cpp|cc|cxx)$/ cpp;
/\.m$/ matlab;
/\.(mpl|mp|maple)$/ maple;
like usual:
... ANY EXPRESS OR IMPLIED WARRANTIES, [...] IN NO EVENT SHALL THE
REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ... :)
Maybe this could be added to the CMake wiki.
The following does not concern CMake at all, my apologizes but I
believe it can be useful.
PS: To print code is sometimes useful when you're too tired to read on
a screen or when you need to step back to understand a piece of code.
You can easely make a pretty .pdf of your source code with the shell
script `ppcode' (in attachment). the `CMakeLists.txt.pdf' has been
generated with this script.
--
Tristan Carel
http://tristan-carel.com
cmake.st
Description: Binary data
CMakeLists.txt.pdf
Description: Adobe PDF document
ppcode
Description: Binary data
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
