Skip to content

Commit

Permalink
Allow to use local GSL (#915)
Browse files Browse the repository at this point in the history
  • Loading branch information
owent authored Jul 22, 2021
1 parent 950f940 commit 1f31341
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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

0 comments on commit 1f31341

Please sign in to comment.