I try to understand cmake build configuration. As an example, I copied Kaleidoscope from llvm examples to some other directory (e.g., /tmp/Kaleidoscope). What change(s) that I need to make to “CMakkeLists.txt” in order to build Kaleidoscope from /tmp/Kaleidoscope?
A lot. The examples are not designed to be built in this way, and it is not advised. If you go down that path you are way off in uncharted territory, and shouldn’t expect much help.
Can you advise some recommendable build configuration?
The LLVM documentation describes the recommended build process:
Adding “-DLLVM_BUILD_EXAMPLES=On” enables building the example projects.