Skip to content

Commit 77a3a5f

Browse files
tomeuvclaude
andcommitted
cmake: fix build issues with newer toolchains
Add missing #include <cstdint> in CoreML inmemoryfs headers for compilers that don't implicitly include it, disable -Werror in the flatcc ExternalProject_Add and add_subdirectory builds, and fix a missing dollar sign in the flatcc ExternalProject_Add invocation. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 502d2de commit 77a3a5f

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

backends/apple/coreml/runtime/inmemoryfs/inmemory_filesystem.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#pragma once
99

10+
#include <cstdint>
1011
#include <functional>
1112
#include <memory>
1213
#include <optional>

backends/apple/coreml/runtime/inmemoryfs/memory_buffer.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#pragma once
99

10+
#include <cstdint>
1011
#include <memory>
1112
#include <stdio.h>
1213
#include <string>

third-party/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ ExternalProject_Add(
9191
-DFLATCC_TEST=OFF
9292
-DFLATCC_REFLECTION=OFF
9393
-DFLATCC_DEBUG_CLANG_SANITIZE=OFF
94+
-DFLATCC_ALLOW_WERROR=OFF
9495
-DFLATCC_INSTALL=ON
9596
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
9697
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -100,7 +101,7 @@ ExternalProject_Add(
100101
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
101102
${_flatcc_extra_cmake_args}
102103
BUILD_BYPRODUCTS <INSTALL_DIR>/bin/flatcc
103-
{_executorch_external_project_additional_args}
104+
${_executorch_external_project_additional_args}
104105
)
105106
file(REMOVE_RECURSE ${PROJECT_SOURCE_DIR}/third-party/flatcc/lib)
106107
ExternalProject_Get_Property(flatcc_ep INSTALL_DIR)
@@ -117,6 +118,7 @@ set(FLATCC_TEST OFF CACHE BOOL "")
117118
set(FLATCC_REFLECTION OFF CACHE BOOL "")
118119
set(FLATCC_DEBUG_CLANG_SANITIZE OFF CACHE BOOL "")
119120
set(FLATCC_INSTALL OFF CACHE BOOL "")
121+
set(FLATCC_ALLOW_WERROR OFF CACHE BOOL "" FORCE)
120122
add_subdirectory(flatcc)
121123
# Unfortunately flatcc writes libs directly in to the source tree [1]. So to
122124
# ensure the target lib is created last, force flatcc_cli to build first.

0 commit comments

Comments
 (0)