++ed by:
DMOL POTATOGIM BRDUCH BEROV MHOWARD

14 PAUSE users
7 non-PAUSE users.

Author image Yuki Kimoto

NAME

SPVM::Builder::Config - build config

DESCRIPTION

SPVM::Builder::Config is configuration of c/c++ compile and link.

Methods

new

  my $bconf = SPVM::Builder::Config->new;
  

Create SPVM::Builder::Config object.

replace_all_config

  my $config = {cc => 'g++', ld => 'g++'};
  $bconf->replace_all_config($config);

Replace all config.

All of old configs is removed and added new config.

to_hash

  my $config = $bconf->to_hash;

Convert configs to hash reference.

get_config

  my $cc = $bconf->get_config('cc');

Get a config value.

set_config

  $bconf->set_config(cc => $cc);

Set a config value.

set_std

  $bconf->set_std('gnu99');

Set std.

Internally, remove -std=old if exists and add -std=new after extra_compiler_flags.

delete_std

  $bconf->delete_std;

Delete std.

Internally, remove -std=old if exists from extra_compiler_flags.

set_cc

  $bconf->set_cc($cc);

Set cc.

get_cc

  my $cc = $bconf->get_cc;

Get cc.

set_optimize

  $bconf->set_optimize($optimize);

Set optimize.

get_optimize

  my $optimize = $bconf->get_optimize;

Get optimize.

set_ld

  $bconf->set_ld($ld);

Set ld.

get_ld

  my $ld = $bconf->get_ld;

Get ld.

set_lddlflags

  $bconf->set_lddlflags($lddlflags);

Set lddlflags.

get_lddlflags

  my $lddlflags = $bconf->get_lddlflags;

Get lddlflags.

add_lddlflags

  $bconf->add_lddlflags($lddlflags);

Add lddlflags after current lddlflags.

new_c99

  my $bconf = SPVM::Builder::Config->new_c99;

Create defaulgt build config. This is SPVM::Builder::Config object.

get_extra_compiler_flags

  my $extra_compiler_flags = $bconf->get_extra_compiler_flags;

Get extra_compiler_flags.

set_extra_compiler_flags

  $bconf->set_extra_compiler_flags($extra_compiler_flags);

Set extra_compiler_flags.

add_extra_compiler_flags

  $bconf->add_extra_compiler_flags($extra_compiler_flags);

Add new extra_compiler_flags after current extra_compiler_flags.

get_extra_linker_flags

  my $extra_linker_flags = $bconf->get_extra_linker_flags;

Get extra_linker_flags.

set_extra_linker_flags

  $bconf->set_extra_linker_flags($extra_linker_flags);

Set extra_linker_flags.

add_extra_linker_flags

  $bconf->add_extra_linker_flags($extra_linker_flags);

Add new extra_linker_flags after current extra_linker_flags.

get_include_dirs

  my $include_dirs = $bconf->get_include_dirs;

Get include_dirs field. This field is array refernce.

include_dirs field is used by compile method of SPVM::Builder::CC to set -inculde_dir.

Default is "SPVM/Builder/include" of one up of directory SPVM::Buidler::Config.pm loaded and the values of -include_dir in $Config{ccflags}.

set_include_dirs

  $bconf->set_include_dirs($include_dirs);

Set include_dirs field. This field is array refernce.

See get_include_dirs method about include_dirs field.

add_lib_dirs

  $bconf->add_lib_dirs($lib_dir1, $lib_dir2, ...);

Add a element before the first element of lib_dirs field.

See get_lib_dirs method about lib_dirs field.

get_lib_dirs

  my $lib_dirs = $bconf->get_lib_dirs;

Get lib_dirs field. This field is array refernce.

lib_dirs field is used by compile method of SPVM::Builder::CC to set -lib_dir.

Default is the values of -lib_dir in $Config{lddlflags}.

set_lib_dirs

  $bconf->set_lib_dirs($lib_dirs);

Set lib_dirs field. This field is array refernce.

See get_lib_dirs method about lib_dirs field.

add_lib_dirs

  $bconf->add_lib_dirs($lib_dir1, $lib_dir2, ...);

Add a element before the first element of lib_dirs field.

See get_lib_dirs method about lib_dirs field.

add_lib_dirs

  $bconf->add_lib_dirs($lib_dir1, $lib_dir2, ...);

Add a element before the first element of lib_dirs field.

See get_lib_dirs method about lib_dirs field.

get_libs

  my $libs = $bconf->get_libs;

Get libs field. This field is array refernce.

libs field is used by link method of SPVM::Builder::CC to set -l<lib>.

set_libs

  $bconf->set_libs($libs);

Set libs field. This field is array refernce.

See get_libs method about libs field.

use_lib

  $bconf->use_lib($lib1, $lib2, ...);

Add a library after the last element of libs field.

Don't use prefix '-l' or 'lib' for library name.

See get_libs method about libs field.

get_force_compile

  my $force_compile = $bconf->get_force_compile;

Get force_compile field.

force_compile field is used by compile method of SPVM::Builder::CC to determine whether the method should force compilation of source codes without cache.

set_force_compile

  $bconf->set_force_compile($force_compile);

Set force_compile field.

See get_force_compile method about force_compile field.

quiet

  my $quiet = $bconf->get_quiet;

Get quiet field.

quiet field is used by compile method of SPVM::Builder::CC to determine whether the method output compiler messages , default to 1.

set_quiet

  $bconf->set_quiet($quiet);

Set quiet field.

See get_quiet method about quiet field.