Updated CMake script and imrpove linux comp.