mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
Meta: Format common_compile_options.cmake
This commit formats common_compile_options to use 4 space indenting consistently.
This commit is contained in:
parent
19f88f96dc
commit
af056581f6
Notes:
github-actions[bot]
2025-06-16 17:49:57 +00:00
Author: https://github.com/R-Goc
Commit: af056581f6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4758
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 38 additions and 38 deletions
|
@ -8,60 +8,60 @@ set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
|
|||
set(CMAKE_COLOR_DIAGNOSTICS ON)
|
||||
|
||||
macro(add_cxx_compile_options)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc ${arg}>")
|
||||
endforeach()
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc ${arg}>")
|
||||
endforeach()
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>)
|
||||
endmacro()
|
||||
|
||||
macro(add_cxx_compile_definitions)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -D${arg}>")
|
||||
endforeach()
|
||||
add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -D${arg}>")
|
||||
endforeach()
|
||||
add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX,ASM>:${args}>)
|
||||
endmacro()
|
||||
|
||||
macro(add_cxx_link_options)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
endforeach()
|
||||
add_link_options($<$<LINK_LANGUAGE:C,CXX>:${args}>)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
endforeach()
|
||||
add_link_options($<$<LINK_LANGUAGE:C,CXX>:${args}>)
|
||||
endmacro()
|
||||
|
||||
macro(add_swift_compile_options)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
endforeach()
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:${args}>)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
endforeach()
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:${args}>)
|
||||
endmacro()
|
||||
|
||||
macro(add_swift_link_options)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
endforeach()
|
||||
add_link_options($<$<LINK_LANGUAGE:Swift>:${args}>)
|
||||
set(args "")
|
||||
foreach(arg ${ARGN})
|
||||
string(APPEND args ${arg}$<SEMICOLON>)
|
||||
endforeach()
|
||||
add_link_options($<$<LINK_LANGUAGE:Swift>:${args}>)
|
||||
endmacro()
|
||||
|
||||
# FIXME: Rework these flags to remove the suspicious ones.
|
||||
if (WIN32)
|
||||
add_compile_options(-Wno-reinterpret-base-class)
|
||||
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_NONSTDC_NO_WARNINGS) # POSIX names are just fine, thanks
|
||||
add_compile_definitions(_USE_MATH_DEFINES)
|
||||
add_compile_definitions(NOMINMAX)
|
||||
add_compile_definitions(WIN32_LEAN_AND_MEAN)
|
||||
add_compile_definitions(NAME_MAX=255)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
add_compile_options(-Wno-deprecated-declarations)
|
||||
add_compile_definitions(_WIN32_WINNT=0x0A00)
|
||||
add_compile_options(-Wno-reinterpret-base-class)
|
||||
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_NONSTDC_NO_WARNINGS) # POSIX names are just fine, thanks
|
||||
add_compile_definitions(_USE_MATH_DEFINES)
|
||||
add_compile_definitions(NOMINMAX)
|
||||
add_compile_definitions(WIN32_LEAN_AND_MEAN)
|
||||
add_compile_definitions(NAME_MAX=255)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
add_compile_options(-Wno-deprecated-declarations)
|
||||
add_compile_definitions(_WIN32_WINNT=0x0A00)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue