2011-05-16 13:12:07 +00:00
|
|
|
|
2012-08-01 23:25:06 +00:00
|
|
|
if(MSVC)
|
2015-04-30 21:48:26 +00:00
|
|
|
if(MSVC_VERSION LESS 1900)
|
|
|
|
add_definitions(-Dsnprintf=_snprintf)
|
2012-09-17 22:43:37 +00:00
|
|
|
|
2015-04-30 21:48:26 +00:00
|
|
|
# Add this definition for WDK only, VS 9 doesn't like that
|
|
|
|
if(DEFINED ENV{DDKBUILDENV})
|
|
|
|
add_definitions(-Dvsnprintf=_vsnprintf)
|
|
|
|
endif()
|
2012-09-17 22:43:37 +00:00
|
|
|
endif()
|
2012-08-01 23:25:06 +00:00
|
|
|
endif()
|
|
|
|
|
2021-01-28 03:36:00 +00:00
|
|
|
FLEX_TARGET(p_scanner parser.l ${CMAKE_CURRENT_BINARY_DIR}/parser.yy.c)
|
|
|
|
BISON_TARGET(p_parser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.tab.c COMPILE_FLAGS "-p parser_")
|
|
|
|
ADD_FLEX_BISON_DEPENDENCY(p_scanner p_parser)
|
|
|
|
|
2011-05-16 13:12:07 +00:00
|
|
|
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
|
2016-07-03 11:16:23 +00:00
|
|
|
write_sltg.c
|
2021-01-28 03:36:00 +00:00
|
|
|
${FLEX_p_scanner_OUTPUTS}
|
|
|
|
${BISON_p_parser_OUTPUTS}
|
2019-04-27 14:19:26 +00:00
|
|
|
../port/getopt.c
|
|
|
|
../port/getopt1.c
|
|
|
|
../port/mkstemps.c)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
add_definitions(-DINT16=SHORT)
|
2015-09-06 16:44:30 +00:00
|
|
|
add_host_tool(widl ${SOURCE})
|
2019-11-15 13:07:46 +00:00
|
|
|
target_link_libraries(widl PRIVATE host_includes wpphost)
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
# Disable warning "'>': signed/unsigned mismatch"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(widl PRIVATE "/wd4018")
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
# Disable warning "unary minus operator applied to unsigned type, result still unsigned"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(widl PRIVATE "/wd4146")
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
# Disable warning "'=': conversion from 'a' to 'b', possible loss of data"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(widl PRIVATE "/wd4244")
|
2019-04-15 11:29:33 +00:00
|
|
|
endif()
|