VS: Override FlagTables values per project
I'm trying to add support for a particular platform in my project, and it uses MSVC as generator but not as compiler.
To enable the multi processor compilation, we usually add the flag /MC
, but doing so in my case won't work (since the compiler isn't MSVC). What is working is changing the flag table json for my platform, by setting something like that:
{
"name": "MultiProcessorCompilation",
"switch": "",
"comment": "Multi-processor Compilation",
"value": "true",
"flags": [
"UserValue",
"UserIgnored",
"Continue"
]
}
Doing so enables the multi processor compilation, but changing a file in the cmake install directory bothers me, I would rather like to have it in my project (since other people will have to also change it and would have to do the change for every single cmake installation)
So, is there a way in a cmake project to override the values specified in the FlagTables json files? I was giving an example with MultiProcessorCompilation, but I also have similar problems with other flags such as the ones for precompiled headers.