From 53f6759d8fa07d34a1dc27c533c2b3b59cb5bea3 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Thu, 9 Mar 2017 14:30:57 +0100 Subject: [PATCH] CMake: Skip MIC builds with non-Makefile generators Signed-off-by: Matthias Kretz --- cmake/FindMIC.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/FindMIC.cmake b/cmake/FindMIC.cmake index 82d2c9f63..c14bf9ef2 100644 --- a/cmake/FindMIC.cmake +++ b/cmake/FindMIC.cmake @@ -56,7 +56,12 @@ set(MIC_FOUND false) set(MIC_NATIVE_FOUND false) set(MIC_OFFLOAD_FOUND false) -option(ENABLE_MIC "Enable native builds for the MIC architecture (Intel Knights Corner)" ON) +if(CMAKE_GENERATOR MATCHES "Makefile") + option(ENABLE_MIC "Enable native builds for the MIC architecture (Intel Knights Corner)" ON) +else() + message(STATUS "MIC builds are only supported with a Makefile generator") + set(ENABLE_MIC false) +endif() if(ENABLE_MIC) file(GLOB _intel_dirs "/opt/intel/compilers_and_libraries_*/linux") if ("${_intel_dirs}" STREQUAL "")