From 4f179a02c846cee4214cf1a07e3ea6f6bfc98dd8 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 20 Feb 2025 11:12:08 +0100 Subject: [PATCH] fix #4557 --- ortools/graph/CMakeLists.txt | 2 +- ortools/graph/max_flow_test.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ortools/graph/CMakeLists.txt b/ortools/graph/CMakeLists.txt index 0f8dfd65b4..98564ae041 100644 --- a/ortools/graph/CMakeLists.txt +++ b/ortools/graph/CMakeLists.txt @@ -73,6 +73,6 @@ if(BUILD_TESTING) GTest::gtest_main GTest::gmock COMPILE_DEFINITIONS - -DROOT_DIR="$<$:../>../../" + -DROOT_DIR="${CMAKE_SOURCE_DIR}" ) endif() diff --git a/ortools/graph/max_flow_test.cc b/ortools/graph/max_flow_test.cc index 51c3f546f4..411a89e552 100644 --- a/ortools/graph/max_flow_test.cc +++ b/ortools/graph/max_flow_test.cc @@ -26,7 +26,7 @@ namespace operations_research { namespace { #if not defined(ROOT_DIR) -#define ROOT_DIR "_main/" +#define ROOT_DIR "_main" #endif TEST(SimpleMaxFlowTest, EmptyWithValidSourceAndSink) { @@ -175,7 +175,7 @@ TEST(SimpleMaxFlowTest, ProblematicProblemWithMaxCapacity) { ASSERT_OK_AND_ASSIGN( FlowModelProto model, ReadFileToProto(file::JoinPathRespectAbsolute( - ::testing::SrcDir(), ROOT_DIR "ortools/graph/testdata/" + ::testing::SrcDir(), ROOT_DIR "/ortools/graph/testdata/" "max_flow_test1.pb.txt"))); SimpleMaxFlow solver; EXPECT_EQ(SimpleMaxFlow::OPTIMAL, LoadAndSolveFlowModel(model, &solver));