mirror of
https://github.com/boostorg/circular_buffer.git
synced 2026-02-09 11:02:30 +00:00
Add test/cmake_install_test
This commit is contained in:
17
test/cmake_install_test/CMakeLists.txt
Normal file
17
test/cmake_install_test/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2018, 2019, 2026 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.31)
|
||||
|
||||
project(cmake_install_test LANGUAGES CXX)
|
||||
|
||||
find_package(boost_circular_buffer REQUIRED)
|
||||
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Boost::circular_buffer)
|
||||
|
||||
enable_testing()
|
||||
add_test(main main)
|
||||
|
||||
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||
11
test/cmake_install_test/main.cpp
Normal file
11
test/cmake_install_test/main.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2026 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/circular_buffer.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::circular_buffer<int> cb;
|
||||
return cb.empty()? 0: 1;
|
||||
}
|
||||
Reference in New Issue
Block a user