File tree 6 files changed +9
-29
lines changed
6 files changed +9
-29
lines changed Original file line number Diff line number Diff line change 21
21
# delete /c/Strawberry/c/bin/gmake built for MinGW that is found on runners, because we must use make built for MSYS
22
22
run : if GMAKE_PATH=`which gmake`; then rm -f "$GMAKE_PATH"; fi
23
23
shell : msys2 {0}
24
- - name : Install Windows packages
25
- run : choco install ninja
26
24
- uses : ilammy/msvc-dev-cmd@v1
27
25
with :
28
26
arch : ${{ matrix.arch }}
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ The MSYS2 installation is required to provide the Bash shell and Unix tools requ
32
32
- Clang (via Visual Studio or ` choco install llvm ` )
33
33
- CMake (via Visual Studio or ` choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' ` )
34
34
- Git (` choco install git ` )
35
- - Ninja (` choco install ninja ` )
36
35
- MSYS2 (` choco install msys2 ` )
37
36
38
37
** Unix tools**
Original file line number Diff line number Diff line change @@ -83,8 +83,6 @@ where git
83
83
if %errorlevel% neq 0 call :error_missing_command git, " 'choco install git'"
84
84
where cmake
85
85
if %errorlevel% neq 0 call :error_missing_command cmake, " Visual Studio or 'choco install cmake --installargs ADD_CMAKE_TO_PATH=System'"
86
- where ninja
87
- if %errorlevel% neq 0 call :error_missing_command ninja, " 'choco install ninja'"
88
86
where clang-cl
89
87
if %errorlevel% neq 0 call :error_missing_command clang-cl, " Visual Studio or 'choco install llvm'"
90
88
call %BASH% 'true'
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ cmake .. %CMAKE_OPTIONS% ^
23
23
echo .
24
24
echo ### Building
25
25
set CCC_OVERRIDE_OPTIONS = x-TC x-TP x/TC x/TP
26
- ninja || exit /b 1
26
+ cmake %CMAKE_BUILD_OPTIONS% || exit /b 1
27
27
set CCC_OVERRIDE_OPTIONS =
28
28
29
29
echo .
30
30
echo ### Installing
31
- ninja install || exit /b 1
31
+ cmake %CMAKE_INSTALL_OPTIONS% || exit /b 1
32
32
33
33
:: Install PDB files
34
34
xcopy /Y /F objc.pdb " %INSTALL_PREFIX% \lib\"
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ cmake .. %CMAKE_OPTIONS% ^
28
28
29
29
echo .
30
30
echo ### Building
31
- ninja || exit /b 1
31
+ cmake %CMAKE_BUILD_OPTIONS% || exit /b 1
32
32
33
33
echo .
34
34
echo ### Installing
35
- ninja install || exit /b 1
35
+ cmake %CMAKE_INSTALL_OPTIONS% || exit /b 1
36
36
37
37
:: Install PDB file
38
38
xcopy /Y /F dispatch.pdb " %INSTALL_PREFIX% \lib\"
Original file line number Diff line number Diff line change @@ -39,26 +39,11 @@ if "%ARCH%" == "x86" (
39
39
exit /b 1
40
40
)
41
41
42
- :: add flags for cross compilation
43
- if not " %VSCMD_ARG_HOST_ARCH% " == " " (
44
- if not " %VSCMD_ARG_HOST_ARCH% " == " %ARCH% " (
45
- if " %ARCH% " == " x86" (
46
- set FLAGS = -m32
47
- ) else if " %ARCH% " == " x64" (
48
- set FLAGS = -m64
49
- )
50
- set " CFLAGS = %FLAGS% %CFLAGS% "
51
- set " CXXFLAGS = %FLAGS% %CXXFLAGS% "
52
- set " LDFLAGS = %FLAGS% %LDFLAGS% "
53
- )
54
- )
55
-
56
42
:: Common CMake options
43
+ set CMAKE_ARCH = %ARCH%
44
+ if " %ARCH% " == " x86" set CMAKE_ARCH = Win32
57
45
set CMAKE_BUILD_TYPE = %BUILD_TYPE%
58
46
if " %BUILD_TYPE% " == " Release" set CMAKE_BUILD_TYPE = RelWithDebInfo
59
- set CMAKE_OPTIONS = ^
60
- -G Ninja ^
61
- -D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
62
- -D CMAKE_INSTALL_PREFIX=" %INSTALL_PREFIX% " ^
63
- -D CMAKE_C_COMPILER=clang-cl ^
64
- -D CMAKE_CXX_COMPILER=clang-cl ^
47
+ set CMAKE_OPTIONS = -T ClangCL -A %CMAKE_ARCH% -DCMAKE_INSTALL_PREFIX=" %INSTALL_PREFIX% "
48
+ set CMAKE_BUILD_OPTIONS = --build . --config %CMAKE_BUILD_TYPE% -- -m
49
+ set CMAKE_INSTALL_OPTIONS = --build . --config %CMAKE_BUILD_TYPE% --target install
You can’t perform that action at this time.
0 commit comments