/usr/share/boost-build/src/tools
Edit: /usr/share/boost-build/src/tools/pgi.jam (4879B)
# Copyright Noel Belcourt 2007.
# Copyright 2017, NVIDIA CORPORATION.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import property ;
import generators ;
import os ;
import toolset : flags ;
import feature ;
import fortran ;
import type ;
import common ;
import gcc ;
feature.extend toolset : pgi ;
toolset.inherit pgi : unix ;
generators.override pgi.prebuilt : builtin.lib-generator ;
generators.override pgi.searched-lib-generator : searched-lib-generator ;
# Documentation and toolchain description located
# http://www.pgroup.com/resources/docs.htm
rule init ( version ? : command * : options * )
{
local condition = [ common.check-init-parameters pgi : version $(version) ] ;
local l_command = [ common.get-invocation-command pgi : pgc++ : $(command) ] ;
common.handle-options pgi : $(condition) : $(l_command) : $(options) ;
command_c = $(command_c[1--2]) $(l_command[-1]:B=pgcc) ;
toolset.flags pgi CONFIG_C_COMMAND $(condition) : $(command_c) ;
flags pgi.compile DEFINES $(condition) :
[ feature.get-values
: $(options) ] : unchecked ;
# set link flags
flags pgi.link FINDLIBS-ST : [
feature.get-values : $(options) ] : unchecked ;
}
# Declare generators
generators.register-c-compiler pgi.compile.c : C : OBJ : pgi ;
generators.register-c-compiler pgi.compile.c++ : CPP : OBJ : pgi ;
generators.register-fortran-compiler pgi.compile.fortran : FORTRAN : OBJ : pgi ;
# Declare flags and actions for compilation
flags pgi.compile.c++ OPTIONS 98 : -std=c++03 ;
flags pgi.compile.c++ OPTIONS 03 : -std=c++03 ;
flags pgi.compile.c++ OPTIONS 0x : -std=c++11 ;
flags pgi.compile.c++ OPTIONS 11 : -std=c++11 ;
flags pgi.compile.c++ OPTIONS 1y : -std=c++14 ;
flags pgi.compile.c++ OPTIONS 14 : -std=c++14 ;
flags pgi.compile.c++ OPTIONS 1z : -std=c++17 ;
flags pgi.compile.c++ OPTIONS 17 : -std=c++17 ;
flags pgi.compile.c++ OPTIONS 2a : -std=c++17 ;
flags pgi.compile.c++ OPTIONS 20 : -std=c++17 ;
flags pgi.compile.c++ OPTIONS latest : -std=c++17 ;
flags pgi.compile OPTIONS shared : -fpic ;
flags pgi.compile OPTIONS on : -gopt ;
flags pgi.compile OPTIONS off : -O0 ;
flags pgi.compile OPTIONS speed : -fast ;
flags pgi.compile OPTIONS space : -fast ;
flags pgi.compile OPTIONS off : -Minform=severe ;
flags pgi.compile OPTIONS on : -Minform=warn ;
flags pgi.compile OPTIONS all : -Minform=warn ;
flags pgi.compile OPTIONS extra : -Minform=inform ;
flags pgi.compile OPTIONS pedantic : -Minform=inform ;
flags pgi.compile OPTIONS on : -Werror ;
flags pgi.compile.c++ OPTIONS off : --no_rtti ;
flags pgi.compile.c++ OPTIONS off : --no_exceptions ;
flags pgi.compile OPTIONS ;
flags pgi.compile.c++ OPTIONS ;
flags pgi.compile DEFINES ;
flags pgi.compile INCLUDES ;
flags pgi.compile.fortran OPTIONS ;
actions compile.c
{
"$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions compile.c++
{
"$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions compile.fortran
{
"$(CONFIG_F_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
# Declare flags and actions for linking
flags pgi.link OPTIONS on : -gopt ;
# Strip the binary when no debugging is needed
flags pgi.link OPTIONS off : -s ;
flags pgi.link OPTIONS ;
flags pgi.link OPTIONS shared : -fpic ;
flags pgi.link LINKPATH ;
flags pgi.link FINDLIBS-ST ;
flags pgi.link FINDLIBS-SA ;
flags pgi.link FINDLIBS-SA multi : pthread rt ;
flags pgi.link LIBRARIES ;
flags pgi.link LINK-RUNTIME static : static ;
flags pgi.link LINK-RUNTIME shared : dynamic ;
flags pgi.link RPATH ;
rule link ( targets * : sources * : properties * )
{
SPACE on $(targets) = " " ;
}
actions link bind LIBRARIES
{
"$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
}
# Slight mods for dlls
rule link.dll ( targets * : sources * : properties * )
{
SPACE on $(targets) = " " ;
}
actions link.dll bind LIBRARIES
{
"$(CONFIG_COMMAND)" $(OPTIONS) -shared -L"$(LINKPATH)" -R"$(RPATH)" -soname $(<[-1]:D=) -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
}
actions updated together piecemeal pgi.archive
{
ar -rc$(ARFLAGS:E=) "$(<)" "$(>)"
}