Open wAuner opened 1 year ago
Can you show me such a command that you can store for a file?
Are you refering to single file compilation?
Yes I'm referring to single file compilation. In CodeRunner I can set the compile flags per file which is super handy.
So a use case would be:
Main1.cc -> Use a Regular Compiler Warnings set Main2.cc -> Compile it with different Compiler Warnings
Without changing the settings.json.
IMHO i dont like having another place of setting any settings for the extension
yes but of course not only warnings, but the entire command line, including linker flags, include paths etc.
One solution could be to add a dictionary of filename->command mappings in the settings.json.
"C_Cpp_Runner.fileSpecificCompilerArgs": {
"main.cpp": {
"cppStandard": "-std=c++2b",
"linkerArgs": ["$inherited", "-lpcap", "-lfmt"]
}
}
So there would be a global or default setting but the user can overwrite or inherit and extend from the global settings.
Hi,
is it possible to associate a specific compile command per file? I've been using CodeRunner on macOS which lets you define the specific compile command per file. That's absolutely awesome for experiments. I usually keep a directory with snippets/experiments and would it be quite annoying to have to put them all in their separate directory.