Browse Source

Fixed CMake and Meson project detection for dos newlines

merge-requests/413/head
eidheim 2 years ago
parent
commit
de7763e555
  1. 2
      src/cmake.cpp
  2. 2
      src/meson.cpp

2
src/cmake.cpp

@ -18,7 +18,7 @@ CMake::CMake(const boost::filesystem::path &path) {
if(input) {
std::string line;
while(std::getline(input, line)) {
const static std::regex project_regex("^ *project *\\(.*$", std::regex::icase | std::regex::optimize);
const static std::regex project_regex("^ *project *\\(.*\r?$", std::regex::icase | std::regex::optimize);
std::smatch sm;
if(std::regex_match(line, sm, project_regex))
return true;

2
src/meson.cpp

@ -17,7 +17,7 @@ Meson::Meson(const boost::filesystem::path &path) {
if(input) {
std::string line;
while(std::getline(input, line)) {
const static std::regex project_regex("^ *project *\\(.*", std::regex::icase | std::regex::optimize);
const static std::regex project_regex("^ *project *\\(.*\r?$", std::regex::icase | std::regex::optimize);
std::smatch sm;
if(std::regex_match(line, sm, project_regex))
return true;

Loading…
Cancel
Save