How to upgrade cmake in Ubuntu

CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.6.0 or higher is required. You are running version 3.5.1 -- Configuring incomplete, errors occurred! I know Ubuntu uses stable