From 3a3200bd68568a480ea6700c00b32d38b496d475 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Fri, 27 Oct 2023 18:52:49 -0500 Subject: [PATCH] Try passing -stdlib=libc++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seeing if this builds everywhere and fixes the Clang compilation issue on Ubuntu latest (where Clang doesn’t like stdlibc++ chrono headers). --- cmake/project-defaults.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/project-defaults.cmake b/cmake/project-defaults.cmake index c262bac8af..65706f1673 100644 --- a/cmake/project-defaults.cmake +++ b/cmake/project-defaults.cmake @@ -42,7 +42,9 @@ add_compile_options( $<$:-O2> # Enable separate sections per function/data item $<$:-ffunction-sections> - $<$:-fdata-sections>) + $<$:-fdata-sections> + # Use libc++ when building with Clang on Linux + $<$:-stdlib=libc++>) add_link_options( # Discard unused sections