Don't repeat conditions in endif, endfunction, endmacro etc

Use cmakelint to check for this
Merge pull request #15 from smspillaz/cmake-determine-header-language.item_13

Don't repeat conditions in endif, endfunction, endmacro etc