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

Method AddIDEProject

Source/cmGlobalFastbuildGenerator.cxx:1916–1952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1914}
1915
1916void cmGlobalFastbuildGenerator::AddIDEProject(
1917 FastbuildTargetBase const& target, std::string const& config)
1918{
1919 auto const& configs = GetConfigNames();
1920 if (std::find(configs.begin(), configs.end(), config) == configs.end()) {
1921 LogMessage("Config " + config + " doesn't exist, IDE projest for " +
1922 target.Name + " won't be generated");
1923 return;
1924 }
1925 auto& IDEProject = IDEProjects[target.BaseName];
1926 auto const relativeSubdir = cmSystemTools::RelativePath(
1927 this->GetCMakeInstance()->GetHomeDirectory(), target.BasePath);
1928 // VS
1929 auto& VSProject = IDEProject.first;
1930 VSProject.Alias = cmStrCat(target.BaseName, FASTBUILD_VS_PROJECT_SUFFIX);
1931 VSProject.ProjectOutput = cmStrCat("VisualStudio/Projects/", relativeSubdir,
1932 '/', target.BaseName + ".vcxproj");
1933 VSProject.ProjectBasePath = target.BasePath;
1934 VSProject.folder = relativeSubdir;
1935 VSProject.deps = target.PreBuildDependencies;
1936 // XCode
1937 auto& XCodeProject = IDEProject.second;
1938 XCodeProject.Alias = target.BaseName + "-xcodeproj";
1939 XCodeProject.ProjectOutput =
1940 cmStrCat("XCode/Projects/", relativeSubdir, '/',
1941 target.BaseName + ".xcodeproj/project.pbxproj");
1942 XCodeProject.ProjectBasePath = target.BasePath;
1943
1944 IDEProjectConfig VSConfig;
1945 VSConfig.Platform = "X64";
1946 IDEProjectConfig XCodeConfig;
1947 VSConfig.Target = XCodeConfig.Target = target.Name;
1948 VSConfig.Config = XCodeConfig.Config = config.empty() ? "DEFAULT" : config;
1949
1950 VSProject.ProjectConfigs.emplace_back(std::move(VSConfig));
1951 XCodeProject.ProjectConfigs.emplace_back(std::move(XCodeConfig));
1952}
1953
1954bool cmGlobalFastbuildGenerator::IsExcluded(cmGeneratorTarget* target)
1955{

Callers 2

GenerateMethod · 0.80
GenerateMethod · 0.80

Calls 8

moveFunction · 0.85
emplace_backMethod · 0.80
cmStrCatFunction · 0.70
findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
GetCMakeInstanceMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected