From 69ccaea15e4a39d1b088283673e06307b9502c50 Mon Sep 17 00:00:00 2001
From: Insight Software Consortium Maintainers
Date: Sun, 20 Sep 2026 16:14:12 -0500
Subject: [PATCH 1/2] VXL 2026-09-20 (a0790d71)
Code extracted from:
/Users/johnsonhj/src/vxl
at commit a0790d71400203bc3d3503196c00d69c43f71208 (itk-drop-vcl-where-root-dir).
---
core/testlib/CMakeLists.txt | 13 ----------
core/testlib/testlib_register.h | 2 +-
core/testlib/testlib_root_dir.cxx | 37 ----------------------------
core/testlib/testlib_root_dir.h | 33 -------------------------
core/testlib/tests/CMakeLists.txt | 2 --
core/testlib/tests/test_driver.cxx | 2 --
core/testlib/tests/test_include.cxx | 1 -
core/testlib/tests/test_root_dir.cxx | 32 ------------------------
vcl/CMakeLists.txt | 5 ++--
vcl/tests/test_include.cxx | 1 -
vcl/vcl_where_root_dir.h.in | 15 -----------
11 files changed, 3 insertions(+), 140 deletions(-)
delete mode 100644 core/testlib/testlib_root_dir.cxx
delete mode 100644 core/testlib/testlib_root_dir.h
delete mode 100644 core/testlib/tests/test_root_dir.cxx
delete mode 100644 vcl/vcl_where_root_dir.h.in
diff --git a/core/testlib/CMakeLists.txt b/core/testlib/CMakeLists.txt
index 01d9fb7ef8f..cd7853dadf3 100644
--- a/core/testlib/CMakeLists.txt
+++ b/core/testlib/CMakeLists.txt
@@ -1,15 +1,5 @@
# ./vxl/testlib/CMakeLists.txt
-find_file(TESTLIB_VCL_WHERE_ROOT_DIR_H
- vcl_where_root_dir.h
- ${VXL_BINARY_DIR}/vcl )
-
-if(TESTLIB_VCL_WHERE_ROOT_DIR_H)
- add_compile_definitions(VCL_WHERE_ROOT_DIR_H_EXISTS)
-else()
- unset(TESTLIB_VCL_WHERE_ROOT_DIR_H)
-endif()
-
set(testlib_sources
# Useful utilities for the tests
@@ -20,9 +10,6 @@ set(testlib_sources
# The main function of the driver executable
testlib_main.cxx
-
- # Used to locate test files in source tree
- testlib_root_dir.h testlib_root_dir.cxx
)
vxl_add_library(LIBRARY_NAME itktestlib
diff --git a/core/testlib/testlib_register.h b/core/testlib/testlib_register.h
index eb141d24797..002775e9ae3 100644
--- a/core/testlib/testlib_register.h
+++ b/core/testlib/testlib_register.h
@@ -48,7 +48,7 @@ testlib_register_test(const std::string &, TestMainFunction);
// This allows the main function to be defined in the driver code
// itself--instead of in the testlib library--thus avoiding
// "awf-weirdness". This also means that functionality from the test
-// library, such as testlib_root_dir, can be used even if it is not
+// library can be used even if it is not
// used to create a test driver.
#define DEFINE_MAIN \
int testlib_main(int, char *[]); \
diff --git a/core/testlib/testlib_root_dir.cxx b/core/testlib/testlib_root_dir.cxx
deleted file mode 100644
index fc39f504019..00000000000
--- a/core/testlib/testlib_root_dir.cxx
+++ /dev/null
@@ -1,37 +0,0 @@
-// This is core/testlib/testlib_root_dir.cxx
-#include
-#include
-#include "testlib_root_dir.h"
-//:
-// \file
-
-#ifdef _MSC_VER
-# include "vcl_msvc_warnings.h"
-#endif
-
-// The following should have been created automatically by the
-// configuration scripts from vcl_where_root_dir.h.in
-// We need to check for its existence and if it doesn't exist - do something else.
-#include
-//: Return source root directory (ie the one just below vcl and vxl).
-std::string
-testlib_root_dir()
-{
- const char * ptr = std::getenv("VXLSRC");
- if (ptr)
- return { ptr };
-
- ptr = std::getenv("VCLSRC");
- if (ptr)
- return { ptr };
-
- ptr = std::getenv("VXL_SRC");
- if (ptr)
- return { ptr };
-
- return { VCL_SOURCE_ROOT_DIR };
-
- // std::cerr<<"ERROR: testlib_root_dir() Unable to retrieve directory from\n"
- // <<"$VCLSRC or $VXLSRC or $VXL_SRC. Sorry.\n";
- // return std::string("");
-}
diff --git a/core/testlib/testlib_root_dir.h b/core/testlib/testlib_root_dir.h
deleted file mode 100644
index a481ee8f486..00000000000
--- a/core/testlib/testlib_root_dir.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef testlib_root_dir_h_
-#define testlib_root_dir_h_
-//:
-// \file
-// \brief Function to return root directory (i.e. the parent directory of core).
-// \author Tim Cootes
-// \verbatim
-// Modifications
-// 17-05-2001 I. Scott - Moved from vul to testlib
-// \endverbatim
-#include
-#ifdef _MSC_VER
-# include
-#endif
-
-// macros to stringify compiler -D path value
-#define TEST_STR(x) #x
-#define TEST_PATH_DEFINE(x) TEST_STR(x)
-
-//: Return source root directory (i.e. the parent directory of core).
-// *** Only use this directory tree for read-only operations! ***
-//
-// If the file vcl_where_root_dir.h has been automatically generated
-// during configuration (which will happen with cmake) then the
-// appropriate source directory will be returned.
-//
-// If another build system is used in which this is not created,
-// the function will return the value of either of the environment
-// variables: VXLSRC, VCLSRC or VXL_SRC in that order.
-std::string
-testlib_root_dir();
-
-#endif // testlib_root_dir_h_
diff --git a/core/testlib/tests/CMakeLists.txt b/core/testlib/tests/CMakeLists.txt
index e3f487ce944..fef35d89a03 100644
--- a/core/testlib/tests/CMakeLists.txt
+++ b/core/testlib/tests/CMakeLists.txt
@@ -6,14 +6,12 @@ add_executable( testlib_test_all
test_assert.cxx
test_macros.cxx
test_args.cxx
- test_root_dir.cxx
)
target_link_libraries( testlib_test_all itktestlib )
add_test( NAME testlib_assert COMMAND testlib_test_all test_assert )
add_test( NAME testlib_macros COMMAND testlib_test_all test_macros )
add_test( NAME testlib_args COMMAND testlib_test_all test_args one two )
-add_test( NAME testlib_root_dir COMMAND testlib_test_all test_root_dir )
add_test( NAME testlib_all COMMAND testlib_test_all all one two )
add_executable( testlib_test_link
diff --git a/core/testlib/tests/test_driver.cxx b/core/testlib/tests/test_driver.cxx
index 31316672016..50da4620454 100644
--- a/core/testlib/tests/test_driver.cxx
+++ b/core/testlib/tests/test_driver.cxx
@@ -3,7 +3,6 @@
DECLARE(test_assert);
DECLARE(test_macros);
DECLARE(test_args);
-DECLARE(test_root_dir);
void
register_tests()
@@ -11,7 +10,6 @@ register_tests()
REGISTER(test_assert);
REGISTER(test_macros);
REGISTER(test_args);
- REGISTER(test_root_dir);
}
DEFINE_MAIN;
diff --git a/core/testlib/tests/test_include.cxx b/core/testlib/tests/test_include.cxx
index 8edb603b8d4..a3541df6a2b 100644
--- a/core/testlib/tests/test_include.cxx
+++ b/core/testlib/tests/test_include.cxx
@@ -1,5 +1,4 @@
#include "testlib/testlib_register.h"
-#include "testlib/testlib_root_dir.h"
#include "testlib/testlib_test.h"
int
diff --git a/core/testlib/tests/test_root_dir.cxx b/core/testlib/tests/test_root_dir.cxx
deleted file mode 100644
index c763a8269e0..00000000000
--- a/core/testlib/tests/test_root_dir.cxx
+++ /dev/null
@@ -1,32 +0,0 @@
-#include
-#include
-#ifdef _MSC_VER
-# include "vcl_msvc_warnings.h"
-#endif
-#include "testlib/testlib_test.h"
-#include "testlib/testlib_root_dir.h"
-
-static void
-test_root_dir()
-{
- // Check that a file exists
- const std::string path = testlib_root_dir() + "/core/testlib/testlib_root_dir.h";
-
- std::fstream is(path.c_str(), std::ios::in);
-
- TEST("Opening file using testlib_root_dir", !is, false);
-
- if (!is)
- {
- std::cerr << "Unable to open " << path
- << "\ntestlib_root_dir() is probably wrong.\n"
- "Try setting $VXLSRC to the source root directory.\n";
- }
- else
- {
- is.close();
- std::cout << "Root Dir: " << testlib_root_dir() << " appears to be correct.\n";
- }
-}
-
-TESTMAIN(test_root_dir);
diff --git a/vcl/CMakeLists.txt b/vcl/CMakeLists.txt
index 2a75ceda68a..7adbd601ae4 100644
--- a/vcl/CMakeLists.txt
+++ b/vcl/CMakeLists.txt
@@ -1,7 +1,7 @@
# vcl/CMakeLists.txt
#
-# vcl is header-only: it provides the configured vcl_compiler.h /
-# vcl_where_root_dir.h and the vcl_msvc_warnings.h shim. The "vcl" INTERFACE
+# vcl is header-only: it provides the configured vcl_compiler.h and the
+# vcl_msvc_warnings.h shim. The "vcl" INTERFACE
# target carries the vcl and core include roots (source and generated) so any
# target that links it resolves , and
# without a global include_directories.
@@ -15,7 +15,6 @@ else()
set(_config_destination ${VXL_INSTALL_INCLUDE_DIR})
endif()
vxl_configure_file(${CMAKE_CURRENT_LIST_DIR}/vcl_compiler.h.in ${PROJECT_BINARY_DIR}/vcl_compiler.h ${_config_destination})
-vxl_configure_file(${CMAKE_CURRENT_LIST_DIR}/vcl_where_root_dir.h.in ${PROJECT_BINARY_DIR}/vcl_where_root_dir.h ${_config_destination})
install(FILES vcl_msvc_warnings.h
DESTINATION ${_config_destination}
diff --git a/vcl/tests/test_include.cxx b/vcl/tests/test_include.cxx
index 178d0c40ad4..dd5d6deaeaf 100644
--- a/vcl/tests/test_include.cxx
+++ b/vcl/tests/test_include.cxx
@@ -50,7 +50,6 @@
# include "vcl_msvc_warnings.h"
#endif
-#include
int
main()
diff --git a/vcl/vcl_where_root_dir.h.in b/vcl/vcl_where_root_dir.h.in
deleted file mode 100644
index 75ba086ef12..00000000000
--- a/vcl/vcl_where_root_dir.h.in
+++ /dev/null
@@ -1,15 +0,0 @@
-//:
-// \file
-// \author Tim Cootes/Bill Hoffman
-// \brief Allows cmake to set up macro giving name of VXL source root directory
-
-// Note: The make system (eg cmake) should generate a file, vcl_where_root_dir.h, from
-// this, in which the macro is set correctly.
-// For non-cmake systems this might cause a problem. In particular if there is
-// no vcl_where_root_dir.h, some other stuff might not compile.
-// If we supply a default vcl_where_root_dir.h, it would be changed by cmake, and
-// may get checked back into the repository by accident.
-
-#ifndef VCL_SOURCE_ROOT_DIR // file guard
-#define VCL_SOURCE_ROOT_DIR "@VXL_ROOT_SOURCE_DIR@"
-#endif
From 7dc5f87f9855856ed77bc656ba260da535da86af Mon Sep 17 00:00:00 2001
From: "Hans J. Johnson"
Date: Sun, 20 Sep 2026 16:22:15 -0500
Subject: [PATCH 2/2] COMP: Advance the VXL overlay pin past vcl_where_root_dir
Records the overlay commit whose content the preceding merge imported.
---
Modules/ThirdParty/VNL/UpdateFromUpstream.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/ThirdParty/VNL/UpdateFromUpstream.sh b/Modules/ThirdParty/VNL/UpdateFromUpstream.sh
index 0df6557a9a7..beae94a8253 100755
--- a/Modules/ThirdParty/VNL/UpdateFromUpstream.sh
+++ b/Modules/ThirdParty/VNL/UpdateFromUpstream.sh
@@ -8,7 +8,7 @@ readonly name='VXL'
readonly ownership='Insight Software Consortium Maintainers '
readonly subtree="Modules/ThirdParty/VNL/src/vxl"
readonly repo="https://github.com/InsightSoftwareConsortium/vxl.git"
-readonly tag="for/itk-vxl-master-ae2f579" # 2026-07-06 (ae2f579: remove obsolete vcl iterator test)
+readonly tag="for/itk-vxl-master-a0790d7" # 2026-09-20 (a0790d7: remove the unused vcl_where_root_dir mechanism)
readonly shortlog=false
readonly exact_tree_match=false
readonly paths="