• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Check whether the version in CMakeLists.txt is up to date
2 //
3 // Copyright 2018 Peter Dimov
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 //
7 // See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt
9 
10 #include <boost/core/lightweight_test.hpp>
11 #include <boost/version.hpp>
12 #include <cstdio>
13 
main(int ac,char const * av[])14 int main( int ac, char const* av[] )
15 {
16     BOOST_TEST_EQ( ac, 2 );
17 
18     if( ac >= 2 )
19     {
20         char version[ 64 ];
21         std::sprintf( version, "%d.%d.%d", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100 );
22 
23         BOOST_TEST_CSTR_EQ( av[1], version );
24     }
25 
26     return boost::report_errors();
27 }
28