fix build and install gcc-9
This commit is contained in:
parent
1e09aef7fd
commit
601b95ee41
2 changed files with 13 additions and 8 deletions
17
.travis.yml
17
.travis.yml
|
@ -33,12 +33,6 @@ matrix:
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++
|
compiler: g++
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
|
||||||
- g++-9
|
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=g++-9 CC_COMPILER=gcc-9
|
- CXX_COMPILER=g++-9 CC_COMPILER=gcc-9
|
||||||
|
|
||||||
|
@ -123,6 +117,17 @@ install:
|
||||||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_INSTALL}/lib"
|
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_INSTALL}/lib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- |
|
||||||
|
# If linux and gcc-9 install gcc-9.
|
||||||
|
if [[ "${CXX_COMPILER}" == "g++-9" ]]; then
|
||||||
|
wget http://kayari.org/gcc-latest/gcc-latest.deb
|
||||||
|
sudo dpkg -i gcc-latest.deb
|
||||||
|
sudo ln -s /opt/gcc-latest/bin/gcc /usr/bin/gcc-9
|
||||||
|
sudo ln -s /opt/gcc-latest/bin/g++ /usr/bin/g++-9
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9
|
||||||
|
sudo ldconfig /opt/gcc-latest/lib64
|
||||||
|
fi
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- rm -rf build
|
- rm -rf build
|
||||||
- mkdir -p build
|
- mkdir -p build
|
||||||
|
|
|
@ -167,11 +167,11 @@ template <typename E, E V>
|
||||||
constexpr auto suffix = sizeof("]") - 1;
|
constexpr auto suffix = sizeof("]") - 1;
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
std::string_view name{__PRETTY_FUNCTION__};
|
std::string_view name{__PRETTY_FUNCTION__};
|
||||||
constexpr auto prefix = sizeof("constexpr std::string_view nameof::detail::nameof_enum_impl() [with E = ") + nameof_type_impl<identity<E>>().length() + sizeof("; V = ");
|
|
||||||
# if __GNUC__ < 9
|
# if __GNUC__ < 9
|
||||||
constexpr auto suffix = sizeof("; std::string_view = std::basic_string_view<char>]") - 1;
|
constexpr auto prefix = sizeof("constexpr std::string_view nameof::detail::nameof_enum_impl() [with E = ") + nameof_type_impl<identity<E>>().length() + sizeof("; V = ");
|
||||||
name.remove_prefix(prefix);
|
name.remove_prefix(prefix);
|
||||||
# endif
|
# endif
|
||||||
|
constexpr auto suffix = sizeof("; std::string_view = std::basic_string_view<char>]") - 1;
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
std::string_view name{__FUNCSIG__};
|
std::string_view name{__FUNCSIG__};
|
||||||
constexpr auto suffix = sizeof(">(void) noexcept") - 1;
|
constexpr auto suffix = sizeof(">(void) noexcept") - 1;
|
||||||
|
|
Loading…
Reference in a new issue