pcl icon indicating copy to clipboard operation
pcl copied to clipboard

[Cmake] Add CMP0054 policy to new

Open larshg opened this issue 4 years ago • 2 comments

larshg avatar Jun 05 '21 19:06 larshg

Interesting, that they enable a warning about this policy within a patch update 🤔

On thing:

Sometimes you are using now:

if(dependee_status STREQUAL "AUTO_OFF")

And sometimes:

if(${qhull_header} STREQUAL "qhull")

So sometimes with ${} and sometimes now. I'm always not sure which variant is better, but looking at this answer, the variant with ${} could be more save even it most cases it doesn't matter.

SunBlack avatar Jun 07 '21 11:06 SunBlack

Interesting, that they enable a warning about this policy within a patch update 🤔

On thing:

Sometimes you are using now:

if(dependee_status STREQUAL "AUTO_OFF")

And sometimes:

if(${qhull_header} STREQUAL "qhull")

So sometimes with ${} and sometimes now. I'm always not sure which variant is better, but looking at this answer, the variant with ${} could be more save even it most cases it doesn't matter.

Yeah, I probably missed some. As I read it(it being documentation, not the link you send, havent read it yet), the ifs should auto dereference variables and so we shouldn't have the ${} as it seems to dereference it twice, which ends up with a empty variable.

I'll have to look through it again more carefully when time permits it.

larshg avatar Jun 07 '21 13:06 larshg