set(FLAGS_SSE    "-xsse")
set(FLAGS_SSE2   "-xsse2")
set(FLAGS_SSE3   "-xsse3")
set(FLAGS_SSSE3  "-xssse3")
set(FLAGS_SSE41  "-xsse4.1")
set(FLAGS_SSE42  "-xsse4.2")
set(FLAGS_AVX    "-xAVX")
set(FLAGS_AVX2   "-xCORE-AVX2")
set(FLAGS_AVX512 "-xCORE-AVX512")
set(FLAGS_NATIVE "-march=native")
set(FLAGS_KNC    "-mmic")
set(FLAGS_KNL    "-xMIC-AVX512")

if ("${TARGET_ISA}" MATCHES "knc|KNC")
  list(APPEND CMAKE_EXE_LINKER_FLAGS -mmic)
  list(APPEND CMAKE_SHARED_LINKER_FLAGS -static-intel)
  set(KNC True CACHE BOOL INTERNAL "Intel Xeon Phi support")
endif()
