Skip to content

Commit

Permalink
cmake: fix math_opt "alwayslink" behaviour in CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 14, 2024
1 parent 02d225d commit a89b375
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 108 deletions.
44 changes: 23 additions & 21 deletions ortools/math_opt/solver_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ortools_cxx_library(
"base_solver_test.cc"
"base_solver_test.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -34,7 +34,7 @@ ortools_cxx_library(
"callback_tests.cc"
"callback_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -54,7 +54,7 @@ ortools_cxx_library(
"status_tests.cc"
"status_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -70,7 +70,7 @@ ortools_cxx_library(
"lp_tests.cc"
"lp_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -86,7 +86,7 @@ ortools_cxx_library(
"lp_incomplete_solve_tests.cc"
"lp_incomplete_solve_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -102,7 +102,7 @@ ortools_cxx_library(
"invalid_input_tests.cc"
"invalid_input_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -128,7 +128,7 @@ ortools_cxx_library(
"mip_tests.cc"
"mip_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -145,7 +145,7 @@ ortools_cxx_library(
"ip_model_solve_parameters_tests.cc"
"ip_model_solve_parameters_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -161,7 +161,7 @@ ortools_cxx_library(
"ip_multiple_solutions_tests.cc"
"ip_multiple_solutions_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::strings
Expand All @@ -176,7 +176,7 @@ ortools_cxx_library(
"lp_model_solve_parameters_tests.cc"
"lp_model_solve_parameters_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -192,7 +192,7 @@ ortools_cxx_library(
"lp_parameter_tests.cc"
"lp_parameter_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -209,9 +209,11 @@ ortools_cxx_library(
"lp_initial_basis_tests.cc"
"lp_initial_basis_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
absl::status
ortools::math_opt_base_solver_test
TESTING
)
Expand All @@ -223,7 +225,7 @@ ortools_cxx_library(
"ip_parameter_tests.cc"
"ip_parameter_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -239,7 +241,7 @@ ortools_cxx_library(
"multi_objective_tests.cc"
"multi_objective_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -254,7 +256,7 @@ ortools_cxx_library(
"qp_tests.cc"
"qp_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -269,7 +271,7 @@ ortools_cxx_library(
"qc_tests.cc"
"qc_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -284,7 +286,7 @@ ortools_cxx_library(
"second_order_cone_tests.cc"
"second_order_cone_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -299,7 +301,7 @@ ortools_cxx_library(
"logical_constraint_tests.cc"
"logical_constraint_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -314,7 +316,7 @@ ortools_cxx_library(
"test_models.cc"
"test_models.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
absl::log
absl::strings
Expand Down Expand Up @@ -342,7 +344,7 @@ ortools_cxx_library(
"generic_tests.cc"
"generic_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand All @@ -358,7 +360,7 @@ ortools_cxx_library(
"infeasible_subsystem_tests.cc"
"infeasible_subsystem_tests.h"
TYPE
SHARED
STATIC
LINK_LIBRARIES
GTest::gmock
absl::log
Expand Down
Loading

0 comments on commit a89b375

Please sign in to comment.