Skip to content

Commit

Permalink
Fix build of Windows Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
jwrober committed Aug 10, 2024
1 parent 9b756c4 commit 9189d06
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
needs: clang-format
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
env:
VCPKG_ROOT: C:/vcpkg
VCPKG_ROOT: ${{github.workspace}}/vcpkg
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg/bincache
steps:
- uses: actions/checkout@v4
Expand All @@ -197,14 +197,9 @@ jobs:
- uses: lukka/run-vcpkg@v11
name: Install dependencies
with:
vcpkgGitCommitId: f7423ee180c4b7f40d43402c2feb3859161ef625
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
vcpkgGitCommitId: 1de2026f28ead93ff1773e6e680387643e914ea1
- name: Configure
run: cmake -S . -B build -G "Visual Studio 17 2022" \
-DCMAKE_BUILD_TYPE=Debug -DVCPKG_BUILD_TYPE=debug \
-DVCPKG_TARGET_ARCHITECTURE=x64 -DFREECIV_USE_VCPKG=ON \
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -A x64 -T ClangCL
run: cmake -S . -B build --preset "windows-debug"
- name: Building
run: cmake --build build --config Debug
#- name: Test
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 12
"minor": 21
},
"configurePresets": [
{
Expand Down
1 change: 1 addition & 0 deletions common/aicore/cm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
see https://www.gnu.org/licenses/.
*/

#include <array>
#include <cstdlib>
#include <cstring>

Expand Down
1 change: 1 addition & 0 deletions common/city.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
\_____/ / If not, see https://www.gnu.org/licenses/.
\____/ ********************************************************/

#include <array>
#include <cmath> // pow, sqrt, exp
#include <cstdlib>
#include <cstring>
Expand Down

0 comments on commit 9189d06

Please sign in to comment.