Skip to content

C preprocessor

Matt Windsor edited this page Jan 8, 2019 · 1 revision

act can be configured to run a C preprocessor on C and C/Litmus files. Since act doesn't understand C preprocessor directives on its own, this is needed to work with the vast majority of compilable C files. (Generally, Herd and Litmus handle standard library includes on their own, and therefore the C preprocessor isn't strictly necessary for C/Litmus files).

The cpp configuration block

To tell act how to invoke the C preprocessor, add a cpp block to act.conf:

cpp {
  enabled BOOL   # whether or not the C preprocessor should be run (default true)
  cmd STRING     # the command to run for C preprocessing
  argv [STRING]  # one or more arguments to send to the command named above
}
Clone this wiki locally