From 5a1d5fd9be9663d810966910b09a03a23953a358 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 27 Jun 2025 11:56:36 +0200 Subject: [PATCH 1/2] ctest_start: Restore log file location for relative CTEST_BINARY_DIRECTORY Extend commit 3c321b6571 (cmCTestStartCommand: Inline InitializeFromCommand function, 2024-10-17, v4.0.0-rc1~605^2~6) to initialize BinaryDir as an absolute path. Issue: #27026 --- Source/CTest/cmCTestStartCommand.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx index e2b897e3ec..f939512871 100644 --- a/Source/CTest/cmCTestStartCommand.cxx +++ b/Source/CTest/cmCTestStartCommand.cxx @@ -181,7 +181,7 @@ bool cmCTestStartCommand::InitialPass(std::vector const& args, this->CTest->SetCTestConfigurationFromCMakeVariable( &mf, "BuildName", "CTEST_BUILD_NAME", quiet); - this->CTest->Initialize(bld_dir); + this->CTest->Initialize(binaryDir); cmCTestOptionalLog( this->CTest, OUTPUT, From f98732bea8a29849ea54163277430ea5f8e49d41 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 27 Jun 2025 11:39:06 +0200 Subject: [PATCH 2/2] ctest_configure: Restore handling of relative CTEST_BINARY_DIRECTORY In commit e52eada2c2 (cmCTestConfigureCommand: Refactor command line construction, 2025-01-28, v4.0.0-rc1~60^2~2) we switched from the `BuildDirectory` setting, which was always an absolute path, to `CTEST_BINARY_DIRECTORY`. Convert it to an absolute path too. Fixes: #27026 --- Source/CTest/cmCTestConfigureCommand.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index bcb020e7d4..6bece77b5d 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -115,11 +115,11 @@ bool cmCTestConfigureCommand::ExecuteConfigure(ConfigureArguments const& args, } configureCommand += " \"-S"; - configureCommand += sourceDirectory; + configureCommand += cmSystemTools::CollapseFullPath(sourceDirectory); configureCommand += "\""; configureCommand += " \"-B"; - configureCommand += buildDirectory; + configureCommand += cmSystemTools::CollapseFullPath(buildDirectory); configureCommand += "\""; }