From 1dff3ca0c46dc8df454a11c8949c42dd8faea6d2 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 4 Aug 2024 17:12:34 -0600 Subject: [PATCH] CMake: Apply C++ compile options to Swift compilations This ensures that we can get all the proper warnings on/off to get the same diagnostics and other options when loading C++ headers into the Swift frontend. --- Meta/CMake/common_compile_options.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Meta/CMake/common_compile_options.cmake b/Meta/CMake/common_compile_options.cmake index 223a341df32..cbdba2c9498 100644 --- a/Meta/CMake/common_compile_options.cmake +++ b/Meta/CMake/common_compile_options.cmake @@ -9,8 +9,9 @@ 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}>) + add_compile_options($<$:${args}>) endmacro() macro(add_cxx_link_options)