tce-load -i compiletc curl-dev libarchive-dev jsoncpp-dev expat2-dev ncurses-dev

cd cmake-3.8.0

sed -i '/CMAKE_USE_LIBUV 1/s/1/0/' CMakeLists.txt
sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --system-libs --no-system-librhash

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;

make [4m 35.67s]
sudo make install

-- Using system-installed BZIP2
-- Using system-installed CURL
-- Using system-installed EXPAT
-- Using system-installed FORM
-- Using system-installed JSONCPP
-- Using system-installed LIBARCHIVE
-- Using system-installed LIBLZMA
-- Using system-installed LIBUV
-- Using system-installed ZLIB
