Commit 2ebc40de authored by Christoph Junghans's avatar Christoph Junghans
Browse files

cmake: check for immintrin.h

parent 0849e03d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1134,6 +1134,12 @@ if(PKG_OPT)
endif()

if(PKG_USER-INTEL)
  include(CheckIncludeFile)
  check_include_file(immintrin.h FOUND_IMMINTRIN)
  if(NOT FOUND_IMMINTRIN)
    message(FATAL_ERROR "immintrin.h header not found, Intel package won't work without it")
  endif()

  add_definitions(-DLMP_USER_INTEL)

  set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-INTEL (cpu or knl)")