Skip to content

Instantly share code, notes, and snippets.

@yibojiang
Forked from qwo/c11-w.sublime
Created February 25, 2017 23:37
Show Gist options
  • Save yibojiang/b9e63d24da692493884ec7ed8df88e30 to your computer and use it in GitHub Desktop.
Save yibojiang/b9e63d24da692493884ec7ed8df88e30 to your computer and use it in GitHub Desktop.

Revisions

  1. Stanley Zheng created this gist Mar 9, 2014.
    15 changes: 15 additions & 0 deletions c11-w.sublime
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    //ignore being compatible with C++99 and other warnings
    {
    "cmd": ["clang++","-std=c++11", "-w", "-stdlib=libc++", "-Weverything", "${file}", "-o", "${file_path}/${file_base_name}"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.c, source.c++",

    "variants":
    [
    {
    "name": "Run",
    "cmd": ["bash", "-c", "clang++ -w -std=c++11 -stdlib=libc++ -Weverything '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
    }
    ]
    }
    16 changes: 16 additions & 0 deletions c11.sublime-build
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    //with warnings
    //compatible with sublime text 2 and 3
    {
    "cmd": ["clang++","-std=c++11","-stdlib=libc++", "-Weverything", "${file}", "-o", "${file_path}/${file_base_name}"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.c, source.c++",

    "variants":
    [
    {
    "name": "Run",
    "cmd": ["bash", "-c", "clang++ std=c++11 -stdlib=libc++ -Weverything '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
    }
    ]
    }