[Cmake] using # in a string

Andy Cedilnik andy.cedilnik at kitware.com
Mon May 5 11:29:02 EDT 2003


Hi Stefan,

You can get any character in the CMake variable by using STRING ASCII
command. Unfortunately there is a bug in CMake which makes all STRING
commands only work in the leaf CMakeLists.txt. So, if you only need the
funny character in the current CMakeLists.txt, then here we go:

STRING(ASCII 35 POUND)
SET(SOME_VAR "The pound is ${POUND}")

				Andy

On Mon, 2003-05-05 at 10:25, Stefan Schmidt wrote:
> Can't I use # in a string? 
> Or is there a way to escape its special meaning of starting a comment?





More information about the CMake mailing list