mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 14:34:57 +08:00
[CMAKE] gcc.cmake: Move all warning options into the same place
This commit is contained in:
@@ -52,7 +52,6 @@ add_compile_options(-mlong-double-64)
|
||||
add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:CXX>>:-nostdinc>")
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options("-Wno-unknown-pragmas")
|
||||
add_compile_options(-fno-aggressive-loop-optimizations)
|
||||
if (DBG)
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wold-style-declaration>")
|
||||
@@ -129,8 +128,6 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
endif()
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wno-microsoft>")
|
||||
add_compile_options(-Wno-pragma-pack)
|
||||
add_compile_options(-fno-associative-math)
|
||||
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
|
||||
@@ -191,8 +188,14 @@ if(ARCH STREQUAL "arm")
|
||||
add_compile_options(-Wno-attributes)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(
|
||||
-Wno-unknown-pragmas
|
||||
)
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wno-microsoft>")
|
||||
add_compile_options(
|
||||
-Wno-pragma-pack
|
||||
-Wno-unknown-warning-option
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user