|
|
|
|
|
|
|
|
auto ext_found |
|
|
auto ext_found |
|
|
= std::lower_bound(header_exts.begin(), header_exts.end(), p.extension(), std::less<>()); |
|
|
= std::lower_bound(header_exts.begin(), header_exts.end(), p.extension(), std::less<>()); |
|
|
if (ext_found != header_exts.end() && *ext_found == p.extension()) { |
|
|
if (ext_found != header_exts.end() && *ext_found == p.extension()) { |
|
|
|
|
|
auto stem = p.stem(); |
|
|
|
|
|
if (stem.extension() == ".config") { |
|
|
|
|
|
return source_kind::header_template; |
|
|
|
|
|
} |
|
|
return source_kind::header; |
|
|
return source_kind::header; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return std::nullopt; |
|
|
return std::nullopt; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (ends_with(p.stem().string(), ".test")) { |
|
|
|
|
|
|
|
|
if (p.stem().extension() == ".test") { |
|
|
return source_kind::test; |
|
|
return source_kind::test; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (ends_with(p.stem().string(), ".main")) { |
|
|
|
|
|
|
|
|
if (p.stem().extension() == ".main") { |
|
|
return source_kind::app; |
|
|
return source_kind::app; |
|
|
} |
|
|
} |
|
|
|
|
|
|