1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

Add support for extra_cmake_defines

Summary:
`extra_cmake_defines` are extra flags that are passed to cmake when
compiling each one of the dependencies. For instance:
```
$ ./opensource/fbcode_builder/getdeps.py  build f4d --extra-cmake-define='{"CMAKE_CXX_FLAGS": "-mavx2 -mfma -mavx -mf16c -march=native"}'
```
It takes a json map as input, which can take a list of defines (key value
pairs).

Reviewed By: wez

Differential Revision: D25855781

fbshipit-source-id: 7f4fef2c66f4d12f23c8d7086d6a4f24fcc01ff7
This commit is contained in:
Pedro Eugenio Rocha Pedreira
2021-01-13 13:21:07 -08:00
committed by Facebook GitHub Bot
parent 3f72d63896
commit 326b7f910e
5 changed files with 33 additions and 1 deletions

View File

@@ -387,6 +387,7 @@ if __name__ == "__main__":
inst_dir,
defines,
final_install_prefix=None,
extra_cmake_defines=None,
):
super(CMakeBuilder, self).__init__(
build_opts,
@@ -398,6 +399,8 @@ if __name__ == "__main__":
final_install_prefix=final_install_prefix,
)
self.defines = defines or {}
if extra_cmake_defines:
self.defines.update(extra_cmake_defines)
def _invalidate_cache(self):
for name in [