From 22b11b4d5faeeaff019dcb3031717e8d333cccc3 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 1 Dec 2026 08:12:37 -0500 Subject: [PATCH 1/3] CMake: Disable test_prep targets --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5933ea00d0..7ed2b6635c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,6 +213,17 @@ if(MSVC) set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/lib/Release) endif () +# Turn off test_prep targets. With CMake 4.5 this is +# on by default, and the test targets with colons in +# lapack-netlib are not allowed, see: +# +# https://github.com/OpenMathLib/OpenBLAS/issues/6294 +# +# If a user wants these targets, they can re-enable them with +# -DCMAKE_SKIP_TEST_PREP_TARGETS=OFF and should use the Ninja generator, +# which does not have this restriction. +set(CMAKE_SKIP_TEST_PREP_TARGETS ON) + # get obj vars into format that add_library likes: $ (see http://www.cmake.org/cmake/help/v3.0/command/add_library.html) set(TARGET_OBJS "") foreach (SUBDIR ${SUBDIRS}) From 14636ca63861820d2079c1656bd5025b6e087655 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Tue, 1 Dec 2026 14:33:44 -0500 Subject: [PATCH 2/3] Update CMakeLists.txt Co-authored-by: Brad King --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ed2b6635c..7e340b2ab5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,7 +222,9 @@ endif () # If a user wants these targets, they can re-enable them with # -DCMAKE_SKIP_TEST_PREP_TARGETS=OFF and should use the Ninja generator, # which does not have this restriction. -set(CMAKE_SKIP_TEST_PREP_TARGETS ON) +if(NOT DEFINED CMAKE_SKIP_TEST_PREP_TARGETS) + set(CMAKE_SKIP_TEST_PREP_TARGETS ON) +endif() # get obj vars into format that add_library likes: $ (see http://www.cmake.org/cmake/help/v3.0/command/add_library.html) set(TARGET_OBJS "") From 4716fae3155ed1e34c48bcaa86fe7be89d92bce8 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 1 Dec 2026 14:37:44 -0500 Subject: [PATCH 3/3] Only unset for Makefiles --- CMakeLists.txt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e340b2ab5..b6b09bf686 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,16 +213,9 @@ if(MSVC) set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/lib/Release) endif () -# Turn off test_prep targets. With CMake 4.5 this is -# on by default, and the test targets with colons in -# lapack-netlib are not allowed, see: -# -# https://github.com/OpenMathLib/OpenBLAS/issues/6294 -# -# If a user wants these targets, they can re-enable them with -# -DCMAKE_SKIP_TEST_PREP_TARGETS=OFF and should use the Ninja generator, -# which does not have this restriction. -if(NOT DEFINED CMAKE_SKIP_TEST_PREP_TARGETS) +# Makefile generators cannot create test_prep targets for LAPACK test names +# containing colons (#6294). CMake reads this setting from the top-level directory. +if(CMAKE_GENERATOR MATCHES "Makefiles$" AND NOT DEFINED CMAKE_SKIP_TEST_PREP_TARGETS) set(CMAKE_SKIP_TEST_PREP_TARGETS ON) endif()