compile gflags correctly, remove google namespace, use gflags instead, port all code using it
This commit is contained in:
@@ -918,8 +918,8 @@ static const char kUsage[] =
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
FLAGS_log_prefix = false;
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (FLAGS_input.empty()) {
|
||||
LOG(FATAL) << "Please supply a data file with --input=";
|
||||
}
|
||||
|
||||
@@ -304,8 +304,8 @@ static const char kUsage[] =
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
FLAGS_log_prefix = false;
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (FLAGS_input.empty()) {
|
||||
LOG(FATAL) << "Please supply a data file with --input=";
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ void CostasHard(const int dim) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
int min = 1;
|
||||
int max = 10;
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ void Cryptoarithmetics() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::Cryptoarithmetics();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ void DisplayPlan(const RoutingModel& routing, const Assignment& plan) {
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
CHECK_LT(0, FLAGS_vrp_orders) << "Specify an instance size greater than 0.";
|
||||
CHECK_LT(0, FLAGS_vrp_vehicles) << "Specify a non-null vehicle fleet size.";
|
||||
// VRP of size FLAGS_vrp_size.
|
||||
|
||||
@@ -221,7 +221,7 @@ void DisplayPlan(const RoutingModel& routing, const Assignment& plan) {
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
CHECK_LT(0, FLAGS_vrp_orders) << "Specify an instance size greater than 0.";
|
||||
CHECK_LT(0, FLAGS_vrp_vehicles) << "Specify a non-null vehicle fleet size.";
|
||||
// VRP of size FLAGS_vrp_size.
|
||||
|
||||
@@ -203,7 +203,7 @@ void DisplayPlan(const RoutingModel& routing, const Assignment& plan) {
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
CHECK_LT(0, FLAGS_vrp_orders) << "Specify an instance size greater than 0.";
|
||||
CHECK_LT(0, FLAGS_vrp_vehicles) << "Specify a non-null vehicle fleet size.";
|
||||
// VRP of size FLAGS_vrp_size.
|
||||
|
||||
@@ -229,7 +229,7 @@ void DisplayPlan(const RoutingModel& routing, const Assignment& plan) {
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
CHECK_LT(0, FLAGS_vrp_stops) << "Specify an instance size greater than 0.";
|
||||
CHECK_LT(0, FLAGS_vrp_orders_per_stop)
|
||||
<< "Specify an instance size greater than 0.";
|
||||
|
||||
@@ -188,8 +188,8 @@ int main(int argc, char* argv[]) {
|
||||
} else {
|
||||
usage = StringPrintf(kUsageTemplate, argv[0]);
|
||||
}
|
||||
google::SetUsageMessage(usage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(usage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
|
||||
if (argc < 2) {
|
||||
LOG(FATAL) << usage;
|
||||
|
||||
@@ -750,7 +750,7 @@ void SolveDobble(int num_cards, int num_symbols, int num_symbols_per_card) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
// These constants comes directly from the dobble game.
|
||||
// There are actually 55 cards, but we can create up to 57 cards.
|
||||
const int kSymbolsPerCard = FLAGS_symbols_per_card;
|
||||
|
||||
@@ -236,8 +236,8 @@ static const char kUsage[] =
|
||||
" optimization output besides the debug LOGs of the solver.";
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (FLAGS_data_file.empty()) {
|
||||
LOG(FATAL) << "Please supply a data file with --data_file=";
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void MaxFeasibleFlow() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::MinCostFlowOn4x4Matrix();
|
||||
operations_research::MaxFeasibleFlow();
|
||||
return 0;
|
||||
|
||||
@@ -500,7 +500,7 @@ int FapSolverSoft(const std::map<int, FapVariable>& data_variables,
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
|
||||
CHECK(!FLAGS_directory.empty()) << "Requires --directory=<directory name>";
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ void GolombRuler(int size) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
if (FLAGS_size != 0) {
|
||||
operations_research::GolombRuler(FLAGS_size);
|
||||
} else {
|
||||
|
||||
@@ -83,7 +83,7 @@ void RunAllExamples() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::RunAllExamples();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@ static const char kUsage[] =
|
||||
"output besides the debug LOGs of the solver.";
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (FLAGS_data_file.empty()) {
|
||||
LOG(FATAL) << "Please supply a data file with --data_file=";
|
||||
}
|
||||
|
||||
@@ -415,8 +415,8 @@ static const char kUsage[] =
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
FLAGS_log_prefix = false;
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
operations_research::EtJobShopData data;
|
||||
if (!FLAGS_jet_file.empty()) {
|
||||
data.LoadJetFile(FLAGS_jet_file);
|
||||
|
||||
@@ -215,8 +215,8 @@ static const char kUsage[] =
|
||||
"output besides the debug LOGs of the solver.";
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (FLAGS_data_file.empty()) {
|
||||
LOG(FATAL) << "Please supply a data file with --data_file=";
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ void AssignmentOn4x4Matrix() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::AssignmentOn4x4Matrix();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ void RunAllExamples() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::RunAllExamples();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ void RunAllExamples() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::RunAllExamples();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ void SolveProblem(SolveType solve_type) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::SolveProblem(operations_research::LNS);
|
||||
operations_research::SolveProblem(operations_research::LS);
|
||||
operations_research::SolveProblem(operations_research::LS_WITH_FILTER);
|
||||
|
||||
@@ -149,7 +149,7 @@ void MagicSquare(int grid_size) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
if (FLAGS_size != 0) {
|
||||
operations_research::MagicSquare(FLAGS_size);
|
||||
} else {
|
||||
|
||||
@@ -391,7 +391,7 @@ int Run() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
if (FLAGS_input.empty()) {
|
||||
LOG(FATAL) << "Filename not specified";
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ void ReadGlopParameters(GlopParameters* parameters) {
|
||||
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
|
||||
GlopParameters parameters;
|
||||
ReadGlopParameters(¶meters);
|
||||
|
||||
@@ -323,8 +323,8 @@ static const char kUsage[] =
|
||||
"This program runs a multi-dimensional knapsack problem.";
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (FLAGS_data_file.empty()) {
|
||||
LOG(FATAL) << "Please supply a data file with --datafile=";
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ class NetworkRoutingSolver {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::NetworkRoutingData data;
|
||||
operations_research::NetworkRoutingDataBuilder builder;
|
||||
builder.BuildModelFromParameters(
|
||||
|
||||
@@ -260,7 +260,7 @@ void NQueens(int size) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
if (FLAGS_size != 0) {
|
||||
operations_research::NQueens(FLAGS_size);
|
||||
} else {
|
||||
|
||||
@@ -54,7 +54,7 @@ void NQueens(int size) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
operations_research::NQueens(FLAGS_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ bool LoadAndSolve(const std::string& pdp_file) {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
if (!operations_research::LoadAndSolve(FLAGS_pdp_file)) {
|
||||
LOG(INFO) << "Error solving " << FLAGS_pdp_file;
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ static const char kUsage[] =
|
||||
"This program solves a given Boolean linear problem.";
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
return operations_research::sat::Run();
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ void Run() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, /*remove_flags=*/true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, /*remove_flags=*/true);
|
||||
CHECK(!FLAGS_input.empty()) << "--input is required";
|
||||
operations_research::Run();
|
||||
}
|
||||
|
||||
@@ -394,8 +394,8 @@ static const char kUsage[] =
|
||||
"There is no output besides the debug LOGs of the solver.";
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::SetUsageMessage(kUsage);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::SetUsageMessage(kUsage);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
CHECK_EQ(0, FLAGS_num_teams % 2) << "The number of teams must be even";
|
||||
CHECK_GE(FLAGS_num_teams, 2) << "At least 2 teams";
|
||||
CHECK_LT(FLAGS_num_teams, 16) << "The model does not scale beyond 14 teams";
|
||||
|
||||
@@ -602,7 +602,7 @@ int main(int argc, char** argv) {
|
||||
usage += " --colgen_max_iterations <n> max columns to generate\n";
|
||||
usage += " --colgen_complete generate all columns at start\n";
|
||||
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
|
||||
operations_research::MPSolver::OptimizationProblemType solver_type;
|
||||
bool found = false;
|
||||
|
||||
@@ -101,7 +101,7 @@ class RandomMatrix {
|
||||
};
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
if (FLAGS_tsp_size > 0) {
|
||||
// TSP of size FLAGS_tsp_size.
|
||||
// Second argument = 1 to build a single tour (it's a TSP).
|
||||
|
||||
@@ -93,7 +93,7 @@ void TestTable(int arity, int num_tuples, int upper, bool use_ac4r_table) {
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (!FLAGS_ac4) {
|
||||
operations_research::TestTable(FLAGS_arity,
|
||||
FLAGS_tuples,
|
||||
|
||||
@@ -458,7 +458,7 @@ void TestSimplification() {
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
operations_research::TestConversions();
|
||||
operations_research::TestBoolLe(1);
|
||||
operations_research::TestBoolLe(2);
|
||||
|
||||
@@ -68,7 +68,7 @@ void ShoppingBasketBug() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
operations_research::ShoppingBasketBug();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ int64 TestGcc(int num_vars,
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
const int dis = operations_research::TestGcc(FLAGS_vars,
|
||||
FLAGS_values,
|
||||
FLAGS_slack,
|
||||
|
||||
@@ -33,7 +33,7 @@ void OverflowTest() {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
operations_research::OverflowTest();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ class MaxArrayCtTest {
|
||||
} // namespace operations_research
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
operations_research::MinArrayCtTest min_test;
|
||||
min_test.TestAlternateCtor();
|
||||
min_test.TestBounds();
|
||||
|
||||
@@ -166,7 +166,7 @@ void TestImport() {
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
operations_research::TestVisitSumEqual();
|
||||
operations_research::TestExport();
|
||||
operations_research::TestImport();
|
||||
|
||||
@@ -79,7 +79,44 @@ SET_PATH = PATH=$(OR_ROOT_FULL)/dependencies/install/bin:$(PATH)
|
||||
.PHONY: third_party build_third_party makefile_third_party
|
||||
third_party: install_third_party makefile_third_party
|
||||
|
||||
# Create missing directories
|
||||
|
||||
MISSING_DIRECTORIES = \
|
||||
bin \
|
||||
lib \
|
||||
objs/algorithms \
|
||||
objs/base \
|
||||
objs/bop \
|
||||
objs/com/google/ortools \
|
||||
objs/constraint_solver \
|
||||
objs/flatzinc \
|
||||
objs/glop \
|
||||
objs/graph \
|
||||
objs/linear_solver \
|
||||
objs/lp_data \
|
||||
objs/sat \
|
||||
objs/swig \
|
||||
objs/util \
|
||||
src/gen/algorithms \
|
||||
src/gen/bop \
|
||||
src/gen/com/google/ortools/algorithms \
|
||||
src/gen/com/google/ortools/constraintsolver \
|
||||
src/gen/com/google/ortools/graph \
|
||||
src/gen/com/google/ortools/linearsolver \
|
||||
src/gen/constraint_solver \
|
||||
src/gen/flatzinc \
|
||||
src/gen/glop \
|
||||
src/gen/graph \
|
||||
src/gen/linear_solver \
|
||||
src/gen/ortools \
|
||||
src/gen/ortools/algorithms \
|
||||
src/gen/ortools/constraint_solver \
|
||||
src/gen/ortools/graph \
|
||||
src/gen/ortools/linear_solver \
|
||||
src/gen/sat
|
||||
|
||||
install_third_party: \
|
||||
missing_directories \
|
||||
install_gflags \
|
||||
install_protobuf \
|
||||
install_google_apputils \
|
||||
@@ -92,21 +129,146 @@ install_third_party: \
|
||||
install_bison \
|
||||
install_flex
|
||||
|
||||
.PHONY: missing_directories
|
||||
|
||||
missing_directories: $(MISSING_DIRECTORIES)
|
||||
|
||||
bin:
|
||||
$(MKDIR) bin
|
||||
|
||||
lib:
|
||||
$(MKDIR) lib
|
||||
|
||||
objs:
|
||||
$(MKDIR) objs
|
||||
|
||||
objs/algorithms: objs
|
||||
$(MKDIR) objs$Salgorithms
|
||||
|
||||
objs/base: objs
|
||||
$(MKDIR) objs$Sbase
|
||||
|
||||
objs/bop: objs
|
||||
$(MKDIR) objs$Sbop
|
||||
|
||||
objs/com: objs
|
||||
$(MKDIR) objs$Scom
|
||||
|
||||
objs/com/google: objs/com
|
||||
$(MKDIR) objs$Scom$Sgoogle
|
||||
|
||||
objs/com/google/ortools: objs/com/google
|
||||
$(MKDIR) objs$Scom$Sgoogle$Sortools
|
||||
|
||||
objs/constraint_solver: objs
|
||||
$(MKDIR) objs$Sconstraint_solver
|
||||
|
||||
objs/flatzinc: objs
|
||||
$(MKDIR) objs$Sflatzinc
|
||||
|
||||
objs/glop: objs
|
||||
$(MKDIR) objs$Sglop
|
||||
|
||||
objs/graph: objs
|
||||
$(MKDIR) objs$Sgraph
|
||||
|
||||
objs/linear_solver: objs
|
||||
$(MKDIR) objs$Slinear_solver
|
||||
|
||||
objs/lp_data: objs
|
||||
$(MKDIR) objs$Slp_data
|
||||
|
||||
objs/sat: objs
|
||||
$(MKDIR) objs$Ssat
|
||||
|
||||
objs/swig: objs
|
||||
$(MKDIR) objs$Sswig
|
||||
|
||||
objs/util: objs
|
||||
$(MKDIR) objs$Sutil
|
||||
|
||||
src/gen:
|
||||
$(MKDIR) src$Sgen
|
||||
|
||||
src/gen/algorithms: src/gen
|
||||
$(MKDIR) src$Sgen$Salgorithms
|
||||
|
||||
src/gen/bop: src/gen
|
||||
$(MKDIR) src$Sgen$Sbop
|
||||
|
||||
src/gen/com: src/gen
|
||||
$(MKDIR) src$Sgen$Scom
|
||||
|
||||
src/gen/com/google: src/gen/com
|
||||
$(MKDIR) src$Sgen$Scom$Sgoogle
|
||||
|
||||
src/gen/com/google/ortools: src/gen/com/google
|
||||
$(MKDIR) src$Sgen$Scom$Sgoogle$Sortools
|
||||
|
||||
src/gen/com/google/ortools/algorithms: src/gen/com/google/ortools
|
||||
$(MKDIR) src$Sgen$Scom$Sgoogle$Sortools$Salgorithms
|
||||
|
||||
src/gen/com/google/ortools/constraintsolver: src/gen/com/google/ortools
|
||||
$(MKDIR) src$Sgen$Scom$Sgoogle$Sortools$Sconstraintsolver
|
||||
|
||||
src/gen/com/google/ortools/graph: src/gen/com/google/ortools
|
||||
$(MKDIR) src$Sgen$Scom$Sgoogle$Sortools$Sgraph
|
||||
|
||||
src/gen/com/google/ortools/linearsolver: src/gen/com/google/ortools
|
||||
$(MKDIR) src$Sgen$Scom$Sgoogle$Sortools$Slinearsolver
|
||||
|
||||
src/gen/constraint_solver: src/gen
|
||||
$(MKDIR) src$Sgen$Sconstraint_solver
|
||||
|
||||
src/gen/flatzinc: src/gen
|
||||
$(MKDIR) src$Sgen$Sflatzinc
|
||||
|
||||
src/gen/glop: src/gen
|
||||
$(MKDIR) src$Sgen$Sglop
|
||||
|
||||
src/gen/graph: src/gen
|
||||
$(MKDIR) src$Sgen$Sgraph
|
||||
|
||||
src/gen/linear_solver: src/gen
|
||||
$(MKDIR) src$Sgen$Slinear_solver
|
||||
|
||||
src/gen/ortools: src/gen
|
||||
$(MKDIR) src$Sgen$Sortools
|
||||
|
||||
src/gen/ortools/algorithms: src/gen/ortools
|
||||
$(MKDIR) src$Sgen$Sortools$Salgorithms
|
||||
|
||||
src/gen/ortools/constraint_solver: src/gen/ortools
|
||||
$(MKDIR) src$Sgen$Sortools$Sconstraint_solver
|
||||
|
||||
src/gen/ortools/graph: src/gen/ortools
|
||||
$(MKDIR) src$Sgen$Sortools$Sgraph
|
||||
|
||||
src/gen/ortools/linear_solver: src/gen/ortools
|
||||
$(MKDIR) src$Sgen$Sortools$Slinear_solver
|
||||
|
||||
src/gen/sat: src/gen
|
||||
$(MKDIR) src$Sgen$Ssat
|
||||
|
||||
|
||||
|
||||
|
||||
# Install gflags. This uses cmake.
|
||||
install_gflags: dependencies/install/bin/gflags_completions.sh
|
||||
|
||||
dependencies/install/bin/gflags_completions.sh: dependencies/sources/gflags-$(GFLAGS_TAG)/Makefile
|
||||
cd dependencies/sources/gflags-$(GFLAGS_TAG) && make -j 4 && make install
|
||||
|
||||
dependencies/sources/gflags-$(GFLAGS_TAG)/Makefile: dependencies/sources/gflags-$(GFLAGS-TAG)/INSTALL.txt
|
||||
dependencies/install/bin/gflags_completions.sh: dependencies/sources/gflags-$(GFLAGS_TAG)/INSTALL.txt
|
||||
cd dependencies/sources/gflags-$(GFLAGS_TAG) && \
|
||||
$(CMAKE) -D BUILD_SHARED_LIBS=ON \
|
||||
-D BUILD_STATIC_LIBS=ON \
|
||||
-D CMAKE_INSTALL_PREFIX=../install \
|
||||
-D GFLAGS_NAMESPACE=google \
|
||||
-D CMAKE_INSTALL_PREFIX=../../install \
|
||||
-D CMAKE_CXX_FLAGS=-fPIC \
|
||||
.
|
||||
cd dependencies/sources/gflags-$(GFLAGS_TAG) && \
|
||||
make -j 4 && \
|
||||
make install
|
||||
$(TOUCH) dependencies/install/bin/gflags_completions.sh
|
||||
|
||||
dependencies/sources/gflags-$(GFLAGS-TAG)/INSTALL.txt: dependencies/archives/gflags-$(GFLAGS_TAG).tar.gz
|
||||
dependencies/sources/gflags-$(GFLAGS_TAG)/INSTALL.txt: dependencies/archives/gflags-$(GFLAGS_TAG).tar.gz
|
||||
cd dependencies/sources && tar xvzmf ../archives/gflags-$(GFLAGS_TAG).tar.gz
|
||||
|
||||
dependencies/archives/gflags-$(GFLAGS_TAG).tar.gz:
|
||||
|
||||
@@ -182,7 +182,7 @@ void FixAndParseParameters(int* argc, char*** argv) {
|
||||
(*argv)[i] = debug_param;
|
||||
}
|
||||
}
|
||||
google::ParseCommandLineFlags(argc, argv, true);
|
||||
gflags::ParseCommandLineFlags(argc, argv, true);
|
||||
// Fix the number of solutions.
|
||||
if (FLAGS_num_solutions == 0) { // not specified
|
||||
FLAGS_num_solutions = FLAGS_all ? kint32max : 1;
|
||||
|
||||
@@ -59,7 +59,7 @@ void ParseFile(const std::string& filename, bool presolve) {
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
FLAGS_log_prefix = false;
|
||||
google::ParseCommandLineFlags(&argc, &argv, /*remove_flags=*/ true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, /*remove_flags=*/ true);
|
||||
operations_research::ParseFile(FLAGS_file, FLAGS_presolve);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ using operations_research::glop::MPSReader;
|
||||
using operations_research::glop::LinearProgram;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
google::ParseCommandLineFlags( &argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags( &argc, &argv, true);
|
||||
LinearProgram linear_program;
|
||||
MPSReader mps_reader;
|
||||
CHECK(!FLAGS_mps_file.empty());
|
||||
|
||||
@@ -169,7 +169,7 @@ void FixAndParseParameters(int* argc, char*** argv) {
|
||||
(*argv)[i] = logging_param;
|
||||
}
|
||||
}
|
||||
google::ParseCommandLineFlags( argc, argv, true);
|
||||
gflags::ParseCommandLineFlags( argc, argv, true);
|
||||
}
|
||||
} // namespace operations_research
|
||||
|
||||
|
||||
Reference in New Issue
Block a user