-
Notifications
You must be signed in to change notification settings - Fork 8.1k
modules: thrift: update doc and makefiles to build with macos #74557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -57,12 +57,23 @@ Requirements | |||||
| west update | ||||||
|
|
||||||
| - QEMU Networking (described in :ref:`networking_with_qemu`) | ||||||
| - Thrift dependencies installed for your host OS e.g. in Ubuntu | ||||||
| - Thrift dependencies installed for your host OS | ||||||
|
|
||||||
| .. code-block:: console | ||||||
| :caption: Install additional dependencies in Ubuntu | ||||||
| .. tabs:: | ||||||
|
|
||||||
| .. group-tab:: Ubuntu | ||||||
|
|
||||||
| .. code-block:: bash | ||||||
| :caption: Install thrift dependencies in Ubuntu | ||||||
|
|
||||||
| sudo apt install -y libboost-all-dev thrift-compiler libthrift-dev | ||||||
|
|
||||||
| .. group-tab:: macOS | ||||||
|
|
||||||
| .. code-block:: bash | ||||||
| :caption: Install thrift dependencies in macOS | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm.. do people normally say a package is installed "on" an OS? I usually say "in". It's possibly "on" in German or French, but I've been saying "in" for the last 20 years or so and I'm a native English speaker. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh. Could well be that you're right then. I say "on" but I'm not a native English speaker. |
||||||
|
|
||||||
| sudo apt install -y libboost-all-dev thrift-compiler libthrift-dev | ||||||
| brew install boost openssl thrift | ||||||
|
|
||||||
| Building and Running | ||||||
| ******************** | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |||||
|
|
||||||
| .PHONY: all clean | ||||||
|
|
||||||
| OS = $(shell uname -s) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| CXXFLAGS := | ||||||
| CXXFLAGS += -std=c++17 | ||||||
|
|
||||||
|
|
@@ -14,6 +16,14 @@ GENOBJ = $(filter-out %.h, $(GENSRC:.cpp=.o)) | |||||
| THRIFT_FLAGS := | ||||||
| THRIFT_FLAGS += $(shell pkg-config --cflags thrift) | ||||||
| THRIFT_FLAGS += -I$(GEN_DIR) | ||||||
| ifeq ($(OS),Darwin) | ||||||
| # get Homebrew prefix | ||||||
| HOMEBREW_PREFIX := $(shell brew --prefix) | ||||||
|
Comment on lines
+19
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😂 Well, that's one solution, I guess |
||||||
| # get boost include path (no pkgconfig file) | ||||||
| BOOST_INCLUDE := $(shell find $(HOMEBREW_PREFIX) -path '*/Cellar/boost/*/include' -type d | head -n 1) | ||||||
| THRIFT_FLAGS += -I$(BOOST_INCLUDE) | ||||||
| THRIFT_FLAGS += $(shell pkg-config --cflags openssl) | ||||||
| endif | ||||||
| THRIFT_LIBS = $(shell pkg-config --libs thrift) | ||||||
|
|
||||||
| all: hello_client hello_client_compact hello_client_ssl hello_client_py.stamp | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |||||
|
|
||||||
| .PHONY: all clean | ||||||
|
|
||||||
| OS = $(shell uname -s) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| CXXFLAGS := | ||||||
| CXXFLAGS += -std=c++17 | ||||||
|
|
||||||
|
|
@@ -14,6 +16,14 @@ GENOBJ = $(filter-out %.h, $(GENSRC:.cpp=.o)) | |||||
| THRIFT_FLAGS := | ||||||
| THRIFT_FLAGS += $(shell pkg-config --cflags thrift) | ||||||
| THRIFT_FLAGS += -I$(GEN_DIR) | ||||||
| ifeq ($(OS),Darwin) | ||||||
| # get Homebrew prefix | ||||||
| HOMEBREW_PREFIX := $(shell brew --prefix) | ||||||
| # get boost include path (no pkgconfig file) | ||||||
| BOOST_INCLUDE := $(shell find $(HOMEBREW_PREFIX) -path '*/Cellar/boost/*/include' -type d | head -n 1) | ||||||
| THRIFT_FLAGS += -I$(BOOST_INCLUDE) | ||||||
| THRIFT_FLAGS += $(shell pkg-config --cflags openssl) | ||||||
| endif | ||||||
| THRIFT_LIBS := | ||||||
| THRIFT_LIBS = $(shell pkg-config --libs thrift) | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.