Skip to content

Commit 0375213

Browse files
mergennachinjathu
andcommitted
Update CMakeLists.txt
Co-authored-by: jathu <jathu.satkunarajah@gmail.com>
1 parent a88216b commit 0375213

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

CMakeLists.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@
4848
cmake_minimum_required(VERSION 3.24)
4949
project(executorch)
5050

51-
# Enable ccache if available
52-
find_program(CCACHE_PROGRAM ccache)
53-
if(CCACHE_PROGRAM)
54-
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
55-
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
56-
message(STATUS "ccache found and enabled for faster builds")
57-
else()
58-
message(STATUS "ccache not found, builds will not be cached")
59-
endif()
60-
6151
# MARK: - Start EXECUTORCH_H12025_BUILD_MIGRATION
6252

6353
include(${PROJECT_SOURCE_DIR}/tools/cmake/common/preset.cmake)
@@ -96,6 +86,17 @@ announce_configured_options(CMAKE_TOOLCHAIN_FILE)
9686
load_build_preset()
9787
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/default.cmake)
9888

89+
# Enable ccache if available
90+
find_program(CCACHE_PROGRAM ccache)
91+
if(CCACHE_PROGRAM)
92+
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
93+
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
94+
message(STATUS "ccache found and enabled for faster builds")
95+
else()
96+
message(STATUS "ccache not found, builds will not be cached")
97+
endif()
98+
announce_configured_options(CCACHE_PROGRAM)
99+
99100
# Print all the configs that were called with announce_configured_options.
100101
print_configured_options()
101102

0 commit comments

Comments
 (0)