murphypei/hexo-blog

a comment on https://chaopei.github.io/blog/2018/10/cmake-variable.html

Closed this issue · 0 comments

Hi, ChaoPei

I'd like to add a comment on your this blog: https://chaopei.github.io/blog/2018/10/cmake-variable.html

I like this post but I cannot comment there so I come here.

Your clearly description is great. By the way, if people are using "-Dvar=value" to pass values temporarily, they must use "cached variable", i.e

set(VAR "some value" CACHE STRING "" [FORCE])

and "FORCE" is optional depend on other considerations.