Skip to content

Commit 994a68c

Browse files
committed
detect clang properly even if it is running under MSVC
1 parent b4144b9 commit 994a68c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if (MSVC)
1+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
22
add_compile_options(
33
"$<$<CONFIG:DEBUG>:/W4>"
44
"$<$<CONFIG:RELEASE>:/O2>"
@@ -18,7 +18,7 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64)|(AMD64)|(x86_64)")
1818
option(USE_NATIVE_ARCH "Enable architecture-specific optimizations" OFF)
1919

2020
if (USE_NATIVE_ARCH)
21-
if (MSVC)
21+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
2222
add_compile_options(/arch:AVX2)
2323
message(STATUS "Enabling /arch:AVX2")
2424

0 commit comments

Comments
 (0)