[M6] brute-force probe + INTERFACE IMPORTED target codegen

This commit is contained in:
2026-05-15 14:26:06 +00:00
parent 01b3c28d6c
commit 94e658fdf1
10 changed files with 250 additions and 57 deletions

View File

@@ -19,8 +19,7 @@ add_compile_options(-Wall -Wextra -Wpedantic -Wconversion)
# ----- dependencies -----
find_package(reproc CONFIG REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(SQLITE3 REQUIRED IMPORTED_TARGET sqlite3)
find_package(SQLite3 REQUIRED)
find_package(Catch2 CONFIG REQUIRED)
# ----- library target -----
@@ -57,6 +56,7 @@ target_sources(cargoxx
../src/lockfile/lockfile.cpp
../src/manifest/parser.cpp
../src/manifest/writer.cpp
../src/resolver/brute_scan.cpp
../src/resolver/conan_probe.cpp
../src/resolver/discover.cpp
../src/resolver/findmodule_scan.cpp
@@ -76,7 +76,7 @@ target_sources(cargoxx
target_include_directories(cargoxx SYSTEM PRIVATE ../third_party)
target_link_libraries(cargoxx PUBLIC
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
)
# ----- binary target -----
@@ -85,7 +85,7 @@ set_target_properties(cargoxx_bin PROPERTIES OUTPUT_NAME cargoxx)
target_link_libraries(cargoxx_bin PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
)
# ----- tests -----
@@ -95,7 +95,7 @@ add_executable(test_cmd_add ../tests/cmd_add.cpp)
target_link_libraries(test_cmd_add PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -104,7 +104,7 @@ add_executable(test_cmd_build ../tests/cmd_build.cpp)
target_link_libraries(test_cmd_build PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -113,7 +113,7 @@ add_executable(test_cmd_clean ../tests/cmd_clean.cpp)
target_link_libraries(test_cmd_clean PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -122,7 +122,7 @@ add_executable(test_cmd_new ../tests/cmd_new.cpp)
target_link_libraries(test_cmd_new PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -131,7 +131,7 @@ add_executable(test_cmd_remove ../tests/cmd_remove.cpp)
target_link_libraries(test_cmd_remove PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -140,7 +140,7 @@ add_executable(test_cmd_run ../tests/cmd_run.cpp)
target_link_libraries(test_cmd_run PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -149,7 +149,7 @@ add_executable(test_codegen_cmake ../tests/codegen_cmake.cpp)
target_link_libraries(test_codegen_cmake PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -158,7 +158,7 @@ add_executable(test_codegen_flake ../tests/codegen_flake.cpp)
target_link_libraries(test_codegen_flake PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -167,7 +167,7 @@ add_executable(test_conan_probe_live ../tests/conan_probe_live.cpp)
target_link_libraries(test_conan_probe_live PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -176,7 +176,7 @@ add_executable(test_conan_probe_parse ../tests/conan_probe_parse.cpp)
target_link_libraries(test_conan_probe_parse PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -185,7 +185,7 @@ add_executable(test_devbox_resolve_live ../tests/devbox_resolve_live.cpp)
target_link_libraries(test_devbox_resolve_live PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -194,7 +194,7 @@ add_executable(test_devbox_resolve_parse ../tests/devbox_resolve_parse.cpp)
target_link_libraries(test_devbox_resolve_parse PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -203,7 +203,7 @@ add_executable(test_exec_run ../tests/exec_run.cpp)
target_link_libraries(test_exec_run PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -212,7 +212,7 @@ add_executable(test_layout_discovery ../tests/layout_discovery.cpp)
target_link_libraries(test_layout_discovery PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -221,7 +221,7 @@ add_executable(test_linkdb_lookup ../tests/linkdb_lookup.cpp)
target_link_libraries(test_linkdb_lookup PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -230,7 +230,7 @@ add_executable(test_linkdb_overlay ../tests/linkdb_overlay.cpp)
target_link_libraries(test_linkdb_overlay PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -239,7 +239,7 @@ add_executable(test_lockfile_round_trip ../tests/lockfile_round_trip.cpp)
target_link_libraries(test_lockfile_round_trip PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -248,7 +248,7 @@ add_executable(test_manifest_parse ../tests/manifest_parse.cpp)
target_link_libraries(test_manifest_parse PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -257,7 +257,7 @@ add_executable(test_manifest_write ../tests/manifest_write.cpp)
target_link_libraries(test_manifest_write PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -266,7 +266,7 @@ add_executable(test_nix_cmake_scan_live ../tests/nix_cmake_scan_live.cpp)
target_link_libraries(test_nix_cmake_scan_live PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -275,7 +275,7 @@ add_executable(test_nix_cmake_scan_parse ../tests/nix_cmake_scan_parse.cpp)
target_link_libraries(test_nix_cmake_scan_parse PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -284,7 +284,7 @@ add_executable(test_nixpkgs_git_resolve ../tests/nixpkgs_git_resolve.cpp)
target_link_libraries(test_nixpkgs_git_resolve PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -293,7 +293,7 @@ add_executable(test_nixpkgs_probe_live ../tests/nixpkgs_probe_live.cpp)
target_link_libraries(test_nixpkgs_probe_live PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -302,7 +302,7 @@ add_executable(test_nixpkgs_probe_parse ../tests/nixpkgs_probe_parse.cpp)
target_link_libraries(test_nixpkgs_probe_parse PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -311,7 +311,7 @@ add_executable(test_semver_satisfies ../tests/semver_satisfies.cpp)
target_link_libraries(test_semver_satisfies PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -320,7 +320,7 @@ add_executable(test_util_error ../tests/util_error.cpp)
target_link_libraries(test_util_error PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -329,7 +329,7 @@ add_executable(test_vcpkg_probe_live ../tests/vcpkg_probe_live.cpp)
target_link_libraries(test_vcpkg_probe_live PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -338,7 +338,7 @@ add_executable(test_vcpkg_probe_parse ../tests/vcpkg_probe_parse.cpp)
target_link_libraries(test_vcpkg_probe_parse PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
@@ -347,7 +347,7 @@ add_executable(test_verify_link_unit ../tests/verify_link_unit.cpp)
target_link_libraries(test_verify_link_unit PRIVATE
cargoxx
reproc
PkgConfig::SQLITE3
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)