From 5f589494db58c813d0ea118a9e3f16c92a7f6f2d Mon Sep 17 00:00:00 2001 From: jathu Date: Fri, 6 Jun 2025 11:17:16 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Integrate=20gflags=20library=20into?= =?UTF-8?q?=20build=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 8 -------- backends/apple/coreml/scripts/build_tests.sh | 3 +-- backends/cadence/build_cadence_fusionG3.sh | 1 - backends/cadence/build_cadence_hifi4.sh | 1 - third-party/CMakeLists.txt | 1 + tools/cmake/preset/default.cmake | 5 ----- 6 files changed, 2 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10d4fcd95ba..17bd35f4cf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -455,14 +455,6 @@ endif() add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/configurations) -# -# gflags: Commandline flag host library. -# - -if(EXECUTORCH_BUILD_GFLAGS) - add_subdirectory(third-party/gflags) -endif() - # Install `executorch` library as well as `executorch-config.cmake` under # ${CMAKE_INSTALL_PREFIX}/ install( diff --git a/backends/apple/coreml/scripts/build_tests.sh b/backends/apple/coreml/scripts/build_tests.sh index 890385d5e24..190adf1f65a 100755 --- a/backends/apple/coreml/scripts/build_tests.sh +++ b/backends/apple/coreml/scripts/build_tests.sh @@ -33,8 +33,7 @@ cmake "$EXECUTORCH_ROOT_PATH" -B"$CMAKE_EXECUTORCH_BUILD_DIR_PATH" \ -DPLATFORM=MAC_UNIVERSAL \ -DDEPLOYMENT_TARGET=13.0 \ -DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \ --DEXECUTORCH_BUILD_XNNPACK=OFF \ --DEXECUTORCH_BUILD_GFLAGS=OFF +-DEXECUTORCH_BUILD_XNNPACK=OFF cmake --build "$CMAKE_EXECUTORCH_BUILD_DIR_PATH" -j9 -t executorch diff --git a/backends/cadence/build_cadence_fusionG3.sh b/backends/cadence/build_cadence_fusionG3.sh index 3ced26f8577..20e694206db 100644 --- a/backends/cadence/build_cadence_fusionG3.sh +++ b/backends/cadence/build_cadence_fusionG3.sh @@ -50,7 +50,6 @@ if $STEPWISE_BUILD; then -DEXECUTORCH_BUILD_KERNELS_CUSTOM=OFF \ -DPYTHON_EXECUTABLE=python3 \ -DEXECUTORCH_FUSION_G3_OPT=ON \ - -DEXECUTORCH_BUILD_GFLAGS=ON \ -DHAVE_FNMATCH_H=OFF \ -Bcmake-out/backends/cadence \ backends/cadence diff --git a/backends/cadence/build_cadence_hifi4.sh b/backends/cadence/build_cadence_hifi4.sh index 70f026fe0b2..fab8febcef5 100644 --- a/backends/cadence/build_cadence_hifi4.sh +++ b/backends/cadence/build_cadence_hifi4.sh @@ -49,7 +49,6 @@ if $STEPWISE_BUILD; then -DEXECUTORCH_BUILD_KERNELS_CUSTOM=OFF \ -DPYTHON_EXECUTABLE=python3 \ -DEXECUTORCH_NNLIB_OPT=ON \ - -DEXECUTORCH_BUILD_GFLAGS=ON \ -DHAVE_FNMATCH_H=OFF \ -Bcmake-out/backends/cadence \ backends/cadence diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index d7c9c5774fb..7456d749f34 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -5,6 +5,7 @@ # LICENSE file in the root directory of this source tree. add_subdirectory(json) +add_subdirectory(gflags) if(EXECUTORCH_BUILD_PYBIND) add_subdirectory(pybind11) diff --git a/tools/cmake/preset/default.cmake b/tools/cmake/preset/default.cmake index 2d0c6302117..baf8669e335 100644 --- a/tools/cmake/preset/default.cmake +++ b/tools/cmake/preset/default.cmake @@ -209,11 +209,6 @@ define_overridable_option( "Build the Cortex-M backend" BOOL OFF ) -define_overridable_option( - EXECUTORCH_BUILD_GFLAGS - "Build the gflags library." - BOOL ON -) define_overridable_option( EXECUTORCH_COREML_BUILD_EXECUTOR_RUNNER "Build CoreML executor runner."