Skip to content

Commit

Permalink
ci(build): build using VisualStudio instead of MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Nov 11, 2023
1 parent b5344de commit 8885ab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,16 @@ jobs:
name: "Windows"
runs-on: 'windows-2022'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v3'
- uses: 'actions/checkout@v3'
with:
submodules: 'recursive'
- name: 'Set up MinGW-w64'
uses: 'msys2/setup-msys2@v2'
with:
update: true
msystem: 'mingw64'
- name: 'Configure'
run: 'cmake -G "MinGW Makefiles" -B build -DCMAKE_BUILD_TYPE=Release'
shell: 'bash'
run: 'cmake -B build -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DZK_BUILD_EXAMPLES=ON -DZK_BUILD_TESTS=ON'
- name: 'Build'
run: 'cmake --build build'
run: 'cmake --build build --config Release -j 2'
- name: 'Publish Library'
uses: 'actions/upload-artifact@v3'
with:
name: 'Windows x86-64 DLL'
path: 'build/libzenkitcapi.dll'
path: 'build/*'
20 changes: 0 additions & 20 deletions support/BuildSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
function(bs_select_cflags SANITIZERS COMPILE LINK)
if (MSVC)
bs_internal_select_cflags_msvc(${SANITIZERS} _INTERNAL_COMPILE_FLAGS _INTERNAL_LINK_FLAGS)
elseif(MINGW)
bs_internal_select_cflags_mingw(${SANITIZERS} _INTERNAL_COMPILE_FLAGS _INTERNAL_LINK_FLAGS)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "^Clang")
bs_internal_select_cflags_clang(${SANITIZERS} _INTERNAL_COMPILE_FLAGS _INTERNAL_LINK_FLAGS)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "^GCC")
Expand Down Expand Up @@ -86,21 +84,3 @@ function(bs_internal_select_cflags_clang SANITIZERS COMPILE LINK)
set(${LINK} ${_INTERNAL_LINK_FLAGS} PARENT_SCOPE)
return()
endfunction()

## Compute the compile and link flags for MinGW
##
## Args:
## SANITIZERS(bool): Whether to enable sanitizers or not.
##
## Returns:
## COMPILE(list): A list containing the compiler flags
## LINK(list): A list containing the linker flags
function(bs_internal_select_cflags_mingw SANITIZERS COMPILE LINK)
bs_internal_select_cflags_gcc(${SANITIZERS} _INTERNAL_COMPILE_FLAGS _INTERNAL_LINK_FLAGS)
list(APPEND _INTERNAL_LINK_FLAGS "-static")

# return _INTERNAL_COMPILE_FLAGS, _INTERNAL_LINK_FLAGS;
set(${COMPILE} ${_INTERNAL_COMPILE_FLAGS} PARENT_SCOPE)
set(${LINK} ${_INTERNAL_LINK_FLAGS} PARENT_SCOPE)
return()
endfunction()

0 comments on commit 8885ab3

Please sign in to comment.