It will build the first folder that is in the side bar. If no folder is setup in the sidebar it will compile the folder of the active file (so you can just open main.lua and build the project)
This setup requires a project with a specific structure. The main folder should contain the CMakeLists.txt, a Source folder (which contains lua source file, pdxinfo, assets), a src folder (with all the C source files), the .sublime-project file.
You should run CMake All first (it will create buildDevice and buildSimulator folders). When developing, use the build for the simulator. If you need to run your game on the device, use the Device build.
It requires to have all the files for the game in a "Source" folder on the level of the project file.
For lua project, simply use the default build.
For C projects, you should use CMake All first and after build for the Simulator or the Device.