What is the actual difference between `CMake` and `NDK` build in android studio project. I already went through google documentation but the concept is not clear yet. As per google documentation:

**The Android Native Development Kit (NDK):** a toolset that allows you
 to use C and C++ code with Android, and provides platform libraries
 that allow you to manage native activities and access the physical device
 components, such as sensors and touch input.

**CMake:** an external build tool that works alongside Gradle to build
 your native library. You do not need this component if you only plan
 to use ndk-build.

Can anyone has a better explanation with an example when we need to use what?