Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@PIlin
PIlin / gist:7671239
Last active December 29, 2015 12:29 — forked from zeux/gist:7668396
struct Node
{
Node* child;
};
// void gatherDescendants(std::vector<Node*>& target, Node* root)
// {
// if (root->child)
// {
// target.push_back(root->child);
# Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135
# Create the database with cmake with for example: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
# or you could have set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in your CMakeLists.txt
# Usage within SublimeClang:
# "sublimeclang_options_script": "python ${home}/code/cmake_options_script.py ",
# 2013.01.26: Pavlo Ilin
# - Removed the usage of cache file - if cmake-scripts are changed often,
# cache file quickly becomes old and wrong.
# - Will recursively go up in directory tree and try to find compile_commands.json