forked from boostorg/concept_check
Update CI
This commit is contained in:
5 files changed
+267
-121
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# Copyright 2021-2024 Alexander Grund
|
||||
# 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.16)
|
||||
|
||||
project(cmake_subdir_test LANGUAGES CXX)
|
||||
|
||||
# Those 2 should work the same
|
||||
# while using find_package for the installed Boost avoids the need to manually specify dependencies
|
||||
if(BOOST_CI_INSTALL_TEST)
|
||||
find_package(boost_concept_check REQUIRED)
|
||||
else()
|
||||
set(BOOST_INCLUDE_LIBRARIES concept_check)
|
||||
add_subdirectory(../../../.. deps/boost EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Boost::concept_check)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME main COMMAND main)
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright David Abrahams 2006. 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)
|
||||
#ifndef BOOST_LIBS_CONCEPT_CHECK_FAKE_SORT_DWA2006430_HPP
|
||||
# define BOOST_LIBS_CONCEPT_CHECK_FAKE_SORT_DWA2006430_HPP
|
||||
|
||||
# include <iterator>
|
||||
# include <boost/concept/requires.hpp>
|
||||
# include <boost/concept_check.hpp>
|
||||
|
||||
namespace fake
|
||||
{
|
||||
using namespace boost;
|
||||
|
||||
template<typename RanIter>
|
||||
BOOST_CONCEPT_REQUIRES(
|
||||
((Mutable_RandomAccessIterator<RanIter>))
|
||||
((LessThanComparable<typename Mutable_RandomAccessIterator<RanIter>::value_type>))
|
||||
|
||||
, (void))
|
||||
sort(RanIter,RanIter)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_LIBS_CONCEPT_CHECK_FAKE_SORT_DWA2006430_HPP
|
||||
// Copyright David Abrahams 2006. 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)
|
||||
#include <vector>
|
||||
#undef NDEBUG
|
||||
|
||||
int main()
|
||||
{
|
||||
std::vector<int> v;
|
||||
fake::sort(v.begin(), v.end());
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user