has_gmpxx.cpp 719 B

123456789101112131415
  1. // Copyright John Maddock 2008.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #include <gmpxx.h>
  6. // On Linux, libgmpxx is built with gcc and libstdc++. When the user application, such as tests, are built against libc++,
  7. // linking fails because of the C++ standard library symbol names mismatch. So fail the test if we're not using libstdc++.
  8. #if defined(__linux__) || defined(__linux) || defined(linux)
  9. #include <utility>
  10. #if !defined(__GLIBCPP__) && !defined(__GLIBCXX__)
  11. #error "libgmpxx is not supported on this platform with this C++ standard library"
  12. #endif
  13. #endif