diff --git a/CMakeLists.txt b/CMakeLists.txt index 5933ea00d0..b6b09bf686 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,6 +213,12 @@ if(MSVC) set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/lib/Release) endif () +# 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() + # 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})