Skip to content

Commit

Permalink
Refactor CPU_EXTENSIONS logic for MSVC with Clang (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 authored Jul 14, 2023
1 parent a5b0e7f commit 321b805
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,18 @@ file(GLOB AWS_ARCH_SRC
)

if (USE_CPU_EXTENSIONS)
if (MSVC AND AWS_ARCH_INTEL)
file(GLOB AWS_ARCH_SRC
"source/intel/visualc/*.c"
)

source_group("Source Files\\intel\\visualc" FILES ${AWS_ARCH_SRC})

elseif(AWS_ARCH_INTEL AND AWS_HAVE_GCC_INLINE_ASM)
file(GLOB AWS_ARCH_SRC
"source/intel/asm/*.c"
if(AWS_ARCH_INTEL)
# First, check if inline assembly is available. Inline assembly can also be supported by MSVC if the compiler in use is Clang.
if(AWS_HAVE_GCC_INLINE_ASM)
file(GLOB AWS_ARCH_SRC
"source/intel/asm/*.c"
)
elseif (MSVC)
file(GLOB AWS_ARCH_SRC
"source/intel/visualc/*.c"
)
source_group("Source Files\\intel\\visualc" FILES ${AWS_ARCH_SRC})
endif()
endif()

if (MSVC AND AWS_ARCH_ARM64)
Expand Down

0 comments on commit 321b805

Please sign in to comment.