reactos/drivers/storage/class/disk_new/CMakeLists.txt
Victor Perevertkin 74ec94e12c [CMAKE] Some options are only supported by GCC, don't use them for clang
These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
2021-04-09 03:58:19 +03:00

37 lines
912 B
CMake

remove_definitions(-D_WIN32_WINNT=0x502)
list(APPEND SOURCE
data.c
disk.c
diskwmi.c
geometry.c
pnp.c
disk.h)
add_library(disk MODULE ${SOURCE} disk.rc)
target_compile_definitions(disk PUBLIC
DEBUG_USE_KDPRINT
_WIN32_WINNT=0x602
NTDDI_VERSION=0x06020000) # NTDDI_WIN8
if(USE_CLANG_CL OR (NOT MSVC))
target_compile_options(disk PRIVATE -Wno-format -Wno-pointer-sign)
endif()
if(GCC)
target_compile_options(disk PRIVATE -Wno-pointer-to-int-cast -Wno-switch)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(disk PRIVATE -Wno-unused-but-set-variable)
endif()
set_module_type(disk kernelmodedriver)
target_link_libraries(disk ntoskrnl_vista libcntpr wdmguid)
add_importlibs(disk classpnp ntoskrnl hal)
add_cd_file(TARGET disk DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_registry_inf(disk_reg.inf)
add_driver_inf(disk disk.inf)