Sha256: cc2c814bb72a16250f992055666c03ce3d2d71765cc80ef66c3289910db914ad
Contents?: true
Size: 948 Bytes
Versions: 4
Compression:
Stored size: 948 Bytes
Contents
# frozen_string_literal: true require 'json' require_relative 'tooling' require 'rake/clean' namespace :tooling do file 'compile_commands.json' do Dir.chdir(Tooling.build_dir) do cp 'compile_commands.json', Rake.original_dir end end file '.color_coded' do commands = [] JSON.parse(File.read('compile_commands.json')).each do |commanddef| commands << commanddef['command'].split(' ')[2..-4] end commands = [Tooling::PRE_COMPILE_FLAGS, commands.uniq, Tooling::POST_COMPILE_FLAGS] puts 'Generating .color_coded...' File.open('.color_coded', 'w') { |io| io.puts commands } puts 'Done' end CLEAN.include('.color_coded') CLEAN.include('compile_commands.json') desc 'Generate vim tooling' task default: ['compile_commands.json', '.color_coded'] end desc 'Generate vim tooling (color_coded and youcompleteme)' task tooling: [:compile, 'tooling:default']
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
faster_support-0.2.1 | lib/tasks/tooling.rake |
faster_support-0.2.0 | lib/tasks/tooling.rake |
faster_support-0.1.4 | lib/tasks/tooling.rake |
faster_support-0.1.3 | lib/tasks/tooling.rake |