Sha256: 1057627eee6cb9f5dea0d9efeaea1eac3027436cc4f8ed0aed1ccd338ea284ce

Contents?: true

Size: 808 Bytes

Versions: 4

Compression:

Stored size: 808 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)
unless res
  logger.warn("problems while executing #{cl}")
  exit res
end

if output.length > 0
  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
exit 0

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gcc-to-clang-analyzer-0.0.8 bin/g++
gcc-to-clang-analyzer-0.0.7 bin/g++
gcc-to-clang-analyzer-0.0.6 bin/g++
gcc-to-clang-analyzer-0.0.5 bin/g++