Add CMake option to fetch deps statically

Summary:
We would like to build a version of proxygen that has minimal
dependencies on dynamic libraries.

Reviewed By: yfeldblum

Differential Revision: D17228181

fbshipit-source-id: cfd61afdfa978c49a536184f426502196241fb8a
This commit is contained in:
Hasnain Lakhani 2019-09-12 23:33:50 -07:00 committed by Facebook Github Bot
parent a6cbd9ad2c
commit 267fddccc8
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
function (fb_activate_static_library_option)
option(USE_STATIC_DEPS_ON_UNIX
"If enabled, use static dependencies on unix systems. This is generally discouraged."
OFF
)
# Mark USE_STATIC_DEPS_ON_UNIX as an "advanced" option, since enabling it
# is generally discouraged.
mark_as_advanced(USE_STATIC_DEPS_ON_UNIX)
if(UNIX AND USE_STATIC_DEPS_ON_UNIX)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
endif()
endfunction()

View File

@ -2,6 +2,7 @@
name = fizz
fbsource_path = fbcode/fizz
shipit_project = fizz
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebookincubator/fizz.git