Skip to content

Commit 9bd555d

Browse files
authored
Update cmake-multi-platform.yml
1 parent 7e1c355 commit 9bd555d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
run: |
4747
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
4848
49-
- name: Configure CMake
49+
- name: Configure CMake for Linux
50+
if: matrix.os == 'ubuntu-latest'
5051
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
5152
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
5253
run: >
@@ -56,6 +57,18 @@ jobs:
5657
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
5758
-S ${{ github.workspace }}
5859
60+
- name: Configure CMake for Windows x86
61+
if: matrix.os == 'windows-latest'
62+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
63+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
64+
run: >
65+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
66+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
67+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
68+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
69+
-S ${{ github.workspace }}
70+
-A Win32 -T host=x86
71+
5972
- name: Build
6073
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
6174
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

0 commit comments

Comments
 (0)