Remove use of boost.core and update cmakelists.txt
This commit is contained in:
parent
d77c23842b
commit
10dce215eb
|
@ -1,5 +1,6 @@
|
|||
# Generated by `boostdep --cmake multiprecision`
|
||||
# Copyright 2020 Peter Dimov
|
||||
# Copyright 2021 Matt Borland
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
@ -12,18 +13,30 @@ add_library(Boost::multiprecision ALIAS boost_multiprecision)
|
|||
|
||||
target_include_directories(boost_multiprecision INTERFACE include)
|
||||
|
||||
target_link_libraries(boost_multiprecision
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::integer
|
||||
Boost::lexical_cast
|
||||
Boost::math
|
||||
Boost::predef
|
||||
Boost::random
|
||||
Boost::rational
|
||||
)
|
||||
include(CMakeDependentOption)
|
||||
|
||||
cmake_dependent_option(BOOST_MP_STANDALONE "Use Boost.Multiprecision in standalone mode" ON "NOT BOOST_SUPERPROJECT_VERSION" OFF)
|
||||
|
||||
message(STATUS "Boost.Multiprecision: standalone mode ${BOOST_MP_STANDALONE}")
|
||||
|
||||
if(BOOST_MP_STANDALONE)
|
||||
|
||||
target_compile_definitions(boost_multiprecision INTERFACE BOOST_MP_STANDALONE=1)
|
||||
|
||||
else()
|
||||
|
||||
target_link_libraries(boost_multiprecision
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::integer
|
||||
Boost::lexical_cast
|
||||
Boost::math
|
||||
Boost::random
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||
|
||||
|
|
|
@ -2257,13 +2257,13 @@ imag(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
|
|||
// expression template versions here, plus overloads for non-complex types:
|
||||
//
|
||||
template <class T, expression_template_option ExpressionTemplates>
|
||||
inline BOOST_MP_CXX14_CONSTEXPR typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type
|
||||
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates>>>::type::type
|
||||
abs(const number<T, ExpressionTemplates>& v)
|
||||
{
|
||||
return std::move(boost::math::hypot(real(v), imag(v)));
|
||||
}
|
||||
template <class tag, class A1, class A2, class A3, class A4>
|
||||
inline BOOST_MP_CXX14_CONSTEXPR typename boost::lazy_enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex, component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type> >::type
|
||||
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex, component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type>>::type::type
|
||||
abs(const detail::expression<tag, A1, A2, A3, A4>& v)
|
||||
{
|
||||
using number_type = typename detail::expression<tag, A1, A2, A3, A4>::result_type;
|
||||
|
@ -2291,7 +2291,7 @@ arg(const detail::expression<tag, A1, A2, A3, A4>& v)
|
|||
}
|
||||
|
||||
template <class T, expression_template_option ExpressionTemplates>
|
||||
inline BOOST_MP_CXX14_CONSTEXPR typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type
|
||||
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates>>>::type::type
|
||||
norm(const number<T, ExpressionTemplates>& v)
|
||||
{
|
||||
typename component_type<number<T, ExpressionTemplates> >::type a(real(v)), b(imag(v));
|
||||
|
|
Loading…
Reference in New Issue