| 1090 | } |
| 1091 | |
| 1092 | void cmGlobalFastbuildGenerator::AddLauncher(std::string const& prefix, |
| 1093 | std::string const& launcher, |
| 1094 | std::string const& language, |
| 1095 | std::string const& args) |
| 1096 | { |
| 1097 | if (this->Compilers.find(prefix + language) != this->Compilers.end()) { |
| 1098 | return; |
| 1099 | } |
| 1100 | LogMessage("Launcher: " + launcher); |
| 1101 | LogMessage("Launcher args: " + args); |
| 1102 | FastbuildCompiler compilerDef; |
| 1103 | compilerDef.Name = prefix + language; |
| 1104 | compilerDef.Args = args; |
| 1105 | if (cmSystemTools::FileIsFullPath(launcher)) { |
| 1106 | compilerDef.Executable = launcher; |
| 1107 | } else { |
| 1108 | // FASTBuild needs an absolute path to the executable. |
| 1109 | compilerDef.Executable = cmSystemTools::FindProgram(launcher); |
| 1110 | if (compilerDef.Executable.empty()) { |
| 1111 | cmSystemTools::Error("Failed to find path to " + launcher); |
| 1112 | return; |
| 1113 | } |
| 1114 | } |
| 1115 | // When CTest is used as a launcher, there is an interesting env variable |
| 1116 | // "CTEST_LAUNCH_LOGS" which is set by parent CTest process and is expected |
| 1117 | // to be read from global (sic!) env by the launched CTest process. So we |
| 1118 | // will need to make this global env available for CTest executable used as a |
| 1119 | // "launcher". Tested in RunCMake.ctest_labels_for_subprojects test.. |
| 1120 | compilerDef.DontUseEnv = true; |
| 1121 | this->Compilers[compilerDef.Name] = std::move(compilerDef); |
| 1122 | } |
| 1123 | |
| 1124 | std::string cmGlobalFastbuildGenerator::ConvertToFastbuildPath( |
| 1125 | std::string const& path) const |
no test coverage detected