|
|
|
@ -93,10 +93,22 @@ boost::filesystem::path Project::Build::get_debug_path() { |
|
|
|
return filesystem::get_normal_path(debug_build_path); |
|
|
|
return filesystem::get_normal_path(debug_build_path); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::vector<boost::filesystem::path> Project::Build::get_exclude_paths() { |
|
|
|
std::vector<std::string> Project::Build::get_exclude_folders() { |
|
|
|
if(!project_path.empty()) |
|
|
|
auto default_build_path = Config::get().project.default_build_path; |
|
|
|
return {project_path / ".git"}; |
|
|
|
boost::replace_all(default_build_path, "<project_directory_name>", ""); |
|
|
|
return {}; |
|
|
|
|
|
|
|
|
|
|
|
auto debug_build_path = Config::get().project.debug_build_path; |
|
|
|
|
|
|
|
boost::replace_all(debug_build_path, "<default_build_path>", Config::get().project.default_build_path); |
|
|
|
|
|
|
|
boost::replace_all(debug_build_path, "<project_directory_name>", ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return std::vector<std::string>{ |
|
|
|
|
|
|
|
".git", "build", "debug", // Common exclude folders
|
|
|
|
|
|
|
|
boost::filesystem::path(default_build_path).filename().string(), boost::filesystem::path(debug_build_path).filename().string(), // C/C++
|
|
|
|
|
|
|
|
"target", // Rust
|
|
|
|
|
|
|
|
"node_modules", "dist", "coverage", ".expo", // JavaScript
|
|
|
|
|
|
|
|
".mypy_cache", |
|
|
|
|
|
|
|
"__pycache__" // Python
|
|
|
|
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Project::CMakeBuild::CMakeBuild(const boost::filesystem::path &path) : Project::Build(), cmake(path) { |
|
|
|
Project::CMakeBuild::CMakeBuild(const boost::filesystem::path &path) : Project::Build(), cmake(path) { |
|
|
|
@ -146,13 +158,6 @@ bool Project::CMakeBuild::is_valid() { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::vector<boost::filesystem::path> Project::CMakeBuild::get_exclude_paths() { |
|
|
|
|
|
|
|
auto exclude_paths = Project::Build::get_exclude_paths(); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(get_default_path()); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(get_debug_path()); |
|
|
|
|
|
|
|
return exclude_paths; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Project::MesonBuild::MesonBuild(const boost::filesystem::path &path) : Project::Build(), meson(path) { |
|
|
|
Project::MesonBuild::MesonBuild(const boost::filesystem::path &path) : Project::Build(), meson(path) { |
|
|
|
project_path = meson.project_path; |
|
|
|
project_path = meson.project_path; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -197,39 +202,6 @@ bool Project::MesonBuild::is_valid() { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::vector<boost::filesystem::path> Project::MesonBuild::get_exclude_paths() { |
|
|
|
|
|
|
|
auto exclude_paths = Project::Build::get_exclude_paths(); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(get_default_path()); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(get_debug_path()); |
|
|
|
|
|
|
|
return exclude_paths; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<boost::filesystem::path> Project::CompileCommandsBuild::get_exclude_paths() { |
|
|
|
|
|
|
|
auto exclude_paths = Project::Build::get_exclude_paths(); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(get_default_path()); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(get_debug_path()); |
|
|
|
|
|
|
|
return exclude_paths; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string Project::CargoBuild::get_compile_command() { |
|
|
|
std::string Project::CargoBuild::get_compile_command() { |
|
|
|
return Config::get().project.cargo_command + " build"; |
|
|
|
return Config::get().project.cargo_command + " build"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::vector<boost::filesystem::path> Project::CargoBuild::get_exclude_paths() { |
|
|
|
|
|
|
|
auto exclude_paths = Project::Build::get_exclude_paths(); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(project_path / "target"); |
|
|
|
|
|
|
|
return exclude_paths; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<boost::filesystem::path> Project::NpmBuild::get_exclude_paths() { |
|
|
|
|
|
|
|
auto exclude_paths = Project::Build::get_exclude_paths(); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(project_path / "node_modules"); |
|
|
|
|
|
|
|
return exclude_paths; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<boost::filesystem::path> Project::PythonMain::get_exclude_paths() { |
|
|
|
|
|
|
|
auto exclude_paths = Project::Build::get_exclude_paths(); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(project_path / ".mypy_cache"); |
|
|
|
|
|
|
|
exclude_paths.emplace_back(project_path / "__pycache__"); |
|
|
|
|
|
|
|
return exclude_paths; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|