File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ jobs:
248248 if : steps.cache-vcpkg.outputs.cache-hit != 'true'
249249 shell : powershell
250250 run : |
251+ vcpkg update
251252 vcpkg install gtest:x64-windows
252253 vcpkg install zlib:x64-windows
253254 - name : Build and test
Original file line number Diff line number Diff line change @@ -115,8 +115,11 @@ IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND AND NOT "${MSGPACK_FUZZ_REGRESS
115115 OPTION (MSGPACK_GEN_COVERAGE "Enable running gcov to get a test coverage report." OFF )
116116ENDIF ()
117117
118- INCLUDE (CheckCXXSourceCompiles)
119- CHECK_CXX_SOURCE_COMPILES ("
118+
119+ IF ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
120+ IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.1)
121+ INCLUDE (CheckCXXSourceCompiles)
122+ CHECK_CXX_SOURCE_COMPILES ("
120123#include <bits/atomicity.h>
121124int atomic_sub(int i) { return __gnu_cxx::__exchange_and_add(&i, -1) - 1; }
122125int atomic_add(int i) { return __gnu_cxx::__exchange_and_add(&i, 1) + 1; }
@@ -125,7 +128,11 @@ int main(int argc, char * argv[])
125128 atomic_sub(1);
126129 atomic_add(1);
127130}
128- " MSGPACK_ENABLE_GCC_CXX_ATOMIC)
131+ "
132+ MSGPACK_ENABLE_GCC_CXX_ATOMIC)
133+ ENDIF ()
134+ ENDIF ()
135+
129136
130137INCLUDE (Files .cmake)
131138
You can’t perform that action at this time.
0 commit comments