Skip to content

Commit

Permalink
CMake: Skip MIC builds with non-Makefile generators
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kretz <[email protected]>
  • Loading branch information
mattkretz committed Mar 9, 2017
1 parent 9ac1335 commit 53f6759
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/FindMIC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Expand Down

0 comments on commit 53f6759

Please sign in to comment.