CMakeLists.txt is a listfile which plays the role of entry point for current source directory. CMake processing will start from top level CMakeLists.txt in source tree and continue with other dependent CMakeLists.txt files added by add_subdirectory directive. Each add_subdirectory will create new node in the source/binary tree hierarchy and introduce new scope for variables.

CMake documentation