fix win32 clang build

This commit is contained in:
Trim21 2024-12-25 04:12:27 +08:00
parent db3e2379b9
commit c1461d009a
No known key found for this signature in database
GPG Key ID: 809F01CFB0A797FB
2 changed files with 7 additions and 3 deletions

View File

@ -16,10 +16,13 @@ else()
message(WARNING ">> IPO disabled. You will not get the best performance.")
endif()
if(WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8 /jumptablerdata /GS-")
add_compile_options(/wd4267 /wd4244)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox")

View File

@ -8,6 +8,7 @@
#if PY_SYS_PLATFORM == 0
#include <direct.h>
#include <io.h>
int platform_chdir(const char* path) { return _chdir(path); }