File tree 2 files changed +51
-3
lines changed
2 files changed +51
-3
lines changed Original file line number Diff line number Diff line change 55
55
path : ~/.cache/bazel
56
56
key : bazel-${{ runner.os }}
57
57
- run : bazel build //...
58
+
59
+ windows_msys2 :
60
+ name : Windows MSYS2 / ${{ matrix.arch }}
61
+ runs-on : windows-latest
62
+ strategy :
63
+ fail-fast : false
64
+ matrix :
65
+ include :
66
+ - arch : x86_64
67
+ msystem : mingw64
68
+ - arch : i686
69
+ msystem : mingw32
70
+ defaults :
71
+ run :
72
+ shell : msys2 {0}
73
+ steps :
74
+ - uses : actions/checkout@v2
75
+ - uses : msys2/setup-msys2@v2
76
+ with :
77
+ msystem : ${{ matrix.msystem }}
78
+ update : false
79
+ install : >-
80
+ base-devel
81
+ git
82
+ mingw-w64-${{ matrix.arch }}-cmake
83
+ mingw-w64-${{ matrix.arch }}-gcc
84
+ mingw-w64-${{ matrix.arch }}-gtest
85
+ mingw-w64-${{ matrix.arch }}-ninja
86
+
87
+ - name : CMake configure
88
+ # Enable only SCALAR and AVX2 to speed up the build/test.
89
+ run : |
90
+ cmake \
91
+ -DCMAKE_BUILD_TYPE=Release \
92
+ -DCMAKE_CXX_FLAGS="-DHWY_DISABLED_TARGETS=\"~(HWY_SCALAR|HWY_AVX2)\"" \
93
+ -DHWY_WARNINGS_ARE_ERRORS=ON \
94
+ -DHWY_SYSTEM_GTEST=ON \
95
+ -B out \
96
+ -G Ninja
97
+ - name : CMake build
98
+ run : cmake --build out
99
+ - name : Test
100
+ run : ctest --test-dir out --parallel 2 --output-on-failure
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ if(POLICY CMP0083)
19
19
cmake_policy (SET CMP0083 NEW)
20
20
endif ()
21
21
22
- project (hwy VERSION 0.14.2) # Keep in sync with highway.h version
22
+ project (hwy LANGUAGES CXX VERSION 0.14.2) # Keep in sync with highway.h version
23
23
24
24
set (CMAKE_CXX_STANDARD 11)
25
25
set (CMAKE_CXX_EXTENSIONS OFF )
@@ -374,8 +374,13 @@ foreach (TESTFILE IN LISTS HWY_TEST_FILES)
374
374
else ()
375
375
target_link_libraries (${TESTNAME} hwy hwy_contrib hwy_test gtest gtest_main)
376
376
endif ()
377
- # Output test targets in the test directory.
378
- set_target_properties (${TESTNAME} PROPERTIES PREFIX "tests/" )
377
+
378
+ # MINGW with Ninja generates two build rules for the same file when setting a
379
+ # prefix in the target. We skip the prefix in MINGW to workaround the issue.
380
+ if (NOT MINGW OR NOT ${CMAKE_GENERATOR} STREQUAL "Ninja" ).
381
+ # Output test targets in the test directory.
382
+ set_target_properties (${TESTNAME} PROPERTIES PREFIX "tests/" )
383
+ endif ()
379
384
380
385
if (HWY_EMSCRIPTEN)
381
386
set_target_properties (${TESTNAME} PROPERTIES LINK_FLAGS "-s SINGLE_FILE=1" )
You can’t perform that action at this time.
0 commit comments