Skip to content

Commit

Permalink
Add boost minimum version to CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele77 committed Oct 24, 2024
1 parent f45cb45 commit 8eceadc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ endif()
if (CLI_UseBoostAsio)
set(Boost_NO_BOOST_CMAKE ON)
add_definitions( -DBOOST_ALL_NO_LIB ) # for windows
find_package(Boost 1.55 REQUIRED COMPONENTS system)
find_package(Boost 1.66 REQUIRED COMPONENTS system)
endif()

if (CLI_UseStandaloneAsio)
Expand Down Expand Up @@ -155,4 +155,4 @@ if(NOT CMAKE_SKIP_INSTALL_RULES)
FILES "${CMAKE_CURRENT_BINARY_DIR}/cli.pc"
DESTINATION ${PKGCONFIG_INSTALL_DIR}
)
endif()
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A cross-platform header only C++14 library for interactive command line interfac

The library has no dependencies if you don't need remote sessions.

The library depends on asio (either the standalone version or the boost version)
The library depends on asio (either the standalone version or the boost version >= 1.66)
*only* to provide telnet server (i.e., remote sessions).

## Installation
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ set(Boost_NO_BOOST_CMAKE ON)
add_definitions( -DBOOST_ALL_NO_LIB ) # for windows

# finds boost, triggers an error otherwise
find_package(Boost 1.55 REQUIRED COMPONENTS unit_test_framework)
find_package(Boost 1.66 REQUIRED COMPONENTS unit_test_framework system)

# finds standalone asio, triggers an error otherwise
find_path(STANDALONE_ASIO_INCLUDE_PATH NAMES "asio.hpp" HINTS ${ASIO_INCLUDEDIR})
Expand Down Expand Up @@ -66,7 +66,7 @@ target_include_directories(test_suite SYSTEM PRIVATE ${Boost_INCLUDE_DIRS})
# indicates the shared library variant
target_compile_definitions(test_suite PRIVATE "BOOST_TEST_DYN_LINK=1")
# indicates the link paths
target_link_libraries(test_suite ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} standalone_asio_test cli::cli)
target_link_libraries(test_suite ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} Boost::system standalone_asio_test cli::cli)

# declares a test with our executable
add_test(NAME cli_test COMMAND test_suite)

0 comments on commit 8eceadc

Please sign in to comment.