From 7a687273986d3d1ec7e6884a938bb8856757cff4 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 4 Jun 2024 11:00:48 -0700 Subject: [PATCH] --extra-cmake-defines should be a global flag Summary: X-link: https://github.com/facebookincubator/zstrong/pull/858 Because it needs to be passed to other commands that use project hashes, such as "test". (in general there are probably a lot more of these, just fixing the ones I've ran into so far) Reviewed By: genevievehelsel Differential Revision: D58082245 fbshipit-source-id: 09fa6b5ce4cc4b3ae7ecfb34ac83681cecb36e3c --- build/fbcode_builder/getdeps.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index 014105f3b..523a405ae 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -788,14 +788,6 @@ class BuildCmd(ProjectCmdBase): parser.add_argument( "--schedule-type", help="Indicates how the build was activated" ) - parser.add_argument( - "--extra-cmake-defines", - help=( - "Input json map that contains extra cmake defines to be used " - "when compiling the current project and all its deps. " - 'e.g: \'{"CMAKE_CXX_FLAGS": "--bla"}\'' - ), - ) parser.add_argument( "--cmake-target", help=("Target for cmake build."), @@ -1326,6 +1318,14 @@ def parse_args(): action="store_true", default=False, ) + add_common_arg( + "--extra-cmake-defines", + help=( + "Input json map that contains extra cmake defines to be used " + "when compiling the current project and all its deps. " + 'e.g: \'{"CMAKE_CXX_FLAGS": "--bla"}\'' + ), + ) add_common_arg( "--allow-system-packages", help="Allow satisfying third party deps from installed system packages",