I don't know much about CMake, but to me the two conditions look the same, but maybe this is just how CMake magically works.
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.