From 8babbe319fed528afc71ad6e5477e1e5164cbd96 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 10 Jan 2025 11:40:10 -0800 Subject: [PATCH] Set CMAKE_OSX_DEPLOYMENT_TARGET to 10.14 in CMakeLists.txt wabt doesn't currently build when targeting 10.13 because it uses std::optional::value which is not available on 10.13. See: #2527 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3d059f24..4fb8782cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +# 10.13 doesn't support std::optional::value (becuase it depends on +# std::bad_optional_acces). +# See: https://github.com/WebAssembly/wabt/issues/2527 +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment version") + # Check if wabt is being used directly or via add_subdirectory, FetchContent, etc string(COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" PROJECT_IS_TOP_LEVEL)