mirror of
https://github.com/reactos/reactos.git
synced 2025-05-16 15:50:24 +00:00
[HOST_TOOLS]
Defining -fshort-wchar globally for all host tools breaks every possibility to interact with the host's Unicode support for some operating systems with 4 byte wchar_t (like Mac OS X). Let's better define no additional global flags and only add -fshort-wchar for the host modules that really need a 2-byte wchar_t for writing ReactOS data files. These are cmlibhost, inflibhost, mkhive and xml2sdb. Also add -Wno-multichar only for cmlibhost, where it's required. In preparation for CORE-11988 svn path=/trunk/; revision=72899
This commit is contained in:
parent
2a4fd5b529
commit
dc5f65c8d9
5 changed files with 19 additions and 10 deletions
|
@ -94,8 +94,6 @@ if(NOT CMAKE_CROSSCOMPILING)
|
|||
add_definitions(/D_ALLOW_KEYWORD_MACROS)
|
||||
endif()
|
||||
add_definitions(/Dinline=__inline)
|
||||
else()
|
||||
add_compile_flags("-fshort-wchar -Wno-multichar")
|
||||
endif()
|
||||
|
||||
include_directories(sdk/include/host)
|
||||
|
|
|
@ -26,5 +26,10 @@ else()
|
|||
-D__NO_CTYPE_INLINES
|
||||
-DCMLIB_HOST)
|
||||
add_library(cmlibhost ${SOURCE})
|
||||
|
||||
if(NOT MSVC)
|
||||
add_target_compile_flags(cmlibhost "-fshort-wchar -Wno-multichar")
|
||||
endif()
|
||||
|
||||
target_link_libraries(cmlibhost unicode)
|
||||
endif()
|
||||
|
|
|
@ -23,8 +23,10 @@ else()
|
|||
|
||||
add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST)
|
||||
add_library(inflibhost ${SOURCE})
|
||||
|
||||
if(NOT MSVC)
|
||||
add_target_compile_flags(inflibhost "-Wpointer-arith -Wwrite-strings")
|
||||
add_target_compile_flags(inflibhost "-fshort-wchar -Wpointer-arith -Wwrite-strings")
|
||||
endif()
|
||||
|
||||
target_link_libraries(inflibhost unicode)
|
||||
endif()
|
||||
|
|
|
@ -15,4 +15,9 @@ list(APPEND SOURCE
|
|||
rtl.c)
|
||||
|
||||
add_host_tool(mkhive ${SOURCE})
|
||||
|
||||
if(NOT MSVC)
|
||||
add_target_compile_flags(mkhive "-fshort-wchar")
|
||||
endif()
|
||||
|
||||
target_link_libraries(mkhive unicode cmlibhost inflibhost)
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
|
||||
add_definitions(-DSDBWRITE_HOSTTOOL=1)
|
||||
|
||||
if(MSVC)
|
||||
set_property(SOURCE main.cpp tinyxml2.cpp xml2sdb.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " /EHsc")
|
||||
else()
|
||||
add_compile_flags("-fshort-wchar -Wno-multichar")
|
||||
endif()
|
||||
|
||||
|
||||
list(APPEND SOURCE
|
||||
main.cpp
|
||||
tinyxml2.cpp
|
||||
|
@ -17,3 +10,9 @@ list(APPEND SOURCE
|
|||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/dll/appcompat/apphelp)
|
||||
add_host_tool(xml2sdb ${SOURCE})
|
||||
|
||||
if(MSVC)
|
||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS " /EHsc")
|
||||
else()
|
||||
add_target_compile_flags(xml2sdb "-fshort-wchar")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue