Fernando Cacciola a écrit :
Hi people,
Consider the following (tested in 2.4.7):
set ( VAR "whatever" )
message( STATUS "VAR=${VAR}" )
if ( ${VAR} )
message( STATUS "VAR evaluates to true" )
else ( ${VAR} )
message( STATUS "VAR evaluates to false" )
endif( ${VAR} )
it prints "VAR evaluates to false".
Is that expected?? The documentation of IF() doesn't match this
behaviour AFAICS.
TIA
Hi,
You should use IF(VAR) instead.
In your example you made the test : IF(whatever)
"whatever" variable does not exist so the evaluation is false.
--Sylvain
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake