class MxxRu::Cpp::SourceSubdirObjPlacement

The generator of folder name for an object file, using a subfolder with a fixed name in a folder with source file. Folder for lib, dll and exe files are not modified. get_obj and get_mswin_res methods are checking if result folder exists. If it's not, they are trying to create it.

Attributes

subdir[R]

Public Class Methods

new( a_subdir = "o" ) click to toggle source
# File lib/mxx_ru/cpp/obj_placement.rb, line 124
def initialize( a_subdir = "o" )
  # The name of subfolder, object files should be located in.
  @subdir = a_subdir.clone
end

Public Instance Methods

get_dll( source_path_name, toolset, target ) click to toggle source
# File lib/mxx_ru/cpp/obj_placement.rb, line 159
def get_dll(
  source_path_name,
  toolset,
  target )

  return String.new( source_path_name )
end
get_exe( source_path_name, toolset, target ) click to toggle source
# File lib/mxx_ru/cpp/obj_placement.rb, line 167
def get_exe(
  source_path_name,
  toolset,
  target )

  return String.new( source_path_name )
end
get_lib( source_path_name, toolset, target ) click to toggle source
# File lib/mxx_ru/cpp/obj_placement.rb, line 151
def get_lib(
  source_path_name,
  toolset,
  target )

  return String.new( source_path_name )
end
get_mswin_res( source_path_name, toolset, target ) click to toggle source
# File lib/mxx_ru/cpp/obj_placement.rb, line 140
def get_mswin_res(
  source_path_name,
  toolset,
  target )

  result = File.join( source_path_name, subdir )
  MxxRu::Util.ensure_path_exists( result )

  return result
end
get_obj( source_path_name, toolset, target ) click to toggle source
# File lib/mxx_ru/cpp/obj_placement.rb, line 129
def get_obj(
  source_path_name,
  toolset,
  target )

  result = File.join( source_path_name, subdir )
  MxxRu::Util.ensure_path_exists( result )

  return result
end