[CMake] if(string MATCHES regex) question

Marcel Loose loose at astron.nl
Wed Jul 1 04:56:14 EDT 2009


Hi all,

In a number of standard CMake modules I encountered the following line:

  IF("${VARIABLE}" MATCHES "^${VARIABLE}$")

Can anyone explain the rationale of this conditional to me. To my
cluttered mind this seems to be an "always-true" condition.

Best regards,
Marcel Loose.




More information about the CMake mailing list