[CMake] Re: dangerous regex in CHECK_C_SOURCE_COMPILES
Bill Hoffman
bill.hoffman at kitware.com
Tue Nov 13 18:28:10 EST 2007
Brandon Van Every wrote:
> On Nov 13, 2007 3:35 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>> A variable name should not contain special characters anyway.
>
> That, however, is not error checking or safety. That's hope. I
> haven't synthesized an example that will kill CMake in the real world.
> At some point I will do so and enter it in the bug tracker, with
> whatever level of severity it is worth.
>
>
OK, so if you call the macro with incorrect arguments you will get the
wrong answer, and some error about a bad regular expression. However, I
think that even if we did not use the MATCH thing for DEFINED, you would
still get some really odd error, if you pass a variable name into a
macro, that is not a valid variable name. Again, can you come up with
an example of this? I just want to try the example against the "fix",
and my guess is the results will not be much better than what we have now.
-Bill
More information about the CMake
mailing list