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

Method CheckLanguage

Source/cmSourceFile.cxx:285–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void cmSourceFile::CheckLanguage(cm::string_view ext)
286{
287 // Try to identify the source file language from the extension.
288 cmMakefile const* mf = this->Location.GetMakefile();
289 cmGlobalGenerator* gg = mf->GetGlobalGenerator();
290 cm::string_view l = gg->GetLanguageFromExtension(ext);
291 if (!l.empty()) {
292 this->Language = std::string(l);
293 }
294}
295
296bool cmSourceFile::Matches(cmSourceFileLocation const& loc)
297{

Callers 2

CheckExtensionMethod · 0.95
cmSourceFile.cxxFile · 0.80

Calls 4

GetMakefileMethod · 0.45
GetGlobalGeneratorMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected