the evil cmake -- string concatenation

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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章