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)

View File

@ -22,7 +22,7 @@ ParseMakefileVars("${KERNELDIR}/KERNEL")
ParseMakefileVars("${KERNELDIR}/KERNEL.${TARGET_CORE}")
if (${ARCH} STREQUAL "x86")
if (NOT MSVC)
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
GenerateNamedObjects("${KERNELDIR}/cpuid.S" "" "" false "" "" true)
else()
GenerateNamedObjects("${KERNELDIR}/cpuid_win.c" "" "" false "" "" true)