Find{BLAS,LAPACK}: Add test case covering Intel MKL
diff --git a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake
index 1ad3ac4..f665f7d 100644
--- a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake
+++ b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake
@@ -1,5 +1,5 @@
 set(CMake_TEST_FindALSA "ON" CACHE BOOL "")
-set(CMake_TEST_FindBLAS "ON" CACHE BOOL "")
+set(CMake_TEST_FindBLAS "All" CACHE STRING "")
 set(CMake_TEST_FindBoost "ON" CACHE BOOL "")
 set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "")
 set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "")
@@ -23,7 +23,7 @@
 set(CMake_TEST_FindIntl "ON" CACHE BOOL "")
 set(CMake_TEST_FindJPEG "ON" CACHE BOOL "")
 set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "")
-set(CMake_TEST_FindLAPACK "ON" CACHE BOOL "")
+set(CMake_TEST_FindLAPACK "All" CACHE STRING "")
 set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "")
 set(CMake_TEST_FindLibinput "ON" CACHE BOOL "")
 set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_debian10_ninja.cmake b/.gitlab/ci/configure_debian10_ninja.cmake
index d925387..9de3013 100644
--- a/.gitlab/ci/configure_debian10_ninja.cmake
+++ b/.gitlab/ci/configure_debian10_ninja.cmake
@@ -1,5 +1,5 @@
 set(CMake_TEST_FindALSA "ON" CACHE BOOL "")
-set(CMake_TEST_FindBLAS "ON" CACHE BOOL "")
+set(CMake_TEST_FindBLAS "All" CACHE STRING "")
 set(CMake_TEST_FindBoost "ON" CACHE BOOL "")
 set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "")
 set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "")
@@ -23,7 +23,7 @@
 set(CMake_TEST_FindIntl "ON" CACHE BOOL "")
 set(CMake_TEST_FindJPEG "ON" CACHE BOOL "")
 set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "")
-set(CMake_TEST_FindLAPACK "ON" CACHE BOOL "")
+set(CMake_TEST_FindLAPACK "All" CACHE STRING "")
 set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "")
 set(CMake_TEST_FindLibinput "ON" CACHE BOOL "")
 set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_fedora33_makefiles.cmake b/.gitlab/ci/configure_fedora33_makefiles.cmake
index 882ffcd..4143134 100644
--- a/.gitlab/ci/configure_fedora33_makefiles.cmake
+++ b/.gitlab/ci/configure_fedora33_makefiles.cmake
@@ -1,5 +1,5 @@
 set(CMake_TEST_FindALSA "ON" CACHE BOOL "")
-set(CMake_TEST_FindBLAS "ON" CACHE BOOL "")
+set(CMake_TEST_FindBLAS "All" CACHE STRING "")
 set(CMake_TEST_FindBoost "ON" CACHE BOOL "")
 set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "")
 set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "")
@@ -23,7 +23,7 @@
 set(CMake_TEST_FindIntl "ON" CACHE BOOL "")
 set(CMake_TEST_FindJPEG "ON" CACHE BOOL "")
 set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "")
-set(CMake_TEST_FindLAPACK "ON" CACHE BOOL "")
+set(CMake_TEST_FindLAPACK "All" CACHE STRING "")
 set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "")
 set(CMake_TEST_FindLibinput "ON" CACHE BOOL "")
 set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_intelcompiler_common.cmake b/.gitlab/ci/configure_intelcompiler_common.cmake
index 20863a2..be3d15b 100644
--- a/.gitlab/ci/configure_intelcompiler_common.cmake
+++ b/.gitlab/ci/configure_intelcompiler_common.cmake
@@ -1 +1,4 @@
+set(CMake_TEST_FindBLAS "Intel10_64lp" CACHE STRING "")
+set(CMake_TEST_FindLAPACK "Intel10_64lp" CACHE STRING "")
+
 include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/Tests/FindBLAS/CMakeLists.txt b/Tests/FindBLAS/CMakeLists.txt
