On Ubuntu, there are ccache symlinks for `x86_64-w64-mingw32-gcc` and `x86_64-w64-mingw32-g++` but not the POSIX-specific variants. Furthermore, not all Linux distributions add the `-posix` suffix for that variant. Thus, this commit changes our Toolchain file to use the more generic `x86_64-w64-mingw32-gcc` and `x86_64-w64-mingw32-g++` compiler names and changes our CI to use the POSIX variant by default.
sudo apt-get update
sudo apt-get install -y \
mingw-w64
+
+ # cvc5 requires the POSIX version of MinGW to implement the time limit
+ # using threads
+ sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
+ sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
echo "::endgroup::"
# Note: macOS comes with a libedit; it does not need to brew-installed
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
-SET(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc-posix)
-SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++-posix)
+SET(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
SET(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
# Set target environment path