Doesn’t CMake not even have a concept of arrays? I remember reading that functions to generate arrays were really just fancy string concatenaters with quote escaping.
Doesn’t CMake not even have a concept of arrays? I remember reading that functions to generate arrays were really just fancy string concatenaters with quote escaping.
All this is just a gentle slap on the wrist for programming in your build system. Or doing something weird like optimizing a CMake-language JSON parser for performance [2].
1: https://cmake.org/cmake/help/v3.16/module/ExternalProject.ht...
That's an awfully polite way of saying Yes, the CMake scripting language is indeed terrible.
It's meant to be used for complex package-detection logic. CMake Find modules can run hundreds of lines. It's not unreasonable to expect proper support for arrays, proper functions that can return values, a sane syntax, etc.
I've been using CMake for around a decade and I have to say I never experienced anything remotely similar to what you described.
Do you mind sharing a real-world example of something that you struggled with while working with CMake?