Advertisement
Guest User

Untitled

a guest
May 27th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. if (MSVC_IDE)
  2. IF(CLANG_IN_VS STREQUAL "1")
  3. # special AVX option for source files with *_avx.cpp pattern
  4. file(GLOB_RECURSE SRCS_AVX "*_avx.cpp")
  5. set_source_files_properties(${SRCS_AVX} PROPERTIES COMPILE_FLAGS " -mavx ")
  6.  
  7. # special AVX2 option for source files with *_avx2.cpp pattern
  8. file(GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp")
  9. set_source_files_properties(${SRCS_AVX2} PROPERTIES COMPILE_FLAGS " -mavx2 -mfma ")
  10. ELSE()
  11. # special AVX option for source files with *_avx.cpp pattern
  12. file(GLOB_RECURSE SRCS_AVX "*_avx.cpp")
  13. set_source_files_properties(${SRCS_AVX} PROPERTIES COMPILE_FLAGS " /arch:AVX ")
  14.  
  15. # special AVX2 option for source files with *_avx2.cpp pattern
  16. file(GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp")
  17. set_source_files_properties(${SRCS_AVX2} PROPERTIES COMPILE_FLAGS " /arch:AVX2 ")
  18. ENDIF()
  19. elseif (MINGW)
  20. # special AVX option for source files with *_avx.cpp pattern
  21. file(GLOB_RECURSE SRCS_AVX "*_avx.cpp")
  22. set_source_files_properties(${SRCS_AVX} PROPERTIES COMPILE_FLAGS -mavx )
  23.  
  24. # special AVX2 option for source files with *_avx2.cpp pattern
  25. file(GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp")
  26. set_source_files_properties(${SRCS_AVX2} PROPERTIES COMPILE_FLAGS -mavx2 -mfma)
  27. endif()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement