Skip to content

Commit 2dc9578

Browse files
committed
Added option to override the automatic language standard for the requirements parser
1 parent 89880a0 commit 2dc9578

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CompileScore/Shared/Editor/Extractors/ExtractorBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ protected void AddCustomSettings(ProjectProperties projProperties, IMacroEvaluat
121121
AppendMSBuildStringToList(projProperties.PrepocessorDefinitions, evaluator.Evaluate(evaluatorExtra.Evaluate(customSettings.AdditionalPreprocessorDefinitions)));
122122
projProperties.ExtraArguments += evaluator.Evaluate(evaluatorExtra.Evaluate(customSettings.AdditionalCommandLine));
123123
projProperties.ShowWarnings = customSettings.EnableWarnings;
124+
projProperties.Standard = customSettings.LanguageStandard != ProjectProperties.StandardVersion.Default ? customSettings.LanguageStandard : projProperties.Standard;
124125
}
125126
}
126127
}

CompileScore/Shared/Settings/SolutionSettings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public class ParserSettings
6565
[UIDescription(Label = "Automatic Extraction", Tooltip = "If true, it will try to extract the architecture, include paths, preprocessor macros... from the current solution.")]
6666
public bool AutomaticExtraction { set; get; } = true;
6767

68+
[UIDescription(Label = "Language Standard", Tooltip = "The Language standard to use when invoking the parser (Default) for untouched.")]
69+
public ProjectProperties.StandardVersion LanguageStandard { set; get; } = ProjectProperties.StandardVersion.Default;
70+
6871
[UIDescription(Label = "Explicit Commands File", FilterMethod = "DisplayCMakeCommandsFile", Tooltip = "File location for the build commands exported by CMAKE_EXPORT_COMPILE_COMMANDS=1 (This fields allows a limited set of $(SolutionDir) style macros)")]
6972
public string CMakeCommandsFile { set; get; } = "";
7073

@@ -85,7 +88,6 @@ public class ParserSettings
8588

8689
[UIDescription(Label = "Parser Output Folder", Tooltip = "File location where the Clang Parser will output the layout results. This files are temporary. This field will default to the extension installation folder. (This fields allows $(SolutionDir) style macros)")]
8790
public string ParserOutputFolder { set; get; } = "";
88-
8991
};
9092

9193

0 commit comments

Comments
 (0)