Skip to content

Commit 1fb818d

Browse files
committed
Add CI to build with clang on Windows
1 parent 84658df commit 1fb818d

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on:
2+
- push
3+
4+
jobs:
5+
build-clang:
6+
runs-on: windows-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- run: |
10+
cmake -Bbuild -GNinja -DCMAKE_C_COMPILER=clang
11+
cmake --build build
12+
build-msvc:
13+
runs-on: windows-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- run: |
17+
cmake -Bbuild
18+
cmake --build build

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ ifneq ($(shared), not-set)
6666
endif
6767

6868
define run-config
69-
mkdir -p $(BUILDDIR)
70-
cd $(BUILDDIR) && cmake $(CURDIR) $(CONFIG_FLAGS)
69+
cmake $(CURDIR) -B"$(BUILDDIR)" $(CONFIG_FLAGS)
7170
endef
7271

7372
all clean install: $(BUILDDIR)
74-
make -C $(BUILDDIR) $@
73+
make --build $(BUILDDIR) $@
7574

7675
uninstall:
7776
xargs rm < $(BUILDDIR)/install_manifest.txt

cmake/GKlibSystem.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Helper modules.
22

33
# Add compiler flags.
4-
if(MSVC)
4+
if(WIN32)
55
set(GKlib_COPTS "/Ox")
66
set(GKlib_COPTIONS "-DWIN32 -DMSC -D_CRT_SECURE_NO_DEPRECATE -DUSE_GKREGEX")
77
elseif(MINGW)
88
set(GKlib_COPTS "-DUSE_GKREGEX")
99
else()
1010
set(GKlib_COPTIONS "-DLINUX -D_FILE_OFFSET_BITS=64")
11-
endif(MSVC)
11+
endif(WIN32)
1212

1313
if(CYGWIN)
1414
set(GKlib_COPTIONS "${GKlib_COPTIONS} -DCYGWIN")

0 commit comments

Comments
 (0)