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.
13 lines
391 B
CMake
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()
|