@@ -132,27 +132,44 @@ namespace vix::cli::util
132132 return vix::crypto::hex_lower (out);
133133 }
134134
135- std::string compute_project_files_fingerprint (const fs::path &projectDir)
135+ std::string compute_cmake_config_fingerprint (const fs::path &projectDir)
136136 {
137137 std::vector<fs::path> files;
138138 files.reserve (256 );
139139
140- files.push_back (projectDir / " CMakeLists.txt" );
140+ const fs::path rootCMake = projectDir / " CMakeLists.txt" ;
141+ if (file_exists (rootCMake))
142+ files.push_back (rootCMake);
143+
141144 collect_files_recursive (projectDir / " cmake" , " .cmake" , files);
142145
143146 const fs::path presets = projectDir / " CMakePresets.json" ;
144147 if (file_exists (presets))
145148 files.push_back (presets);
146149
150+ const fs::path userPresets = projectDir / " CMakeUserPresets.json" ;
151+ if (file_exists (userPresets))
152+ files.push_back (userPresets);
153+
154+ const fs::path vixJson = projectDir / " vix.json" ;
155+ if (file_exists (vixJson))
156+ files.push_back (vixJson);
157+
158+ const fs::path vixLock = projectDir / " vix.lock" ;
159+ if (file_exists (vixLock))
160+ files.push_back (vixLock);
161+
147162 std::sort (files.begin (), files.end ());
163+ files.erase (std::unique (files.begin (), files.end ()), files.end ());
148164
149165 std::uint64_t h = FNV_OFFSET;
150166
151167 for (const auto &p : files)
152168 {
153169 std::error_code ec{};
154170 const fs::path rp = fs::weakly_canonical (p, ec);
155- const std::string pathStr = ec ? p.string () : rp.string ();
171+ const std::string pathStr = ec ? p.lexically_relative (projectDir).string ()
172+ : rp.lexically_relative (projectDir).string ();
156173
157174 const auto hashOpt = read_file_hash_hex (p);
158175 const std::string line = pathStr + " =" + (hashOpt ? *hashOpt : " <missing>" );
0 commit comments