mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-11 13:14:06 +00:00
fix for failing tests with exception-handling=off
This commit is contained in:
parent
e415be10cd
commit
1540c4e94a
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.6)
|
cmake_minimum_required(VERSION 3.6)
|
||||||
|
|
||||||
project(BoostHistogram VERSION 1.72.0 LANGUAGES CXX)
|
project(BoostHistogram VERSION 1.73.0 LANGUAGES CXX)
|
||||||
|
|
||||||
add_library(boost_histogram INTERFACE)
|
add_library(boost_histogram INTERFACE)
|
||||||
set_property(TARGET boost_histogram PROPERTY EXPORT_NAME histogram)
|
set_property(TARGET boost_histogram PROPERTY EXPORT_NAME histogram)
|
||||||
|
@ -6,16 +6,20 @@
|
|||||||
|
|
||||||
#ifdef BOOST_NO_EXCEPTIONS
|
#ifdef BOOST_NO_EXCEPTIONS
|
||||||
|
|
||||||
|
#include <boost/assert/source_location.hpp>
|
||||||
#include <cstdlib> // std::abort
|
#include <cstdlib> // std::abort
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
// dummy implementation for user-defined function from boost/throw_exception.hpp
|
// dummy implementation for user-defined function from boost/throw_exception.hpp
|
||||||
inline void throw_exception(std::exception const& e) {
|
inline void throw_exception(std::exception const& e, boost::source_location const& l) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << l.file_name() << ":" << l.line() << ":" << l.column() << ": exception in '"
|
||||||
|
<< l.function_name() << " \"" << e.what() << "\"" << std::endl;
|
||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user