Merge pull request #1497 from junghans/check_for_immintrin

cmake: check for immintrin.h
This commit is contained in:
Axel Kohlmeyer 2019-06-07 10:57:56 -04:00 committed by GitHub
commit 1f1a0f95b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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)")