Fix various warnings
This commit is contained in:
1 parent
549b686e22
commit
f976711fb4
58 files changed
+384
-425
No files matched your search
@@ -29,6 +29,15 @@ add_compile_options("$<$<COMPILE_LANGUAGE:C>:/W4>")
|
||||
# There are way too many of these to realistically deal with them
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4267>")
|
||||
|
||||
# C4206: nonstandard extension used: translation unit is empty
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4206>")
|
||||
|
||||
# C4324: 'struct': structure was padded due to alignment specifier
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4324>")
|
||||
|
||||
# C4200: nonstandard extension used: zero-sized array in struct/union
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/wd4200>")
|
||||
|
||||
# MSVC doesn't understand __inline__, which libjpeg uses
|
||||
add_compile_definitions(__inline__=inline)
|
||||
|
||||
|
||||
@@ -65,13 +65,18 @@ set(LBURG_SOURCES
|
||||
)
|
||||
|
||||
add_executable(q3asm ${Q3ASM_SOURCES})
|
||||
target_compile_options(q3asm PRIVATE -fno-strict-aliasing)
|
||||
set_output_dirs(q3asm)
|
||||
add_executable(q3lcc ${Q3LCC_SOURCES})
|
||||
target_compile_options(q3asm PRIVATE -fno-strict-aliasing)
|
||||
set_output_dirs(q3lcc)
|
||||
add_dependencies(q3lcc q3rcc q3cpp)
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang$")
|
||||
add_compile_options(-fno-strict-aliasing -Wno-unused-result
|
||||
-Wno-pointer-to-int-cast -Wno-int-to-pointer-cast)
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/wd4311 /wd4312)
|
||||
endif()
|
||||
|
||||
add_executable(lburg ${LBURG_SOURCES})
|
||||
set_output_dirs(lburg)
|
||||
set(DAGCHECK_C ${CMAKE_BINARY_DIR}/dagcheck.c)
|
||||
|
||||
Reference in new issue
Block a user