Versió 2.0.2:

- [NEW] Ara es guarda un arxivet que especifica per a quin target se va compilar per última vegada. Si no coincideix, se fa un rebuild all.
This commit is contained in:
2026-05-13 12:11:54 +02:00
parent 8bcd70a943
commit bdb56768be
2 changed files with 19 additions and 3 deletions
+18 -2
View File
@@ -21,6 +21,7 @@ std::string folder_char = "\\";
#else
std::string folder_char = "/";
#endif
std::string loaded_section = "";
std::vector<std::string> exclude;
std::vector<std::string> keys = {"libs", "cppflags", "executable", "sourcepath", "buildpath", "exclude"};
@@ -174,7 +175,7 @@ bool loadLagueirtoFile(const std::string &section_to_load)
if (rest == "default") found_default = true;
if (section_to_load.empty() && rest == "default") active = true;
else active = (current_section == section_to_load);
if (active) loaded_section = current_section;
continue;
}
@@ -445,14 +446,29 @@ int main(int argc, char *argv[])
exit(1);
}
std::string last_config_file = build_path + folder_char + "last_config";
if (!std::filesystem::exists(last_config_file)) {
must_recompile_all = true;
} else {
std::ifstream in(last_config_file);
if (in) {
std::string word;
in >> word;
if (word != loaded_section) must_recompile_all = true;
}
}
if (must_recompile_all) {
std::cout << "remove: '" << build_path << "'" << std::endl;
std::filesystem::remove_all(build_path);
}
if (!std::filesystem::is_directory(build_path)) std::filesystem::create_directory(build_path);
std::ofstream out(last_config_file);
if (out) out << loaded_section;
std::chrono::steady_clock::time_point begin_all = std::chrono::steady_clock::now();
if (!std::filesystem::is_directory(build_path)) std::filesystem::create_directory(build_path);
source_paths = split(source_path);
// Recopilem tots els arxius cpp i capçaleres
+1 -1
View File
@@ -1,3 +1,3 @@
#pragma once
#define LAGUEIRTO_VERSION "2.0.1"
#define LAGUEIRTO_VERSION "2.0.2"