diff --git a/.github/workflows/ci_msw.yml b/.github/workflows/ci_msw.yml index 52c399fbaf..b68ed19386 100644 --- a/.github/workflows/ci_msw.yml +++ b/.github/workflows/ci_msw.yml @@ -121,3 +121,37 @@ jobs: working-directory: tests run: | .\vc*msw*\test_gui.exe + + msw-msys2-clang: + runs-on: windows-latest + + defaults: + run: + shell: msys2 {0} + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: mingw64 + update: true + install: mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang + + - name: Configuring + run: | + clang --version + cmake --version + mkdir build_cmake + pushd build_cmake + cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=clang.exe -DCMAKE_CXX_COMPILER=clang++.exe -DwxBUILD_SAMPLES=ALL -DwxBUILD_TESTS=ALL -DwxBUILD_DEMOS=ON -DCMAKE_BUILD_TYPE=Release .. + + - name: Building + working-directory: build_cmake + run: | + wxPROC_COUNT=`../build/tools/proc_count.sh` + cmake --build . -- -j$wxPROC_COUNT diff --git a/build/cmake/lib/zlib.cmake b/build/cmake/lib/zlib.cmake index 1eede10235..8814adbf28 100644 --- a/build/cmake/lib/zlib.cmake +++ b/build/cmake/lib/zlib.cmake @@ -33,6 +33,9 @@ if(wxUSE_ZLIB STREQUAL "builtin") # more convenient than having to modify it to avoid them. target_compile_definitions(wxzlib PRIVATE _CRT_NONSTDC_NO_WARNINGS) endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + target_compile_options(wxzlib PRIVATE -Wno-deprecated-non-prototype) + endif() set(ZLIB_LIBRARIES wxzlib) set(ZLIB_INCLUDE_DIRS ${wxSOURCE_DIR}/src/zlib) elseif(wxUSE_ZLIB) diff --git a/build/tools/proc_count.sh b/build/tools/proc_count.sh index 16660df2c1..7b10dbe0ac 100755 --- a/build/tools/proc_count.sh +++ b/build/tools/proc_count.sh @@ -1,7 +1,7 @@ # This script outputs the number of available processors/cores plus one. case `uname` in - Linux) + Linux|MSYS*|MINGW*) wxPROC_COUNT=`nproc` ;;