check compiler is msvc instead of msvc

This commit is contained in:
Isuru Fernando
2017-07-28 11:49:39 +05:30
parent ae93532fd3
commit dc24914415
2 changed files with 6 additions and 7 deletions

View File

@@ -63,15 +63,14 @@ set(GETARCH_SRC
${CPUIDEMO}
)
if (NOT MSVC)
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
#Use generic for MSVC now
message("MSVC")
set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_GENERIC)
else()
list(APPEND GETARCH_SRC ${PROJECT_SOURCE_DIR}/cpuid.S)
endif ()
if (MSVC)
#Use generic for MSVC now
set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_GENERIC)
endif()
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
# disable WindowsStore strict CRT checks
set(GETARCH_FLAGS ${GETARCH_FLAGS} -D_CRT_SECURE_NO_WARNINGS)