Skip to content

Commit

Permalink
Merge branch 'main' of github.com:google/or-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Oct 25, 2024
2 parents 06641b3 + df6b614 commit 18d64bf
Show file tree
Hide file tree
Showing 15 changed files with 436 additions and 354 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/amd64_windows_cmake_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
{generator: "Visual Studio 17 2022", config: Debug, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL},
]
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} (${{ matrix.cmake.config }}) • C++
name: Windows • VS 2022 (${{ matrix.cmake.config }}) • C++
runs-on: windows-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/amd64_windows_cmake_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
{generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL},
]
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} • .Net
name: Windows • VS 2022 • .Net
runs-on: windows-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/amd64_windows_cmake_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
{distrib: 'microsoft', version: '21'}, # 2028/09
]
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} • ${{ matrix.java.distrib }}-${{ matrix.java.version }}
name: Windows • VS 2022 • ${{ matrix.java.distrib }}-${{ matrix.java.version }}
runs-on: windows-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/amd64_windows_cmake_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
{version: "3.13", dir: Python313},
]
fail-fast: false
name: Windows • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }}
name: Windows • VS 2022 • Python-${{ matrix.python.version }}
runs-on: windows-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
Expand Down
6 changes: 6 additions & 0 deletions cmake/dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ endif()
# ##############################################################################
# Coin-OR does not support C++17/C++20 (use of 'register' storage class specifier)
set(CMAKE_CXX_STANDARD 11)
if(WIN32)
set(BUILD_SHARED_LIBS OFF)
endif()

if(BUILD_CoinUtils)
message(CHECK_START "Fetching CoinUtils")
Expand Down Expand Up @@ -388,6 +391,9 @@ if(BUILD_Cbc)
message(CHECK_PASS "fetched")
endif()

if(WIN32)
set(BUILD_SHARED_LIBS ON)
endif()
if(MSVC)
set(CMAKE_CXX_STANDARD 20)
else()
Expand Down
20 changes: 20 additions & 0 deletions cmake/dotnet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,26 @@ file(MAKE_DIRECTORY ${DOTNET_PACKAGES_DIR})
# *.csproj.in contains:
# CMake variable(s) (@PROJECT_NAME@) that configure_file() can manage and
# generator expression ($<TARGET_FILE:...>) that file(GENERATE) can manage.
set(is_not_windows "$<NOT:$<PLATFORM_ID:Windows>>")

set(need_zlib_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_ZLIB}>>")

set(need_absl_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_absl}>>")

set(need_re2_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_re2}>>")

set(need_protobuf_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_Protobuf}>>")

set(need_coinutils_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_CoinUtils}>>")
set(need_osi_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_Osi}>>")
set(need_clp_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_Clp}>>")
set(need_cgl_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_Cgl}>>")
set(need_cbc_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_Cbc}>>")

set(need_highs_lib "$<AND:${is_not_windows},$<BOOL:${BUILD_HIGHS}>>")

set(is_ortools_shared "$<STREQUAL:$<TARGET_PROPERTY:ortools,TYPE>,SHARED_LIBRARY>")

