Scott Bloom
2018-11-15 19:39:52 UTC
I have an older 3rd party (that is no longer supported) cmake file, that relies on the CMP0053 OLD setting
Since I have moved to 3.12, Im getting the warning that its deprecated etc...
SC_CHECK_BROKEN_FUNC(
strstr "
extern int strstr();
exit(strstr(\"\\\0test\", \"test\") ? 1 : 0);"
)
However, when I turn the policy to "NEW" it errors out with
Syntax error in cmake code at when parsing string
extern int strstr();
exit(strstr(\"\\\0test\", \"test\") ? 1 : 0);
Invalid character escape '\0'.
However, that is the whole test, ie that the escaped 0 check works.
How should I change the strings generation so it works with the new policy?
Scott
Since I have moved to 3.12, Im getting the warning that its deprecated etc...
SC_CHECK_BROKEN_FUNC(
strstr "
extern int strstr();
exit(strstr(\"\\\0test\", \"test\") ? 1 : 0);"
)
However, when I turn the policy to "NEW" it errors out with
Syntax error in cmake code at when parsing string
extern int strstr();
exit(strstr(\"\\\0test\", \"test\") ? 1 : 0);
Invalid character escape '\0'.
However, that is the whole test, ie that the escaped 0 check works.
How should I change the strings generation so it works with the new policy?
Scott