Browse Source

check compiler is msvc instead of msvc

tags/v0.3.0
Isuru Fernando 8 years ago
parent
commit
dc24914415
2 changed files with 6 additions and 7 deletions
  1. +5
    -6
      cmake/prebuild.cmake
  2. +1
    -1
      kernel/CMakeLists.txt

+ 5
- 6
cmake/prebuild.cmake 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)


+ 1
- 1
kernel/CMakeLists.txt 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)


Loading…
Cancel
Save