mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-01 07:30:02 +00:00
Enable C++20 alongside C11 in the build
Add CXX to the project with C++20 (no extensions) and build C++ sources with -Wextra -fno-exceptions -fno-rtti -fno-threadsafe-statics on top of the existing warning flags. Give every toolchain a C++ compiler: the zig Windows toolchain, the static macOS/Windows CI jobs, the static musl image (clang++ plus libstdc++ headers) and the RPM spec.
This commit is contained in:
@@ -94,7 +94,7 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Build Clang static-only installation
|
||||
run: |
|
||||
cmake -S . -B build-static -DCMAKE_C_COMPILER=clang -DSS_DEPENDENCY_MODE=bundled -DWITH_STATIC=ON -DSS_BUILD_STATIC_LIBRARY=ON -DSS_BUILD_SHARED_LIBRARY=OFF
|
||||
cmake -S . -B build-static -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSS_DEPENDENCY_MODE=bundled -DWITH_STATIC=ON -DSS_BUILD_STATIC_LIBRARY=ON -DSS_BUILD_SHARED_LIBRARY=OFF
|
||||
cmake --build build-static --parallel 4
|
||||
ctest --test-dir build-static -L 'unit|vendor' --output-on-failure --no-tests=error
|
||||
cmake --install build-static --prefix "$PWD/install-static"
|
||||
@@ -135,7 +135,7 @@ jobs:
|
||||
mingw-w64-clang-x86_64-python
|
||||
- name: Build Clang static-only installation
|
||||
run: |
|
||||
cmake -S . -B build-static -G Ninja -DCMAKE_C_COMPILER=clang -DSS_DEPENDENCY_MODE=bundled -DWITH_STATIC=ON -DSS_BUILD_STATIC_LIBRARY=ON -DSS_BUILD_SHARED_LIBRARY=OFF
|
||||
cmake -S . -B build-static -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSS_DEPENDENCY_MODE=bundled -DWITH_STATIC=ON -DSS_BUILD_STATIC_LIBRARY=ON -DSS_BUILD_SHARED_LIBRARY=OFF
|
||||
cmake --build build-static --parallel 4
|
||||
ctest --test-dir build-static -L 'unit|vendor' --output-on-failure --no-tests=error
|
||||
cmake --install build-static --prefix "$PWD/install-static"
|
||||
|
||||
Reference in New Issue
Block a user