It should be correct - or at least, it works for what I use it for :)
What is odd about it?
What is odd about it?
In code-reviews I still occasionally have to complain about the
if (condition){
// 100 lines of code
}else{
// 20 lines of code
}
pattern.As we're dealing with a language that has a proper subroutines and a return statement, this can just be refactored away.
But CMake might not have either of those (I don't know - I have only ever written a single trivial CMakeLists.txt), so it might just force this pattern and then it's helpful to also enforce the else to restate the condition.