Skip to content

Commit

Permalink
Some settings for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bialger committed Jan 18, 2024
1 parent 3e2da78 commit 9c8d033
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,27 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Configure
shell: cmake -P {0}
run: |
set(ENV{CC} ${{ matrix.config.cc }})
set(ENV{CXX} ${{ matrix.config.cxx }})
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x")
execute_process(
COMMAND "${{ matrix.config.environment_script }}" && set
OUTPUT_FILE environment_script_output.txt
)
file(STRINGS environment_script_output.txt output_lines)
foreach(line IN LISTS output_lines)
if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
endif()
endforeach()
endif()
- name: Create CMake cache
shell: bash
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake -S . -B cmake-build -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC
Expand Down

0 comments on commit 9c8d033

Please sign in to comment.