mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
2c11c41115
This finally fixes our duplicated getopt functions from different sources and gives us an up to date and the most compatible implementation. isohybrid actually relies on a glibc-specific getopt behavior that we previously hacked into the reactos_support_code.c implementation derived from BSD/mingw-w64. widl also needs getopt and previously used an even older BSD-derived code.
48 lines
1.1 KiB
CMake
48 lines
1.1 KiB
CMake
|
|
if(MSVC)
|
|
if(MSVC_VERSION LESS 1900)
|
|
add_definitions(-Dsnprintf=_snprintf)
|
|
|
|
# Add this definition for WDK only, VS 9 doesn't like that
|
|
if(DEFINED ENV{DDKBUILDENV})
|
|
add_definitions(-Dvsnprintf=_vsnprintf)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
list(APPEND SOURCE
|
|
client.c
|
|
expr.c
|
|
hash.c
|
|
header.c
|
|
proxy.c
|
|
register.c
|
|
server.c
|
|
typegen.c
|
|
typelib.c
|
|
typetree.c
|
|
utils.c
|
|
widl.c
|
|
write_msft.c
|
|
write_sltg.c
|
|
parser.yy.c
|
|
parser.tab.c
|
|
../port/getopt.c
|
|
../port/getopt1.c
|
|
../port/mkstemps.c)
|
|
|
|
# Taken from widl.rbuild
|
|
add_definitions(-DINT16=SHORT)
|
|
add_host_tool(widl ${SOURCE})
|
|
target_link_libraries(widl wpphost)
|
|
|
|
if(MSVC)
|
|
# Disable warning "'>': signed/unsigned mismatch"
|
|
add_target_compile_flags(widl "/wd4018")
|
|
|
|
# Disable warning "unary minus operator applied to unsigned type, result still unsigned"
|
|
add_target_compile_flags(widl "/wd4146")
|
|
|
|
# Disable warning "'=': conversion from 'a' to 'b', possible loss of data"
|
|
add_target_compile_flags(widl "/wd4244")
|
|
endif()
|