Skip to content
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

Allow to use local GSL #915

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Increment the:

## [Unreleased]

* [BUILD] Allow to use local GSL

## [1.0.0-rc3] 2021-07-12

* [DOCS] Add doxygen reference docs for SDK ([#902](https://github.com/open-telemetry/opentelemetry-cpp/pull/902))
Expand Down
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,13 @@ if(WITH_STL)
# Guidelines Support Library path. Used if we are not on not get C++20.
#
# TODO: respect WITH_ABSEIL as alternate implementation of std::span
set(GSL_DIR third_party/ms-gsl)
include_directories(${GSL_DIR}/include)
find_package(Microsoft.GSL QUIET)
if(TARGET Microsoft.GSL::GSL)
list(APPEND CORE_RUNTIME_LIBS Microsoft.GSL::GSL)
else()
set(GSL_DIR third_party/ms-gsl)
include_directories(${GSL_DIR}/include)
endif()

# Optimize for speed to reduce the hops
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
Expand Down