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
|
|
|
|
-Dstrtoull=_strtoui64
|
|
|
|
-Dstrtoll=_strtoi64)
|
2012-09-15 15:59:06 +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-15 15:59:06 +00:00
|
|
|
endif()
|
2019-04-15 11:29:33 +00:00
|
|
|
|
2020-09-21 10:16:02 +00:00
|
|
|
# Disable warnings
|
|
|
|
add_compile_options(
|
2020-10-16 13:57:20 +00:00
|
|
|
/wd4146 # "unary minus operator applied to unsigned type, result still unsigned"
|
2020-09-21 10:16:02 +00:00
|
|
|
/wd4244) # "'=': conversion from 'a' to 'b', possible loss of data"
|
2019-04-15 11:29:33 +00:00
|
|
|
|
2012-08-01 23:25:06 +00:00
|
|
|
endif()
|
|
|
|
|
2013-09-14 10:30:44 +00:00
|
|
|
if(CMAKE_CROSSCOMPILING)
|
|
|
|
add_definitions(
|
|
|
|
-D_DLL -D__USE_CRTIMP
|
|
|
|
-D__NO_ISOCEXT
|
|
|
|
-Dstrtoull=_strtoui64
|
|
|
|
-Dstrtoll=_strtoi64
|
|
|
|
-Dopen=_open
|
|
|
|
-Dclose=_close)
|
2016-04-20 12:36:25 +00:00
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
2013-09-14 10:30:44 +00:00
|
|
|
endif()
|
|
|
|
|
2021-01-28 03:36:00 +00:00
|
|
|
FLEX_TARGET(pp_scanner ppl.l ${CMAKE_CURRENT_BINARY_DIR}/ppl.yy.c)
|
|
|
|
BISON_TARGET(pp_parser ppy.y ${CMAKE_CURRENT_BINARY_DIR}/ppy.tab.c COMPILE_FLAGS "-p ppy_")
|
|
|
|
ADD_FLEX_BISON_DEPENDENCY(pp_scanner pp_parser)
|
|
|
|
|
2011-05-16 13:12:07 +00:00
|
|
|
list(APPEND SOURCE
|
|
|
|
preproc.c
|
2021-01-28 03:36:00 +00:00
|
|
|
wpp.c)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2013-09-14 10:30:44 +00:00
|
|
|
if(CMAKE_CROSSCOMPILING)
|
2021-01-28 03:36:00 +00:00
|
|
|
add_library(wpp ${SOURCE} ${FLEX_pp_scanner_OUTPUT_SOURCE} ${BISON_pp_parser_OUTPUT_SOURCE})
|
2013-09-14 10:30:44 +00:00
|
|
|
else()
|
2021-01-28 03:36:00 +00:00
|
|
|
add_library(wpphost ${SOURCE} ${FLEX_pp_scanner_OUTPUTS} ${BISON_pp_parser_OUTPUTS})
|
2019-11-15 13:07:46 +00:00
|
|
|
target_link_libraries(wpphost PRIVATE host_includes)
|
2013-09-14 10:30:44 +00:00
|
|
|
endif()
|