def is_enabled(self):
"""You may only run this command if there's a `build_folder` with a
`CMakeCache.txt` file in it. That's when we assume that the project has
been configured."""
try:
build_folder = self.window.project_data()["settings"]["cmake"]["build_folder"]
build_folder = sublime.expand_variables(build_folder, self.window.extract_variables())
return os.path.exists(os.path.join(build_folder, "CMakeCache.txt"))
except Exception as e:
return False
评论列表
文章目录