1CSWRAP(1)                                                            CSWRAP(1)
2
3
4

NAME

6       cswrap - generic compiler wrapper
7

SYNOPSIS

9       cswrap [--help | --print-path-to-wrap]
10

DESCRIPTION

12       cswrap is a generic compiler wrapper that translates relative paths to
13       absolute paths in diagnostic messages. Create a symbolic link to cswrap
14       named as your compiler (gcc, g++, ...) and put it to your $PATH.
15
16       Translated diagnostic messages are decorated by suffix <--[TOOL] if
17       they are produced by a tool named TOOL (given by cswrap invokation via
18       symlink named TOOL). This only applies to translated diagnostic
19       messages, which does not include code snippets, for instance.
20
21       If cswrap is installed on system, the following command activates the
22       wrapper:
23
24           export PATH="`cswrap --print-path-to-wrap`:$PATH"
25

OPTIONS

27       --help
28           Prints basic usage information.
29
30       --print-path-to-wrap
31           Prints path to the directory with symlinks to the cswrap
32           executable.
33

EXIT STATUS

35       cswrap propagates the exit status returned by the compiler (in case
36       cswrap succeeds to run the compiler).
37

ENVIRONMENT VARIABLES

39       CSWRAP_CAP_FILE
40           If set to a non-empty string, cswrap captures diagnostic messages
41           into a file named $CSWRAP_CAP_FILE. In this case, the capture file
42           is protected by a lock named /cswrap_cap_file_lock in order to
43           obtain consistent output when running multiple compiler processes
44           in parallel.
45
46       CSWRAP_TIMEOUT
47           If set to a positive integer, cswrap installs a timeout for the
48           compiler being wrapped. If the specified amount of time (given in
49           seconds) elapses the compiler process is signalled by SIGTERM. Note
50           the cswrap process waits till the compiler process finishes in any
51           case.
52
53       CSWRAP_TIMEOUT_FOR
54           Colon-separated list of programs (compilers) that $CSWRAP_TIMEOUT
55           should be applied to. If $CSWRAP_TIMEOUT_FOR is unset or empty,
56           $CSWRAP_TIMEOUT applies to all programs.
57
58       CSWRAP_DEL_CFLAGS, CSWRAP_DEL_CXXFLAGS
59           cswrap expects a colon-separated list of compiler flags that should
60           be removed from command line prior to invoking the compiler. The
61           parameters are matched for exact match and they are case-sensitive.
62           If a compiler flag appears in the command line multiple times, all
63           its occurrences are removed.  $CSWRAP_DEL_CFLAGS applies to
64           compilation of C sources only.  $CSWRAP_DEL_CXXFLAGS applies to
65           compilation of C++ sources only. Flags to be removed can be
66           specified by shell wildcard patterns (using the format accepted by
67           fnmatch(3)).
68
69       CSWRAP_ADD_CFLAGS, CSWRAP_ADD_CXXFLAGS
70           cswrap expects a colon-separated list of compiler flags that should
71           be appended to command line prior to invoking the compiler. The
72           flags are appended even if they already appear in the command line
73           and they are always appended at the end of the command line.
74           $CSWRAP_ADD_CFLAGS applies to compilation of C sources only.
75           $CSWRAP_ADD_CXXFLAGS applies to compilation of C++ sources only.
76

BUGS

78       Please report bugs and feature requests at
79       https://github.com/csutils/cswrap .
80

AUTHOR

82       Written by Kamil Dudka.
83

COPYING

85       Copyright (C) 2013-2014 Red Hat, Inc. Free use of this software is
86       granted under the terms of the GNU General Public License (GPL). See
87       the COPYING file for details.
88
89
90
91                                  08/31/2021                         CSWRAP(1)
Impressum