protect code againt PORTABLE
This commit is contained in:
@@ -747,11 +747,15 @@ uint64_t FingerprintModel(const CpModelProto& model, uint64_t seed) {
|
||||
|
||||
bool WriteModelProtoToFile(const CpModelProto& model,
|
||||
const std::string& filename) {
|
||||
#if defined(__PORTABLE_PLATFORM__)
|
||||
return false;
|
||||
#else
|
||||
if (absl::EndsWith(filename, "txt")) {
|
||||
return file::SetTextProto(filename, model, file::Defaults()).ok();
|
||||
} else {
|
||||
return file::SetBinaryProto(filename, model, file::Defaults()).ok();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace sat
|
||||
|
||||
Reference in New Issue
Block a user