Skip to content

Commit 012f571

Browse files
authored
Create a Linux preset (#11121)
### Summary TSIA ### Test plan CI ``` $ cmake --preset linux && cmake --build cmake-out -j $(nproc) ```
1 parent ffb8080 commit 012f571

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

.github/workflows/build-presets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
preset: [pybind, llm]
42+
preset: [linux, pybind, llm]
4343
runner: [linux.2xlarge, linux.arm64.2xlarge]
4444
docker-image: [executorch-ubuntu-22.04-clang12, executorch-ubuntu-22.04-gcc11-aarch64]
4545
# Excluding specific runner + docker image combinations that don't make sense:

CMakePresets.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@
5757
"rhs": "Darwin"
5858
}
5959
},
60+
{
61+
"name": "linux",
62+
"displayName": "Build everything buildable on Linux",
63+
"inherits": ["common"],
64+
"cacheVariables": {
65+
"CMAKE_SYSTEM_NAME": "Linux",
66+
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/linux.cmake"
67+
},
68+
"condition": {
69+
"lhs": "${hostSystemName}",
70+
"type": "equals",
71+
"rhs": "Linux"
72+
}
73+
},
6074
{
6175
"name": "pybind",
6276
"displayName": "Build pybindings exported in the wheel",

tools/cmake/preset/linux.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/pybind.cmake)
8+
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/llm.cmake)
9+
10+
set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)

tools/cmake/preset/macos.cmake

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

77
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/apple_common.cmake)
88
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/pybind.cmake)
9+
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/llm.cmake)
910

1011
set_overridable_option(EXECUTORCH_BUILD_EXECUTOR_RUNNER ON)

0 commit comments

Comments
 (0)