index 667195d..47ec568 100644
--- a/Tests/FindBLAS/CMakeLists.txt
+++ b/Tests/FindBLAS/CMakeLists.txt
@@ -1,10 +1,12 @@
-add_test(NAME FindBLAS.Test COMMAND
-  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
-  --build-and-test
-  "${CMake_SOURCE_DIR}/Tests/FindBLAS/Test"
-  "${CMake_BINARY_DIR}/Tests/FindBLAS/Test"
-  ${build_generator_args}
-  --build-project TestFindBLAS
-  --build-options ${build_options}
-  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
-  )
+foreach(vendor IN LISTS CMake_TEST_FindBLAS)
+  add_test(NAME FindBLAS.Test_${vendor} COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindBLAS/Test"
+    "${CMake_BINARY_DIR}/Tests/FindBLAS/Test_${vendor}"
+    ${build_generator_args}
+    --build-project TestFindBLAS
+    --build-options ${build_options} -DBLA_VENDOR=${vendor}
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+endforeach()
diff --git a/Tests/FindBLAS/Test/CMakeLists.txt b/Tests/FindBLAS/Test/CMakeLists.txt
index 59418f3..1bebf8e 100644
--- a/Tests/FindBLAS/Test/CMakeLists.txt
+++ b/Tests/FindBLAS/Test/CMakeLists.txt
@@ -11,3 +11,9 @@
 add_executable(test_var main.c)
 target_link_libraries(test_var PRIVATE ${BLAS_LIBRARIES})
 add_test(NAME test_var COMMAND test_var)
+
+if(BLA_VENDOR STREQUAL "Intel10_64lp")
+  if(NOT BLAS_LIBRARIES MATCHES "^[^;]*mkl_intel_lp64")
+    message(FATAL_ERROR "BLAS_LIBRARIES does not start in mkl_intel_lp64:\n ${BLAS_LIBRARIES}")
+  endif()
+endif()
diff --git a/Tests/FindLAPACK/CMakeLists.txt b/Tests/FindLAPACK/CMakeLists.txt
index 2081d59..5e2ea7a 100644
--- a/Tests/FindLAPACK/CMakeLists.txt
+++ b/Tests/FindLAPACK/CMakeLists.txt
@@ -1,10 +1,12 @@
-add_test(NAME FindLAPACK.Test COMMAND
-  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
-  --build-and-test
-  "${CMake_SOURCE_DIR}/Tests/FindLAPACK/Test"
-  "${CMake_BINARY_DIR}/Tests/FindLAPACK/Test"
-  ${build_generator_args}
-  --build-project TestFindLAPACK
-  --build-options ${build_options}
-  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
-  )
+foreach(vendor IN LISTS CMake_TEST_FindLAPACK)
+  add_test(NAME FindLAPACK.Test_${vendor} COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindLAPACK/Test"
+    "${CMake_BINARY_DIR}/Tests/FindLAPACK/Test_${vendor}"
+    ${build_generator_args}
+    --build-project TestFindLAPACK
+    --build-options ${build_options} -DBLA_VENDOR=${vendor}
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+endforeach()
diff --git a/Tests/FindLAPACK/Test/CMakeLists.txt b/Tests/FindLAPACK/Test/CMakeLists.txt
index 8afa36a..67fb9bd 100644
--- a/Tests/FindLAPACK/Test/CMakeLists.txt
+++ b/Tests/FindLAPACK/Test/CMakeLists.txt
@@ -11,3 +11,9 @@
 add_executable(test_var main.c)
 target_link_libraries(test_var PRIVATE ${LAPACK_LIBRARIES})
 add_test(NAME test_var COMMAND test_var)
+
+if(BLA_VENDOR STREQUAL "Intel10_64lp")
+  if(NOT LAPACK_LIBRARIES MATCHES "^[^;]*mkl_intel_lp64")
+    message(FATAL_ERROR "LAPACK_LIBRARIES does not start in mkl_intel_lp64:\n ${LAPACK_LIBRARIES}")
+  endif()
+endif()