Skip to content

fix #172 #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/cmake_generator.cpp
Original file line number Diff line number Diff line change
@@ -54,6 +54,18 @@ static std::string format(const char *format, const tsl::ordered_map<std::string
return s;
}

static std::string quoted( const std::string& str ){
return "\"" + str + "\"";
}

static std::string space_error_check( const std::string& str ){
auto pos = str.find_last_of(' ');
if ( pos != std::string::npos )
return quoted(str) + " <------ !space(s)";
else
return quoted(str);
}

static std::vector<fs::path> expand_cmake_path(const fs::path &source_path, const fs::path &toml_dir, bool is_root_project) {
auto is_subdir = [](fs::path p, const fs::path &root) {
while (true) {
@@ -1294,7 +1306,7 @@ void generate_cmake(const char *path, const parser::Project *parent_project) {
continue;
const auto &source_path = fs::path(path) / source;
if (!fs::exists(source_path)) {
throw_target_error("Source file not found: " + source);
throw_target_error("Source file not found: " + space_error_check(source) );
}
}
break;