| 428 | } |
| 429 | |
| 430 | bool 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 | |
| 479 | bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) |
| 480 | { |
no test coverage detected