set (var hello) message(${var}). 會輸出 hello. 變數值的代換甚至可以遞迴進行,在撰寫複雜的功能時可能很有用。例如 set(var hello) set(foo var) message(${foo}) ...
確定! 回上一頁