Hi Bill,

Can you add a :

Better let me start over,  I think I know what's going on now.

Maybe is the intended behaviour. If it is, I think is quite odd.


Consider the following simple script:

set ( var "whatever" CACHE PATH "" )
message ( STATUS "${var}" )

I would expect to see "whatever" as the value of var since it is being explicitely set, but that's not neccesarily what happens: if the cache *already* contains a value for var, say "xyz", then that value sticks and var is just never set to "whatever" unless FORCE is added (as I found out and reported eariler in this thread)

Is this the expected behaviour?

If it is, then it leads to a problem when SET is used for example like this:

set ( QT_INCLUDE_DIR ${qt4_include_dir}  CACHE PATH "" )

because if at some earlier run qt4 was actually not found, QT_INCLUDE_DIR gets set to NOTFOUND and once there it is never reset to the include path even if qt4 is properly found later. The only way out this tirany is to delete the cache and star over.

IMO the rule that says "do not override exisitng cache values unless FORCE is specified" should be relaxed to have "null values" be always overwritten.

Or at the very least there should be a FORCE_IF_NULL option, because it makes no sense at all to keep a NOTFOUND value for an INCLUDE_DIR when the right path is available.

Best


--
Fernando Cacciola
SciSoft
http://fcacciola.50webs.com
http://groups.google.com/group/cppba



_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to