`if (${CATKIN_ENABLE_TESTING})` not supported
Closed this issue · 4 comments
I decided to use the more bulletproof if (${CATKIN_ENABLE_TESTING})
, but I keep getting UNGUARDED_TEST_CMD
error.
Why exactly do you think this is more bulletproof? It is vulnerable to spurious variable expansions.
Hmm, I got the impression that the ${}
approach is the preferred one and the other one is going to be abandoned one time... But apparently, I was wrong.
It just seems like a big inconsistency to me... And there is https://cmake.org/cmake/help/latest/policy/CMP0054.html which aims towards the ${}
version without spurious expansions.
And there is https://cmake.org/cmake/help/latest/policy/CMP0054.html which aims towards the
${}
version without spurious expansions.
That is true, but you'd have to use if("${CATKIN_ENABLE_TESTING}")
then (note the extra quotes). I still find if(CATKIN_ENABLE_TESTING)
the simplest and most aesthetically pleasing, but I made catkin_lint
work with both versions.
Thanks!