Skip to content

MSBuild .LOG support of Visual Studio 2022: Platform toolset v143 #2491

@guwirth

Description

@guwirth

Support Visual Studio 2022 / Platform toolset v143 with sensor sonar.cxx.msbuild.reportPaths:
https://github.com/SonarOpenCommunity/sonar-cxx/wiki/sonar.cxx.msbuild.reportPaths

todo:

private boolean setPlatformToolsetFromLine(String line) {

private void parseVCppCompilerCLLine(String line, String projectPath, String fileElement) {

void parseV143CompilerOptions(String line, String fileElement) {
   // Visual Studio 2022 RTW (17.5)
   addMacro("__cplusplus=201402L", fileElement); // C++14
   // __cplusplus_winrt Defined when you use the /ZW option to compile. The value of __cplusplus_winrt is 201009.
   if (line.contains("/ZW ")) {
      addMacro("__cplusplus_winrt=201009", fileElement);
   }
   addMacro("_MSC_VER=1935", fileElement);
   addMacro("_MSC_FULL_VER=193532215", fileElement);
   addMacro("_MFC_VER=0x0E00", fileElement);
   addMacro("_ATL_VER=0x0E00", fileElement);
}

Someone has Visual Studio installed able to provide the ??? values.

See also #2490

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions