Skip to content

Commit

Permalink
[C++] Fixed the setting method of linker option. (#8554)
Browse files Browse the repository at this point in the history
### Motivation

I don't think the following `--exclude-libs,ALL` are reflected in linker.
 [https://github.com/apache/pulsar/blob/f8080f4eb690d751f1b07ca54c23e1cd7774473f/pulsar-client-cpp/CMakeLists.txt#L214](https://github.com/apache/pulsar/blob/f8080f4eb690d751f1b07ca54c23e1cd7774473f/pulsar-client-cpp/CMakeLists.txt#L214)

I think `--exclude-libs,ALL` needs to be set in `add_link_options`.
 [add_link_options](https://cmake.org/cmake/help/latest/command/add_link_options.html)

`add_link_options` can be used from v3.13.
Therefore, fixed(reverted) `add_compile_options` to `set`.([#4071](apache/pulsar#4071))
  • Loading branch information
shustsud authored Nov 17, 2020
1 parent d82cd55 commit 7851a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SET(CMAKE_SHARED_LIBRARY_PREFIX )
SET(CMAKE_SHARED_LIBRARY_SUFFIX .so)


if (CMAKE_CXX_FLAGS_PYTHON)
if (NOT APPLE AND NOT MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_PYTHON}")
endif()

Expand Down

0 comments on commit 7851a57

Please sign in to comment.