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

Method ProcessGeneratorToolsetField

Source/cmGlobalVisualStudio10Generator.cxx:430–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430bool cmGlobalVisualStudio10Generator::ProcessGeneratorToolsetField(
431 std::string const& key, std::string const& value)
432{
433 if (key == "cuda"_s) {
434 /* test if cuda toolset is path to custom dir or cuda version */
435 auto pos = value.find_first_not_of("0123456789.");
436 if (pos != std::string::npos) {
437 this->GeneratorToolsetCudaCustomDir = value;
438 /* ensure trailing backslash for easy path joining */
439 if (this->GeneratorToolsetCudaCustomDir.back() != '\\') {
440 this->GeneratorToolsetCudaCustomDir.push_back('\\');
441 }
442 /* check for legacy toolkit folder structure */
443 if (cmsys::SystemTools::FileIsDirectory(
444 cmStrCat(this->GeneratorToolsetCudaCustomDir, "nvcc"))) {
445 this->GeneratorToolsetCudaNvccSubdir = "nvcc\\";
446 }
447 if (cmsys::SystemTools::FileIsDirectory(
448 cmStrCat(this->GeneratorToolsetCudaCustomDir,
449 "CUDAVisualStudioIntegration"))) {
450 this->GeneratorToolsetCudaVSIntegrationSubdir =
451 "CUDAVisualStudioIntegration\\";
452 }
453 } else {
454 this->GeneratorToolsetCuda = value;
455 }
456 return true;
457 }
458 if (key == "customFlagTableDir"_s) {
459 this->CustomFlagTableDir = value;
460 cmSystemTools::ConvertToUnixSlashes(this->CustomFlagTableDir);
461 return true;
462 }
463 if (key == "fortran"_s) {
464 this->GeneratorToolsetFortran = value;
465 return true;
466 }
467 if (key == "version"_s) {
468 this->GeneratorToolsetVersion = value;
469 return true;
470 }
471 if (key == "VCTargetsPath"_s) {
472 this->CustomVCTargetsPath = value;
473 ConvertToWindowsSlashes(this->CustomVCTargetsPath);
474 return true;
475 }
476 return false;
477}
478
479bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf)
480{

Callers 1

ParseGeneratorToolsetMethod · 0.95

Calls 5

ConvertToWindowsSlashesFunction · 0.85
find_first_not_ofMethod · 0.80
push_backMethod · 0.80
cmStrCatFunction · 0.70
backMethod · 0.45

Tested by

no test coverage detected