How to build the release version of Cling from the sources?

I’m building an app with cling embedded in C++. Initially I started working with the binary files from raw.github.com/karies/cling-all … r/clone.sh

The script seems to build the debug configuration though, because the resulting binary files are bigger than the binary distribution files and way too slow for loading files from the interpreter or from the C++ program with cling embedded in it.

How can I build the release version of cling from the sources? I tried adding -DCMAKE_BUILD_TYPE=Release in the configure function in clone.sh and cmake --build . --config Release --target clang cmake --build . --config Release --target cling from the command line but I’m still getting the “slow” version of cling.

Hi,

clone.sh is still using configure / make. Please add --enable-optimized to the configure invocation.

Cheers, Axel.

Thanks Axel, --enable-optimized together with -DCMAKE_BUILD_TYPE=Release did the trick.