comfpile-old/bin/console
2023-08-12 20:39:22 +02:00

33 lines
1 KiB
Ruby
Executable file

#!/usr/bin/env ruby
# frozen_string_literal: true
require "bundler/setup"
require "comfpile"
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
$core = Comfpile::Core.new()
$core.add_artefact_engine Comfpile::FilesourceEngine, root_path: File.join(File.dirname(__FILE__), '../test/faux_build_dir')
$core.add_artefact_engine Comfpile::ConfigLoaderEngine
require_relative 'ghdl_engine.rb'
require_relative 'cpp_engine.rb'
t_start = Time.now()
dep_art = $core.craft_and_complete(:execute, "cpp/main.cpp")
dep_art = $core.craft_and_complete(:execute, "cpp/main2.cpp")
t_end = Time.now()
# t_start = Time.now()
# dep_art = $core.craft_and_complete(:gtkwave_output, "vhdl/spi_master_tb.vhd")
# t_end = Time.now()
# puts "Full dependency list is: #{dep_art.dependencies.map(&:target)} (took #{t_end - t_start})"
# puts "Includes of all source files:"
# (If you use this, don't forget to add pry to your Gemfile!)
require "pry"
Pry.start