Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / histogram / test / check_cmake_version.cpp
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 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8
9 #include <boost/core/lightweight_test.hpp>
10 #include <boost/version.hpp>
11 #include <cstdio>
12
13 int main(int ac, char const* av[]) {
14   BOOST_TEST_EQ(ac, 2);
15
16   if (ac >= 2) {
17     char version[64];
18     std::sprintf(version, "%d.%d.%d", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000,
19                  BOOST_VERSION % 100);
20
21     BOOST_TEST_CSTR_EQ(av[1], version);
22   }
23
24   return boost::report_errors();
25 }