MCPcopy Create free account
hub / github.com/Kitware/CMake / ParseVersion

Method ParseVersion

Source/cmVisualStudioWCEPlatformParser.cxx:13–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include "cmSystemTools.h"
12
13int cmVisualStudioWCEPlatformParser::ParseVersion(char const* version)
14{
15 std::string const registryBase =
16 cmGlobalVisualStudioGenerator::GetRegistryBase(version);
17 std::string const vckey = cmStrCat(registryBase, "\\Setup\\VC;ProductDir");
18 std::string const vskey = cmStrCat(registryBase, "\\Setup\\VS;ProductDir");
19
20 if (!cmSystemTools::ReadRegistryValue(vckey, this->VcInstallDir,
21 cmSystemTools::KeyWOW64_32) ||
22 !cmSystemTools::ReadRegistryValue(vskey, this->VsInstallDir,
23 cmSystemTools::KeyWOW64_32)) {
24 return 0;
25 }
26 cmSystemTools::ConvertToUnixSlashes(this->VcInstallDir);
27 cmSystemTools::ConvertToUnixSlashes(this->VsInstallDir);
28 this->VcInstallDir.append("//");
29
30 std::string const configFilename =
31 cmStrCat(this->VcInstallDir, "vcpackages/WCE.VCPlatform.config");
32
33 return this->ParseFile(configFilename.c_str());
34}
35
36std::string cmVisualStudioWCEPlatformParser::GetOSVersion() const
37{

Callers

nothing calls this directly

Calls 4

appendMethod · 0.80
c_strMethod · 0.80
cmStrCatFunction · 0.70
ParseFileMethod · 0.45

Tested by

no test coverage detected