From 677f190f4cef0265747a3f73766ad2a72b52ff1e Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 20 May 2024 23:12:06 +0300 Subject: [PATCH] [CMAKE] Stop setting the C standard on modules Global standard is C99. --- dll/keyboard/CMakeLists.txt | 3 --- drivers/filesystems/cdfs/CMakeLists.txt | 1 - drivers/filesystems/ext2/CMakeLists.txt | 1 - drivers/filesystems/nfs/CMakeLists.txt | 2 -- modules/rostests/apitests/ntdll/CMakeLists.txt | 3 --- modules/rostests/apitests/rtl/CMakeLists.txt | 3 --- 6 files changed, 13 deletions(-) diff --git a/dll/keyboard/CMakeLists.txt b/dll/keyboard/CMakeLists.txt index 4a89c297d38..9b6638c8f94 100644 --- a/dll/keyboard/CMakeLists.txt +++ b/dll/keyboard/CMakeLists.txt @@ -103,9 +103,6 @@ foreach(_keyboard_layout ${_keyboard_layouts}) else() # Use a custom linker script target_link_options(${_keyboard_layout} PRIVATE "-Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/kbdlayout.lds") - - # Avoid "universal character names are only valid in C++ and C99" error. - set_property(TARGET ${_keyboard_layout} PROPERTY C_STANDARD 99) endif() # dynamic analysis switches diff --git a/drivers/filesystems/cdfs/CMakeLists.txt b/drivers/filesystems/cdfs/CMakeLists.txt index f85cfea326f..5004828467b 100644 --- a/drivers/filesystems/cdfs/CMakeLists.txt +++ b/drivers/filesystems/cdfs/CMakeLists.txt @@ -36,7 +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) diff --git a/drivers/filesystems/ext2/CMakeLists.txt b/drivers/filesystems/ext2/CMakeLists.txt index 4a79c51e139..e427a1580d3 100644 --- a/drivers/filesystems/ext2/CMakeLists.txt +++ b/drivers/filesystems/ext2/CMakeLists.txt @@ -111,7 +111,6 @@ target_link_libraries(ext2fs memcmp ${PSEH_LIB}) 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) add_pch(ext2fs inc/ext2fs.h SOURCE) add_cd_file(TARGET ext2fs DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/filesystems/nfs/CMakeLists.txt b/drivers/filesystems/nfs/CMakeLists.txt index 9eb45900649..fcfb88e4295 100644 --- a/drivers/filesystems/nfs/CMakeLists.txt +++ b/drivers/filesystems/nfs/CMakeLists.txt @@ -22,7 +22,5 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang") target_compile_options(nfs41_driver PRIVATE "-Wno-unused-value") endif() -set_property(TARGET nfs41_driver PROPERTY C_STANDARD 90) - add_cd_file(TARGET nfs41_driver DESTINATION reactos/system32/drivers FOR all) add_registry_inf(nfs41_reg.inf) diff --git a/modules/rostests/apitests/ntdll/CMakeLists.txt b/modules/rostests/apitests/ntdll/CMakeLists.txt index cc4adfac82f..9b3b4b1ddc1 100644 --- a/modules/rostests/apitests/ntdll/CMakeLists.txt +++ b/modules/rostests/apitests/ntdll/CMakeLists.txt @@ -138,9 +138,6 @@ add_dependencies(ntdll_apitest load_notifications) if(NOT MSVC) set_source_files_properties(RtlGetFullPathName_UstrEx.c PROPERTIES COMPILE_FLAGS "-Wno-format") - - # Avoid "universal character names are only valid in C++ and C99" error. - set_property(TARGET ntdll_apitest PROPERTY C_STANDARD 99) endif() add_rostests_file(TARGET ntdll_apitest) diff --git a/modules/rostests/apitests/rtl/CMakeLists.txt b/modules/rostests/apitests/rtl/CMakeLists.txt index 49d87415d1a..887a5eddd71 100644 --- a/modules/rostests/apitests/rtl/CMakeLists.txt +++ b/modules/rostests/apitests/rtl/CMakeLists.txt @@ -38,9 +38,6 @@ add_dependencies(rtl_test_lib asm) if(NOT MSVC) set_source_files_properties(RtlGetFullPathName_UstrEx.c PROPERTIES COMPILE_FLAGS "-Wno-format") - - # Avoid "universal character names are only valid in C++ and C99" error. - set_property(TARGET rtl_test_lib PROPERTY C_STANDARD 99) endif() # RTL tests with static linkage (called unittest, so it won't run in rosautotest)