Sha256: c52c4d881052ee397a366dc34265a1c3e43917e255f171cebb42dc4ac5dcb68a

Contents?: true

Size: 712 Bytes

Versions: 1

Compression:

Stored size: 712 Bytes

Contents

#!/usr/bin/env ruby

require 'gcc_to_clang_analyzer/prepare_compiler_commandline'
require 'gcc_to_clang_analyzer/rewrite_plist_file'
require 'logger'
logger = Logger.new(STDOUT)
logger.level = Logger::WARN
logger.debug("original #{ARGV.join(' ')}")

command_line, output = PrepareCompilerCommandline.transform(ARGV)

cl = command_line.join(' ')
logger.info("executing '#{cl}'")
            
res = system(cl)
if res
  workspace_path = File.absolute_path('..')
  prefix = File.absolute_path('.').gsub(workspace_path+'/', '')
  tmp_output = output + ".tmp"
  File.open(tmp_output, 'w') do |io|
    io << RewritePlistFile.with_prefix(prefix, output)
  end
  File.delete(output)
  File.rename(tmp_output, output)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gcc-to-clang-analyzer-0.0.1 bin/g++