CMake Builds with SublimeText and Atom
Mar 3, 2016

Both configurations will create a “build” folder for all the cmake generated files.

SublimeText 3

  1. Create a project file or edit your existing one.
  2. {
     "project_name": "<PROJECT NAME>",
     "folders":
     [
         {
             "path": "."
         }
     ],
     "build_systems":
     [
         {
             "name": "cmake",
             "working_dir": "${project_path}",
             "shell_cmd": "mkdir build ; cd build && cmake .. && make -j8",
             "shell": true
         }
     ]
    }
    
  3. Use Project -> Open Project from now on instead of opening the folder.

CTRL + B to build.

Atom

  1. Install the Atom Build package
  2. Create a new custom build file in the root of your project folder called .atom-build.json
    {
     "cmd": "mkdir build ; cd build && cmake .. && make -j8",
     "name": "cmake",
     "sh": true,
     "cwd": "{PROJECT_PATH}"
    }
    
  3. Refresh the build.
    1. CTRL + P
    2. “Build: Refresh Targets”

F9 to build.

Comments