Allowing CMake functions to return(value)
A semi-relevant rant about CMake, for those interested in that kind of thing:<p>The CMake scripting language is just awful. It breaks with convention to do things in its own unintuitive way. (Who though the <i>endfunction()</i> syntax was a good idea? Or the bizarre function-call syntax?) It&#x27;s error-prone, it shows cryptic error-messages, it&#x27;s able to break in subtle ways, much of the documentation is for deprecated functionality, and worst of all, it lacks a consistent design pattern. One shouldn&#x27;t have to <i>think</i> when making a <i>Find...</i> CMake script so that CMake can find an installed package. It should be a very boring task of adapting existing boilerplate. But it&#x27;s not so. It&#x27;s an agonising uphill battle with this atrocious language.<p>Subtle bugs like [0] wouldn&#x27;t even be possible in a well-designed build-system, but CMake lets you shoot yourself in the foot as punishment for not knowing its every subtlety.<p>It&#x27;s unfortunate that CMake is the least bad build system we have. You should probably still use CMake for multi-platform code. You shouldn&#x27;t expect people to learn some obscure rival build-system just to work on your code. I&#x27;ll certainly continue using CMake for what little C++ I write myself.  Once you&#x27;ve beaten your CMake scripts into submission (generally thanks to the extensive body of knowledge on StackOverflow, in my experience), CMake works a treat on a bunch of different platforms. It&#x27;s just a pity the language is so terrible.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;dankamongmen&#x2F;notcurses&#x2F;issues&#x2F;711" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dankamongmen&#x2F;notcurses&#x2F;issues&#x2F;711</a>