[CMake] Re: dangerous regex in CHECK_C_SOURCE_COMPILES

Brandon Van Every bvanevery at gmail.com
Tue Nov 13 14:26:44 EST 2007


I see the same construct in CHECK_INCLUDE_FILES.  What is the intent?
This is not safe.

Cheers,
Brandon Van Every


On Nov 7, 2007 11:38 AM, Brandon Van Every <bvanevery at gmail.com> wrote:
> 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