mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[CMAKE] Use C_STANDARD property instead of command line option
Addendum to64211aa696
and19779b3f96
This commit is contained in:
parent
0db79d4aa9
commit
16e5ce8fb1
4 changed files with 5 additions and 14 deletions
|
@ -36,11 +36,6 @@ add_library(cdfs MODULE ${SOURCE} cdfs.rc)
|
|||
set_module_type(cdfs kernelmodedriver)
|
||||
target_link_libraries(cdfs ${PSEH_LIB} memcmp)
|
||||
add_importlibs(cdfs ntoskrnl hal)
|
||||
set_property(TARGET cdfs PROPERTY C_STANDARD 90)
|
||||
add_cd_file(TARGET cdfs DESTINATION reactos/system32/drivers NO_CAB FOR all)
|
||||
add_registry_inf(cdfs_reg.inf)
|
||||
|
||||
if (CLANG AND GCC)
|
||||
# Make __inline work as expected
|
||||
target_compile_options(cdfs PRIVATE -std=gnu89)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -113,9 +113,6 @@ if(CLANG)
|
|||
-Wno-unused-value -Wno-parentheses-equality
|
||||
-Wno-incompatible-pointer-types-discards-qualifiers
|
||||
"-Wno-#pragma-messages;-Wno-cast-calling-convention")
|
||||
if (GCC)
|
||||
target_compile_options(ext2fs PRIVATE -std=gnu89)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(ext2fs memcmp ${PSEH_LIB})
|
||||
|
@ -123,6 +120,8 @@ add_definitions(-D__KERNEL__ -D_CRT_NO_POSIX_ERROR_CODES)
|
|||
set_module_type(ext2fs kernelmodedriver)
|
||||
add_importlibs(ext2fs ntoskrnl hal)
|
||||
|
||||
set_property(TARGET ext2fs PROPERTY C_STANDARD 90)
|
||||
|
||||
if(NOT USE_CLANG_CL)
|
||||
# The fallback we have above prevents cl and clang-cl from using the same PCH
|
||||
add_pch(ext2fs inc/ext2fs.h SOURCE)
|
||||
|
|
|
@ -18,11 +18,8 @@ if(GCC OR CLANG)
|
|||
target_compile_options(nfs41_driver PRIVATE "-Wno-switch")
|
||||
if(CLANG)
|
||||
target_compile_options(nfs41_driver PRIVATE "-Wno-unused-value")
|
||||
if(GCC)
|
||||
# When CLang mimicks GCC, it uses C17 as default, which breaks __inline
|
||||
target_compile_options(nfs41_driver PRIVATE "-std=gnu89")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set_property(TARGET nfs41_driver PROPERTY C_STANDARD 90)
|
||||
|
||||
add_cd_file(TARGET nfs41_driver DESTINATION reactos/system32/drivers FOR all)
|
||||
|
|
|
@ -53,7 +53,7 @@ if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wold-style-declaration>")
|
||||
endif()
|
||||
else()
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-std=gnu99;-Wno-microsoft>")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wno-microsoft>")
|
||||
add_compile_options(-Wno-pragma-pack)
|
||||
add_compile_options(-fno-associative-math)
|
||||
add_compile_options(-fcommon)
|
||||
|
|
Loading…
Reference in a new issue