reactos/sdk/tools/wpp/CMakeLists.txt
Joachim Henze ce4badc3ab [0.4.7][WPP] Mute 3 MSVC2010SP1 x86 dbg warnings C4146 CORE-18104
warnings can be observed with MSVC 2010SP1 (16.0.40219.1) x86 target in dbg configuration:
[7441/11751] Building C object sdk\tools\wpp\CMakeFiles\wpp.dir\ppl.yy.c.obj
[7442/11751] Building C object sdk\tools\wpp\CMakeFiles\wpp.dir\ppy.tab.c.obj
ppy.y(402) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
ppy.y(402) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
ppy.y(402) : warning C4146: unary minus operator applied to unsigned type, result still unsigned

partial pick from: 0.4.13-dev-132-g f47f45dbdd

Yes the /wd4244 wasn't really necessary for x86, but only for x64,
but taking it with me as well synced the file to 100%.
2022-04-08 00:56:20 +02:00

46 lines
1 KiB
CMake

if(MSVC)
if(MSVC_VERSION LESS 1900)
add_definitions(
-Dsnprintf=_snprintf
-Dstrtoull=_strtoui64
-Dstrtoll=_strtoi64)
# Add this definition for WDK only, VS 9 doesn't like that
if(DEFINED ENV{DDKBUILDENV})
add_definitions(-Dvsnprintf=_vsnprintf)
endif()
endif()
# Disable warning " unary minus operator applied to unsigned type, result still unsigned"
add_compile_flags("/wd4146")
# Disable warning "'=': conversion from 'a' to 'b', possible loss of data"
add_compile_flags("/wd4244")
endif()
if(CMAKE_CROSSCOMPILING)
add_definitions(
-D_DLL -D__USE_CRTIMP
-D__NO_ISOCEXT
-Dstrtoull=_strtoui64
-Dstrtoll=_strtoi64
-Dopen=_open
-Dclose=_close)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
endif()
list(APPEND SOURCE
preproc.c
wpp.c
ppl.yy.c
ppy.tab.c)
if(CMAKE_CROSSCOMPILING)
add_library(wpp ${SOURCE})
else()
add_library(wpphost ${SOURCE})
endif()