diff --git a/Meta/CMake/common_compile_options.cmake b/Meta/CMake/common_compile_options.cmake index add51131872..c6956797e3f 100644 --- a/Meta/CMake/common_compile_options.cmake +++ b/Meta/CMake/common_compile_options.cmake @@ -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}$) - add_compile_options("SHELL:$<$:-Xcc ${arg}>") - endforeach() - add_compile_options($<$:${args}>) + set(args "") + foreach(arg ${ARGN}) + string(APPEND args ${arg}$) + add_compile_options("SHELL:$<$:-Xcc ${arg}>") + endforeach() + add_compile_options($<$:${args}>) endmacro() macro(add_cxx_compile_definitions) - set(args "") - foreach(arg ${ARGN}) - string(APPEND args ${arg}$) - add_compile_options("SHELL:$<$:-Xcc -D${arg}>") - endforeach() - add_compile_definitions($<$:${args}>) + set(args "") + foreach(arg ${ARGN}) + string(APPEND args ${arg}$) + add_compile_options("SHELL:$<$:-Xcc -D${arg}>") + endforeach() + add_compile_definitions($<$:${args}>) endmacro() macro(add_cxx_link_options) - set(args "") - foreach(arg ${ARGN}) - string(APPEND args ${arg}$) - endforeach() - add_link_options($<$:${args}>) + set(args "") + foreach(arg ${ARGN}) + string(APPEND args ${arg}$) + endforeach() + add_link_options($<$:${args}>) endmacro() macro(add_swift_compile_options) - set(args "") - foreach(arg ${ARGN}) - string(APPEND args ${arg}$) - endforeach() - add_compile_options($<$:${args}>) + set(args "") + foreach(arg ${ARGN}) + string(APPEND args ${arg}$) + endforeach() + add_compile_options($<$:${args}>) endmacro() macro(add_swift_link_options) - set(args "") - foreach(arg ${ARGN}) - string(APPEND args ${arg}$) - endforeach() - add_link_options($<$:${args}>) + set(args "") + foreach(arg ${ARGN}) + string(APPEND args ${arg}$) + endforeach() + add_link_options($<$:${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)