[CMake] dangerous regex in CHECK_C_SOURCE_COMPILES

Brandon Van Every bvanevery at gmail.com
Wed Nov 7 11:38:42 EST 2007


It begins with:

MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
  IF("${VAR}" MATCHES "^${VAR}$")

What is the intent here?  If ${VAR} contains regex special characters
you're going to get all kinds of weird and nasty behavior.


Cheers,
Brandon Van Every


More information about the CMake mailing list