From 290ea7840c979e38a2108030a99e7e9c61f40a8c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 23 Nov 2017 11:43:02 +0200 Subject: Restructure and install std-detect.hxx We have to install this header since it needs to be included'able during module sidebuilds. --- libstd-modules/std-detect.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libstd-modules/std-detect.hxx (limited to 'libstd-modules/std-detect.hxx') diff --git a/libstd-modules/std-detect.hxx b/libstd-modules/std-detect.hxx new file mode 100644 index 0000000..b2998b5 --- /dev/null +++ b/libstd-modules/std-detect.hxx @@ -0,0 +1,15 @@ +// To detect the standard library we need to include a certain header first. +// +#if defined(__clang__) +# if __has_include(<__config>) // libc++ _LIBCPP_VERSION +# include <__config> +# elif __has_include() // libstdc++ __GLIBCXX__ +# include +# endif +#elif defined(__GNUC__) +# include // libstdc++ __GLIBCXX__ +#endif + +#if !defined(_MSC_VER) && !defined(__GLIBCXX__) && !defined(_LIBCPP_VERSION) +# error unknown standard library implementation +#endif -- cgit v1.1