Meta: Format common_compile_options.cmake

This commit formats common_compile_options to use 4 space indenting
consistently.
This commit is contained in:
R-Goc 2025-06-14 11:02:07 +02:00 committed by Andrew Kaster
commit af056581f6
Notes: github-actions[bot] 2025-06-16 17:49:57 +00:00

View file

@ -8,60 +8,60 @@ set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
set(CMAKE_COLOR_DIAGNOSTICS ON) set(CMAKE_COLOR_DIAGNOSTICS ON)
macro(add_cxx_compile_options) macro(add_cxx_compile_options)
set(args "") set(args "")
foreach(arg ${ARGN}) foreach(arg ${ARGN})
string(APPEND args ${arg}$<SEMICOLON>) string(APPEND args ${arg}$<SEMICOLON>)
add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc ${arg}>") add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc ${arg}>")
endforeach() endforeach()
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>) add_compile_options($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>)
endmacro() endmacro()
macro(add_cxx_compile_definitions) macro(add_cxx_compile_definitions)
set(args "") set(args "")
foreach(arg ${ARGN}) foreach(arg ${ARGN})
string(APPEND args ${arg}$<SEMICOLON>) string(APPEND args ${arg}$<SEMICOLON>)
add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -D${arg}>") add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -D${arg}>")
endforeach() endforeach()
add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>) add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>)
endmacro() endmacro()
macro(add_cxx_link_options) macro(add_cxx_link_options)
set(args "") set(args "")
foreach(arg ${ARGN}) foreach(arg ${ARGN})
string(APPEND args ${arg}$<SEMICOLON>) string(APPEND args ${arg}$<SEMICOLON>)
endforeach() endforeach()
add_link_options($<$<LINK_LANGUAGE:C,CXX>:${args}>) add_link_options($<$<LINK_LANGUAGE:C,CXX>:${args}>)
endmacro() endmacro()
macro(add_swift_compile_options) macro(add_swift_compile_options)
set(args "") set(args "")
foreach(arg ${ARGN}) foreach(arg ${ARGN})
string(APPEND args ${arg}$<SEMICOLON>) string(APPEND args ${arg}$<SEMICOLON>)
endforeach() endforeach()
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:${args}>) add_compile_options($<$<COMPILE_LANGUAGE:Swift>:${args}>)
endmacro() endmacro()
macro(add_swift_link_options) macro(add_swift_link_options)
set(args "") set(args "")
foreach(arg ${ARGN}) foreach(arg ${ARGN})
string(APPEND args ${arg}$<SEMICOLON>) string(APPEND args ${arg}$<SEMICOLON>)
endforeach() endforeach()
add_link_options($<$<LINK_LANGUAGE:Swift>:${args}>) add_link_options($<$<LINK_LANGUAGE:Swift>:${args}>)
endmacro() endmacro()
# FIXME: Rework these flags to remove the suspicious ones. # FIXME: Rework these flags to remove the suspicious ones.
if (WIN32) if (WIN32)
add_compile_options(-Wno-reinterpret-base-class) add_compile_options(-Wno-reinterpret-base-class)
add_compile_options(-Wno-microsoft-unqualified-friend) # MSVC doesn't support unqualified friends add_compile_options(-Wno-microsoft-unqualified-friend) # MSVC doesn't support unqualified friends
add_compile_definitions(_CRT_SECURE_NO_WARNINGS) # _s replacements not desired (or implemented on any other platform other than VxWorks) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) # _s replacements not desired (or implemented on any other platform other than VxWorks)
add_compile_definitions(_CRT_NONSTDC_NO_WARNINGS) # POSIX names are just fine, thanks add_compile_definitions(_CRT_NONSTDC_NO_WARNINGS) # POSIX names are just fine, thanks
add_compile_definitions(_USE_MATH_DEFINES) add_compile_definitions(_USE_MATH_DEFINES)
add_compile_definitions(NOMINMAX) add_compile_definitions(NOMINMAX)
add_compile_definitions(WIN32_LEAN_AND_MEAN) add_compile_definitions(WIN32_LEAN_AND_MEAN)
add_compile_definitions(NAME_MAX=255) add_compile_definitions(NAME_MAX=255)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_compile_options(-Wno-deprecated-declarations) add_compile_options(-Wno-deprecated-declarations)
add_compile_definitions(_WIN32_WINNT=0x0A00) add_compile_definitions(_WIN32_WINNT=0x0A00)
endif() endif()
if (MSVC) if (MSVC)