Browse Source

Fixed Project::CMakeBuild::is_valid for MSYS2

merge-requests/413/head
eidheim 3 years ago
parent
commit
bd930063c2
  1. 4
      src/project_build.cpp

4
src/project_build.cpp

@ -157,8 +157,8 @@ bool Project::CMakeBuild::is_valid(const boost::filesystem::path &build_path) co
bool correct_source_dir = false; bool correct_source_dir = false;
bool correct_cmake_command = false; bool correct_cmake_command = false;
while(std::getline(input, line)) { while(std::getline(input, line)) {
const static std::regex source_dir_regex("^.*_SOURCE_DIR:STATIC=(.*)$", std::regex::optimize); const static std::regex source_dir_regex("^.*_SOURCE_DIR:STATIC=(.*)\r?$", std::regex::optimize);
const static std::regex cmake_command_regex("^CMAKE_COMMAND:INTERNAL=(.*)$", std::regex::optimize); const static std::regex cmake_command_regex("^CMAKE_COMMAND:INTERNAL=(.*)\r?$", std::regex::optimize);
std::smatch sm; std::smatch sm;
if(std::regex_match(line, sm, source_dir_regex)) if(std::regex_match(line, sm, source_dir_regex))
correct_source_dir |= boost::filesystem::path(sm[1].str()) == project_path; correct_source_dir |= boost::filesystem::path(sm[1].str()) == project_path;

Loading…
Cancel
Save