{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "."
        }
    ],

    "build_systems":
    [
        {
            "name": "[Hana] Build current file",
            "selector": "source.c++",
            "working_dir": "$project_path/build",
            "cmd": ["ruby"
                , "-r", "pathname"
                , "-e", "project = Pathname.new('${project_path}')"
                , "-e", "file = Pathname.new('${file}').relative_path_from(project)"
                , "-e", "target = file.sub_ext('').to_s.gsub('/', '.')"
                , "-e", "system('/usr/local/bin/cmake', '--build', '$project_path/build', '--target', target)"
            ],
            "variants": [
                {
                    "name": "Primary Quick Build",
                    "cmd": ["ruby"
                        , "-r", "pathname"
                        , "-e", "project = Pathname.new('${project_path}')"
                        , "-e", "file = Pathname.new('${file}').relative_path_from(project)"
                        , "-e", "target = file.sub_ext('').to_s.gsub('/', '.')"
                        , "-e", "system('/usr/local/bin/cmake', '--build', '$project_path/build', '--target', target)"
                        , "-e", "system('/usr/local/bin/ctest', '-V', '--output-on-failure', '-R', target)"
                    ]
                }
            ]
        }
    ]
}