5
试图让find_path
做我想做的事。如何清除/删除缓存变量
find_path(temmp include/help.h)
message("temmp= ${temmp}")
help.h is found。输出为temmp= /usr/local/toolA
find_path(temmp include/foo.shoe)
message("temmp= ${temmp}")
foo.shoe不存在(未找到)。输出为temmp= /usr/local/toolA
缓存变量存在,所以变量(temmp)未被改动。
我试着和该清除缓存VAR:
set (temmp "" CACHE INTERNAL "")
find_path(temmp include/help.h)
message("temmp= ${temmp}")
没有变化。该变量被清除,但仍然存在。输出为temmp=
(find_path
不运行。)
如何从缓存中删除temmp
变量? (我想迫使find_path
再次运行。)