Procházet zdrojové kódy

Fix: Don't break paths to dependencies when the repo-dir is a relative path

default_compile_flags
vector-of-bool před 4 roky
rodič
revize
66c2712ee4
2 změnil soubory, kde provedl 6 přidání a 5 odebrání
  1. +4
    -3
      src/dds/library/root.cpp
  2. +2
    -2
      tests/dds.py

+ 4
- 3
src/dds/library/root.cpp Zobrazit soubor

@@ -52,6 +52,7 @@ auto collect_pf_sources(path_ref path) {
} // namespace

library_root library_root::from_directory(path_ref lib_dir) {
assert(lib_dir.is_absolute());
auto sources = collect_pf_sources(lib_dir);

library_manifest man;
@@ -99,7 +100,7 @@ auto has_library_dirs
std::vector<library_root> dds::collect_libraries(path_ref root) {
std::vector<library_root> ret;
if (has_library_dirs(root)) {
ret.emplace_back(library_root::from_directory(root));
ret.emplace_back(library_root::from_directory(fs::canonical(root)));
}

auto pf_libs_dir = root / "libs";
@@ -109,7 +110,7 @@ std::vector<library_root> dds::collect_libraries(path_ref root) {
fs::directory_iterator(pf_libs_dir) //
| ranges::views::filter(has_library_dirs) //
| ranges::views::transform(
[&](auto p) { return library_root::from_directory(p); }));
[&](auto p) { return library_root::from_directory(fs::canonical(p)); }));
}
return ret;
}
}

+ 2
- 2
tests/dds.py Zobrazit soubor

@@ -93,8 +93,8 @@ class DDS:
'build',
f'--out={self.build_dir}',
f'--toolchain={toolchain or self.default_builtin_toolchain}',
f'--catalog={self.catalog_path}',
f'--repo-dir={self.repo_dir}',
f'--catalog={self.catalog_path.relative_to(self.source_root)}',
f'--repo-dir={self.repo_dir.relative_to(self.source_root)}',
['--no-tests'] if not tests else [],
['--no-apps'] if not apps else [],
['--no-warnings'] if not warnings else [],

Načítá se…
Zrušit
Uložit