Files
uc2/cmake/UC2Platform.cmake
Eremey Valetov 40af7e877e Add Windows MSVC compilation target and CI
Restructure compat layer: #include_next headers moved to posix/ for
MinGW, new standalone headers in msvc/ for MSVC (unistd.h, utime.h,
getopt.h). Add getopt() implementation, chmod/unlink/chdir compat
functions, MSVC CRT initializer for UTF-8 console, _pgmptr fix.
2026-03-11 08:16:11 -04:00

13 lines
391 B
CMake

# Platform detection and compiler flags for UC2
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wall -Wextra -Wno-unused-parameter)
if(DJGPP)
# DJGPP needs gnu99 for PATH_MAX and other POSIX extensions
add_compile_options(-std=gnu99)
endif()
elseif(MSVC)
add_compile_options(/W3)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()