mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:13:03 +00:00
[CMAKE] Get rid of add_compile_flags
Use add_compile_options and the like instead
This commit is contained in:
parent
84621b3634
commit
00ed72d7e8
26 changed files with 158 additions and 198 deletions
|
@ -1,6 +1,6 @@
|
|||
|
||||
if(GCC)
|
||||
add_compile_flags("-fno-builtin")
|
||||
if (GCC)
|
||||
add_compile_options(-fno-builtin)
|
||||
endif()
|
||||
|
||||
include(ntdll_crt_apitest.cmake)
|
||||
|
|
|
@ -23,10 +23,6 @@ add_executable(dllexport_test dllexport_test.c)
|
|||
set_module_type(dllexport_test win32cui)
|
||||
add_importlibs(dllexport_test dllexport_test_dll1 msvcrt kernel32 ntdll)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_flags("/Zc:wchar_t-")
|
||||
endif()
|
||||
|
||||
# framedyn is skipped in the clang-cl build
|
||||
if(NOT USE_CLANG_CL)
|
||||
|
||||
|
@ -34,7 +30,9 @@ add_library(dllimport_test MODULE dllimport_framedyn.cpp)
|
|||
set_module_type(dllimport_test module)
|
||||
add_importlibs(dllimport_test framedyn)
|
||||
|
||||
if(NOT MSVC)
|
||||
if (MSVC)
|
||||
target_compile_options(dllimport_test PRIVATE /Zc:wchar_t-)
|
||||
else()
|
||||
target_link_libraries(dllimport_test framedynex)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
|
||||
add_definitions(-DUSE_WINE_TODOS)
|
||||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-format-overflow")
|
||||
endif()
|
||||
|
||||
list(APPEND SOURCE
|
||||
advpack.c
|
||||
files.c
|
||||
|
@ -12,7 +6,13 @@ list(APPEND SOURCE
|
|||
testlist.c)
|
||||
|
||||
add_executable(advpack_winetest ${SOURCE})
|
||||
target_link_libraries(advpack_winetest)
|
||||
|
||||
target_compile_definitions(advpack_winetest PRIVATE USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(advpack_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
set_module_type(advpack_winetest win32cui)
|
||||
add_importlibs(advpack_winetest advpack cabinet advapi32 msvcrt kernel32)
|
||||
add_rostests_file(TARGET advpack_winetest)
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
|
||||
add_definitions(-DUSE_WINE_TODOS)
|
||||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-format-overflow")
|
||||
endif()
|
||||
|
||||
list(APPEND SOURCE
|
||||
asmcache.c
|
||||
asmenum.c
|
||||
|
@ -13,6 +7,13 @@ list(APPEND SOURCE
|
|||
testlist.c)
|
||||
|
||||
add_executable(fusion_winetest ${SOURCE})
|
||||
|
||||
target_compile_definitions(fusion_winetest PRIVATE USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(fusion_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
set_module_type(fusion_winetest win32cui)
|
||||
add_importlibs(fusion_winetest user32 msvcrt kernel32)
|
||||
add_rostests_file(TARGET fusion_winetest)
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
|
||||
add_definitions(
|
||||
-DUSE_WINE_TODOS
|
||||
-D__WINESRC__)
|
||||
|
||||
if(MSVC_IDE)
|
||||
# msi_winetest.rc: let rc.exe find custom.dll in its subdirectory, i.e. Debug.
|
||||
include_directories($<TARGET_FILE_DIR:custom>)
|
||||
endif()
|
||||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-format-overflow")
|
||||
endif()
|
||||
|
||||
spec2def(custom.dll custom.spec)
|
||||
add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def)
|
||||
target_link_libraries(custom uuid)
|
||||
|
@ -43,6 +30,17 @@ add_executable(msi_winetest
|
|||
${PCH_SKIP_SOURCE}
|
||||
msi_winetest.rc)
|
||||
|
||||
target_compile_definitions(msi_winetest PRIVATE __WINESRC__ USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(msi_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
# msi_winetest.rc: let rc.exe find custom.dll in its subdirectory, i.e. Debug.
|
||||
if (MSVC_IDE)
|
||||
target_include_directories(msi_winetest PRIVATE $<$<COMPILE_LANGUAGE:RC>:$<TARGET_FILE_DIR:custom>>)
|
||||
endif()
|
||||
|
||||
target_link_libraries(msi_winetest uuid)
|
||||
set_module_type(msi_winetest win32cui)
|
||||
add_importlibs(msi_winetest cabinet msi shell32 ole32 oleaut32 user32 advapi32 version msvcrt kernel32)
|
||||
|
|
|
@ -1,13 +1,4 @@
|
|||
|
||||
add_definitions(
|
||||
-DWINETEST_USE_DBGSTR_LONGLONG
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE
|
||||
-D__msvcrt_ulong=ULONG)
|
||||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-stringop-truncation")
|
||||
endif()
|
||||
|
||||
list(APPEND SOURCE
|
||||
cpp.c
|
||||
data.c
|
||||
|
@ -31,8 +22,16 @@ add_executable(msvcrt_winetest
|
|||
${SOURCE}
|
||||
${PCH_SKIP_SOURCE})
|
||||
|
||||
if(USE_CLANG_CL OR (NOT MSVC))
|
||||
target_compile_options(msvcrt_winetest PRIVATE "-Wno-format")
|
||||
target_compile_definitions(msvcrt_winetest PRIVATE
|
||||
WINETEST_USE_DBGSTR_LONGLONG
|
||||
_CRT_NONSTDC_NO_DEPRECATE
|
||||
__msvcrt_ulong=ULONG)
|
||||
|
||||
if ((NOT MSVC) OR USE_CLANG_CL)
|
||||
if (NOT USE_CLANG_CL)
|
||||
target_compile_options(msvcrt_winetest PRIVATE -Wno-stringop-truncation)
|
||||
endif()
|
||||
target_compile_options(msvcrt_winetest PRIVATE -Wno-format)
|
||||
endif()
|
||||
|
||||
set_module_type(msvcrt_winetest win32cui)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-format-overflow")
|
||||
endif()
|
||||
|
||||
add_executable(services_winetest service.c testlist.c)
|
||||
set_module_type(services_winetest win32cui)
|
||||
add_importlibs(services_winetest user32 advapi32 msvcrt kernel32)
|
||||
add_rostests_file(TARGET services_winetest)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(services_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-format-overflow")
|
||||
endif()
|
||||
|
||||
list(APPEND SOURCE
|
||||
devinst.c
|
||||
dialog.c
|
||||
|
@ -20,3 +16,7 @@ set_module_type(setupapi_winetest win32cui)
|
|||
target_link_libraries(setupapi_winetest uuid)
|
||||
add_importlibs(setupapi_winetest advapi32 setupapi user32 shell32 msvcrt kernel32 ntdll)
|
||||
add_rostests_file(TARGET setupapi_winetest)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(setupapi_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
|
|
@ -3,10 +3,6 @@ add_definitions(-DWINETEST_USE_DBGSTR_LONGLONG)
|
|||
|
||||
remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
|
||||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-format-overflow")
|
||||
endif()
|
||||
|
||||
list(APPEND SOURCE
|
||||
appbar.c
|
||||
assoc.c
|
||||
|
@ -42,6 +38,8 @@ add_importlibs(shell32_winetest shell32 shlwapi ole32 oleaut32 user32 gdi32 adva
|
|||
|
||||
if(MSVC)
|
||||
add_importlibs(shell32_winetest ntdll)
|
||||
else()
|
||||
target_compile_options(shell32_winetest PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
||||
add_pch(shell32_winetest precomp.h "${PCH_SKIP_SOURCE}")
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
|
||||
add_definitions(-DUSE_WINE_TODOS)
|
||||
|
||||
if(GCC)
|
||||
add_compile_flags("-Wno-format-overflow")
|
||||
endif()
|
||||
|
||||
list(APPEND SOURCE
|
||||
info.c
|
||||
install.c
|
||||
|
@ -14,7 +8,11 @@ add_executable(version_winetest ${SOURCE} version.rc)
|
|||
set_module_type(version_winetest win32cui)
|
||||
add_importlibs(version_winetest shell32 version msvcrt kernel32)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_definitions(version_winetest PRIVATE USE_WINE_TODOS)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(version_winetest PRIVATE -Wno-format-overflow)
|
||||
else()
|
||||
add_importlibs(version_winetest ntdll)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue