[CMake] What does this mean: IF(${VARIABLE} MATCHES ^${VARIABLE}$)

2007-12-11 Thread Clark J. Wang
The header of many CMake modules often looks like this (take CheckIncludeFile as an example): MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) IF(${VARIABLE} MATCHES ^${VARIABLE}$) ... ... The IF statement really puzzles me a lot. What is it used to do?

Re: [CMake] What does this mean: IF(${VARIABLE} MATCHES ^${VARIABLE}$)

2007-12-11 Thread Pau Garcia i Quiles
Quoting Clark J. Wang [EMAIL PROTECTED]: The header of many CMake modules often looks like this (take CheckIncludeFile as an example): MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) IF(${VARIABLE} MATCHES ^${VARIABLE}$) ... ... The IF statement really puzzles me a lot. What is it used to do?

Re: [CMake] What does this mean: IF(${VARIABLE} MATCHES ^${VARIABLE}$)

2007-12-11 Thread Jian Wang
On Dec 11, 2007 6:49 PM, Pau Garcia i Quiles [EMAIL PROTECTED] wrote: Quoting Clark J. Wang [EMAIL PROTECTED]: The header of many CMake modules often looks like this (take CheckIncludeFile as an example): MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) IF(${VARIABLE} MATCHES

Re: [CMake] What does this mean: IF(${VARIABLE} MATCHES ^${VARIABLE}$)

2007-12-11 Thread Bill Hoffman
Jian Wang wrote: Why is IF(${VARIABLE} MATCHES ^${VARIABLE}$) used instead of IF( ${VARIABLE} STREQUAL ${VARIABLE} ) (which would always return true)? I'm not sure of use case but I'd say it's checking for special characters in VARIABLE. If it's checking for special characters

Re: [CMake] What does this mean: IF(${VARIABLE} MATCHES ^${VARIABLE}$)

2007-12-11 Thread Brandon Van Every
On Dec 11, 2007 8:16 AM, Bill Hoffman [EMAIL PROTECTED] wrote: Jian Wang wrote: Why is IF(${VARIABLE} MATCHES ^${VARIABLE}$) used instead of IF( ${VARIABLE} STREQUAL ${VARIABLE} ) (which would always return true)? I'm not sure of use case but I'd say it's checking for special