现在的位置: 首页 > 综合 > 正文

the evil cmake — string concatenation

2013年08月22日 ⁄ 综合 ⁄ 共 424字 ⁄ 字号 评论关闭

when using SET command, string type can be concatenated easily by combining a set of raw string, symbols, or raw string & symbols variables, such as:

#concatenate two raw string variables

SET(TESTSTRING "a" "b")

#concatenate symbol and raw string variables

SET(TESTSTRING2 ${TESTSTRING} "c")

#concatenate two symbol string variables

SET(TESTSTRING3 ${TESTSTRING} ${TESTSTRING2})

this attribute is quite of useful when processing names, paths variables, with different options and variation.

抱歉!评论已关闭.