[CMake] IF(string) is false. Why?

2007-10-30 Thread Brandon Van Every
IF(WHATEVER) MESSAGE(WHATEVER string is true) ELSE(WHATEVER) MESSAGE(WHATEVER string is false) ENDIF(WHATEVER) C:\devel\src\cbugs\trueorfalsecmake -P trueorfalse.cmake WHATEVER string is false I would expect the literal string WHATEVER to evaluate to true. By analogy to IF(variable) as per

Re: [CMake] IF(string) is false. Why?

2007-10-30 Thread David Cole
Because WHATEVER is not empty... I frequently use: IF(${literal_string} STREQUAL ) or: IF(NOT ${literal_string} STREQUAL ) ...to achieve this goal. It's verbose, but it works and doesn't take too much getting used to. HTH, David On 10/30/07, Brandon Van Every [EMAIL PROTECTED] wrote:

Re: [CMake] IF(string) is false. Why?

2007-10-30 Thread Brandon Van Every
On 10/30/07, David Cole [EMAIL PROTECTED] wrote: Because WHATEVER is not empty... Then it should be true. I frequently use: IF(${literal_string} STREQUAL ) or: IF(NOT ${literal_string} STREQUAL ) ...to achieve this goal. It's verbose, but it works and doesn't take too much getting used

Re: [CMake] IF(string) is false. Why?

2007-10-30 Thread Brandon Van Every
On 10/30/07, Brandon Van Every [EMAIL PROTECTED] wrote: On 10/30/07, David Cole [EMAIL PROTECTED] wrote: Because WHATEVER is not empty... Then it should be true. I say the following should set the result to valid. MACRO(NOQUOTES_ALONE literal_string result) IF(${literal_string})

Re: [CMake] IF(string) is false. Why?

2007-10-30 Thread Brandon Van Every
On 10/30/07, Brandon Van Every [EMAIL PROTECTED] wrote: On 10/30/07, Brandon Van Every [EMAIL PROTECTED] wrote: On 10/30/07, David Cole [EMAIL PROTECTED] wrote: Because WHATEVER is not empty... Then it should be true. I say the following should set the result to valid.