Skip to content

Commit 953183f

Browse files
committed
Remove USE_VENDORED_TL_EXPECTED option
1 parent 92672aa commit 953183f

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

tl_expected/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ project(tl_expected
77

88
find_package(ament_cmake REQUIRED)
99

10-
option(USE_VENDORED_TL_EXPECTED "Use vendored tl_expected instead of system libexpected-dev" OFF)
11-
1210
add_library(tl_expected INTERFACE)
13-
14-
if(USE_VENDORED_TL_EXPECTED)
15-
target_compile_definitions(tl_expected INTERFACE USE_VENDORED_TL_EXPECTED)
16-
endif()
1711
target_include_directories(tl_expected INTERFACE
1812
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
1913
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

tl_expected/include/tl_expected/expected.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
// <http://creativecommons.org/publicdomain/zero/1.0/>.
1414
///
1515

16-
// If the system header is available and vendored version is not explicitly
17-
// requested, redirect to the system header with a deprecation warning.
18-
#if !defined(USE_VENDORED_TL_EXPECTED) && __has_include(<tl/expected.hpp>)
19-
#warning "tl_expected/expected.hpp is deprecated. Use <tl/expected.hpp> from libexpected-dev, or <rcpputils/tl_expected/expected.hpp> if the system header is not available."
16+
// If the system header is available, redirect to it.
17+
// Otherwise, fall back to the vendored version with a deprecation warning.
18+
#if __has_include(<tl/expected.hpp>)
2019
#include <tl/expected.hpp>
2120
#else
21+
#warning "tl_expected/expected.hpp is deprecated. Please install libexpected-dev and use <tl/expected.hpp> instead."
2222

2323
#ifndef TL_EXPECTED_HPP
2424
#define TL_EXPECTED_HPP

0 commit comments

Comments
 (0)