class MiniPortileCMake

Public Instance Methods

configure() click to toggle source
# File lib/mini_portile2/mini_portile_cmake.rb, line 18
def configure
  return if configured?

  cache_file = File.join(tmp_path, 'configure.options_cache')
  File.open(cache_file, "w") { |f| f.write computed_options.to_s }

  execute('configure', %w(cmake) + computed_options + ["."])
end
configure_defaults() click to toggle source
# File lib/mini_portile2/mini_portile_cmake.rb, line 8
def configure_defaults
  if MiniPortile.mswin?
    ['-G', 'NMake Makefiles']
  elsif MiniPortile.mingw?
    ['-G', 'MSYS Makefiles']
  else
    []
  end
end
configure_prefix() click to toggle source
# File lib/mini_portile2/mini_portile_cmake.rb, line 4
def configure_prefix
  "-DCMAKE_INSTALL_PREFIX=#{File.expand_path(port_path)}"
end
configured?() click to toggle source
# File lib/mini_portile2/mini_portile_cmake.rb, line 27
def configured?
  configure = File.join(work_path, 'configure')
  makefile  = File.join(work_path, 'CMakefile')
  cache_file  = File.join(tmp_path, 'configure.options_cache')

  stored_options  = File.exist?(cache_file) ? File.read(cache_file) : ""
  current_options = computed_options.to_s

  (current_options == stored_options) && newer?(makefile, configure)
end
make_cmd() click to toggle source
Calls superclass method MiniPortile#make_cmd
# File lib/mini_portile2/mini_portile_cmake.rb, line 38
def make_cmd
  return "nmake" if MiniPortile.mswin?
  super
end