mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
ba5ce157bd
Test whether we're building with libstdc++ or libc++. Use stdc++filesystem if the former and c++experimental if the later. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
18 lines
324 B
Bash
Executable File
18 lines
324 B
Bash
Executable File
#!/bin/sh
|
|
|
|
CXX=$1
|
|
|
|
shift
|
|
|
|
echo "#include <utility>
|
|
#if defined(_LIBCPP_VERSION)
|
|
#define MYRESULT libc++
|
|
#elif defined(__GLIBCXX__)
|
|
#define MYRESULT libstdc++
|
|
#else
|
|
#define MYRESULT unknown
|
|
#endif
|
|
|
|
HelloFriendsTheAnsWerIs MYRESULT" | ${CXX} -E -xc++ $* - | \
|
|
grep "HelloFriendsTheAnsWerIs" | cut -f 2 -d ' ' | tr -d '\n'
|