[feature suggestion] target_precompile_headers should allow to set definitions for the header precompilation process
Some headers need to be compiled with special defines.
Use case: in the mlpack project the header <mlpack.hpp>
sometimes needs to be compiled with a special defined symbol, like in this example.
Currently add_definitions
needs to be used in the folder, which would set this definition on every C++ module. This isn't what is desired. Only one header and potentially one module should get such special definition.
I suggest to add the DEFINITIONS section to target_precompile_headers, so that it would look like this:
target_precompile_headers(<target>
<INTERFACE|PUBLIC|PRIVATE> [header1...]
[<INTERFACE|PUBLIC|PRIVATE> [header2...] ...]
[DEFINITIONS [-DDEF1] ...]
)