forked from boostorg/integer
Fail libgmpxx detection on Linux if libstdc++ is not used as the std library.
libgmpxx was built against libstdc++, so if the application uses e.g. libc++, linking fails because of the standard symbols mismatch.
This commit is contained in:
@ -5,3 +5,11 @@
|
|||||||
|
|
||||||
#include <gmpxx.h>
|
#include <gmpxx.h>
|
||||||
|
|
||||||
|
// On Linux, libgmpxx is built with gcc and libstdc++. When the user application, such as tests, are built against libc++,
|
||||||
|
// linking fails because of the C++ standard library symbol names mismatch. So fail the test if we're not using libstdc++.
|
||||||
|
#if defined(__linux__) || defined(__linux) || defined(linux)
|
||||||
|
#include <utility>
|
||||||
|
#if !defined(__GLIBCPP__) && !defined(__GLIBCXX__)
|
||||||
|
#error "libgmpxx is not supported on this platform with this C++ standard library"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user