configure_file(
${PROJECT_SOURCE_DIR}/ortools/dotnet/${DOTNET_PACKAGE}.runtime.csproj.in
${DOTNET_NATIVE_PROJECT_DIR}/${DOTNET_NATIVE_PROJECT}.csproj.in
Expand Down
240 changes: 131 additions & 109 deletions cmake/java.cmake

Large diffs are not rendered by default.

242 changes: 132 additions & 110 deletions cmake/python.cmake

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ortools/algorithms/binary_search_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
namespace operations_research {

// Correctly picking the midpoint of two integers in all cases isn't trivial!
template <>
template <> inline
int BinarySearchMidpoint(int x, int y) {
if (x > y) std::swap(x, y);
if (x >= 0 || y < 0) return x + (y - x) / 2;
Expand Down Expand Up @@ -181,7 +181,7 @@ TEST(BinarySearchDeathTest, DiesIfEitherBoundaryConditionViolatedInFastbuild) {
// Note that template specializations must be exactly in the same namespace,
// hence the presence of these tests outside the unnamed namespace.

template <>
template <> inline
absl::Time BinarySearchMidpoint(absl::Time x, absl::Time y) {
return x + (y - x) / 2;
}
Expand Down
8 changes: 4 additions & 4 deletions ortools/constraint_solver/local_search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3868,10 +3868,10 @@ class LocalSearchProfiler : public LocalSearchMonitor {
filters.push_back(filter);
}
std::sort(filters.begin(), filters.end(),
[&filter_stats](const LocalSearchFilter* filter1,
const LocalSearchFilter* filter2) {
return gtl::FindOrDie(filter_stats, filter1).calls >
gtl::FindOrDie(filter_stats, filter2).calls;
[filter_stats_ptr = &filter_stats](const LocalSearchFilter* filter1,
const LocalSearchFilter* filter2) {
return gtl::FindOrDie(*filter_stats_ptr, filter1).calls >
gtl::FindOrDie(*filter_stats_ptr, filter2).calls;
});
for (const LocalSearchFilter* const filter : filters) {
const FilterStats& stats = gtl::FindOrDie(filter_stats, filter);
Expand Down
190 changes: 95 additions & 95 deletions ortools/dotnet/Google.OrTools.runtime.csproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,105 +26,105 @@
<!-- If ortools is built as a STATIC_LIBRARY (e.g. Windows) then we don't have to include it -->
<Content Include="
$<TARGET_FILE:google-ortools-native>
$<$<STREQUAL:$<TARGET_PROPERTY:@PROJECT_NAME@,TYPE>,SHARED_LIBRARY>:;$<TARGET_SONAME_FILE:@PROJECT_NAME@>>
$<$<BOOL:@BUILD_ZLIB@>:;$<TARGET_SONAME_FILE:ZLIB::ZLIB>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::base>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::bad_any_cast_impl>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::bad_optional_access>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::bad_variant_access>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::city>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::civil_time>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::cord>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::cord_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::cordz_functions>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::cordz_handle>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::cordz_info>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::crc32c>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::crc_cord_state>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::crc_cpu_detect>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::crc_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::debugging_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::decode_rust_punycode>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::demangle_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::demangle_rust>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::die_if_null>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::examine_stack>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::exponential_biased>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_commandlineflag>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_commandlineflag_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_config>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_marshalling>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_parse>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_private_handle_accessor>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_program_name>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_reflection>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_usage>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::flags_usage_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::graphcycles_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::hash>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::hashtablez_sampler>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::int128>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::kernel_timeout_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::leak_check>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_entry>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_flags>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_globals>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_initialize>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_check_op>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_conditions>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_fnmatch>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_format>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_globals>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_log_sink_set>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_message>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_nullguard>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_internal_proto>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_severity>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::log_sink>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::low_level_hash>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::malloc_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_distributions>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_internal_platform>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_internal_pool_urbg>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_internal_randen>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_internal_randen_hwaes>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_internal_randen_hwaes_impl>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_internal_randen_slow>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_internal_seed_material>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_seed_gen_exception>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::random_seed_sequences>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::raw_hash_set>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::raw_logging_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::spinlock_wait>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::stacktrace>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::status>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::statusor>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::str_format_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::strerror>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::string_view>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::strings>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::strings_internal>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::symbolize>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::synchronization>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::throw_delegate>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::time>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::time_zone>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::utf8_for_code_point>>
$<$<BOOL:@BUILD_absl@>:;$<TARGET_SONAME_FILE:absl::vlog_config_internal>>
$<@is_ortools_shared@:;$<TARGET_SONAME_FILE:ortools>>
$<@need_zlib_lib@:;$<TARGET_SONAME_FILE:ZLIB::ZLIB>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::base>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::bad_any_cast_impl>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::bad_optional_access>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::bad_variant_access>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::city>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::civil_time>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::cord>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::cord_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::cordz_functions>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::cordz_handle>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::cordz_info>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::crc32c>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::crc_cord_state>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::crc_cpu_detect>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::crc_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::debugging_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::decode_rust_punycode>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::demangle_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::demangle_rust>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::die_if_null>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::examine_stack>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::exponential_biased>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_commandlineflag>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_commandlineflag_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_config>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_marshalling>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_parse>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_private_handle_accessor>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_program_name>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_reflection>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_usage>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::flags_usage_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::graphcycles_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::hash>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::hashtablez_sampler>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::int128>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::kernel_timeout_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::leak_check>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_entry>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_flags>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_globals>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_initialize>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_check_op>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_conditions>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_fnmatch>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_format>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_globals>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_log_sink_set>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_message>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_nullguard>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_internal_proto>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_severity>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::log_sink>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::low_level_hash>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::malloc_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_distributions>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_internal_platform>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_internal_pool_urbg>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_internal_randen>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_internal_randen_hwaes>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_internal_randen_hwaes_impl>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_internal_randen_slow>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_internal_seed_material>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_seed_gen_exception>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::random_seed_sequences>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::raw_hash_set>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::raw_logging_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::spinlock_wait>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::stacktrace>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::status>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::statusor>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::str_format_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::strerror>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::string_view>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::strings>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::strings_internal>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::symbolize>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::synchronization>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::throw_delegate>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::time>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::time_zone>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::utf8_for_code_point>>
$<@need_absl_lib@:;$<TARGET_SONAME_FILE:absl::vlog_config_internal>>

$<$<BOOL:@BUILD_re2@>:;$<TARGET_SONAME_FILE:re2::re2>>
$<@need_re2_lib@:;$<TARGET_SONAME_FILE:re2::re2>>

$<$<BOOL:@BUILD_Protobuf@>:;$<TARGET_SONAME_FILE:protobuf::libprotobuf>>
$<$<BOOL:@BUILD_Protobuf@>:;$<TARGET_SONAME_FILE:utf8_validity>>
$<@need_protobuf_lib@:;$<TARGET_SONAME_FILE:protobuf::libprotobuf>>
$<@need_protobuf_lib@:;$<TARGET_SONAME_FILE:utf8_validity>>

$<$<BOOL:@BUILD_CoinUtils@>:;$<TARGET_SONAME_FILE:Coin::CoinUtils>>
$<$<BOOL:@BUILD_Osi@>:;$<TARGET_SONAME_FILE:Coin::Osi>>
$<$<BOOL:@BUILD_Clp@>:;$<TARGET_SONAME_FILE:Coin::Clp>;$<TARGET_SONAME_FILE:Coin::OsiClp>;$<TARGET_SONAME_FILE:Coin::ClpSolver>>
$<$<BOOL:@BUILD_Cgl@>:;$<TARGET_SONAME_FILE:Coin::Cgl>>
$<$<BOOL:@BUILD_Cbc@>:;$<TARGET_SONAME_FILE:Coin::Cbc>;$<TARGET_SONAME_FILE:Coin::OsiCbc>;$<TARGET_SONAME_FILE:Coin::CbcSolver>>
$<@need_coinutils_lib@:;$<TARGET_SONAME_FILE:Coin::CoinUtils>>
$<@need_osi_lib@:;$<TARGET_SONAME_FILE:Coin::Osi>>
$<@need_clp_lib@:;$<TARGET_SONAME_FILE:Coin::Clp>;$<TARGET_SONAME_FILE:Coin::OsiClp>;$<TARGET_SONAME_FILE:Coin::ClpSolver>>
$<@need_cgl_lib@:;$<TARGET_SONAME_FILE:Coin::Cgl>>
$<@need_cbc_lib@:;$<TARGET_SONAME_FILE:Coin::Cbc>;$<TARGET_SONAME_FILE:Coin::OsiCbc>;$<TARGET_SONAME_FILE:Coin::CbcSolver>>

$<$<BOOL:@BUILD_HIGHS@>:;$<TARGET_SONAME_FILE:highs>>
$<@need_highs_lib@:;$<TARGET_SONAME_FILE:highs>>
">
<PackagePath>runtimes/@DOTNET_RID@/native/%(Filename)%(Extension)</PackagePath>
<Pack>true</Pack>
Expand Down
8 changes: 4 additions & 4 deletions ortools/graph/christofides_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ void BM_ChristofidesPathSolver(benchmark::State& state) {
costs[i][j] = std::abs(x_i - x_j) + std::abs(y_i - y_j);
}
}
auto cost = [&costs](int i, int j) { return costs[i][j]; };
using Cost = decltype(cost);
std::function<int(int, int)> cost = [&costs](int i, int j) -> int { return costs[i][j]; };

using MatchingAlgorithm =
typename ChristofidesPathSolver<int, int, int, Cost>::MatchingAlgorithm;
typename ChristofidesPathSolver<int, int, int>::MatchingAlgorithm;
for (auto _ : state) {
ChristofidesPathSolver<int, int, int, Cost> chris_solver(num_nodes, cost);
ChristofidesPathSolver<int, int, int> chris_solver(num_nodes, cost);
if (use_minimal_matching) {
chris_solver.SetMatchingAlgorithm(
MatchingAlgorithm::MINIMAL_WEIGHT_MATCHING);
Expand Down
Loading

0 comments on commit 18d64bf

Please sign in to comment.