mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-30 07:52:41 +02:00
commit
0d203644be
1
.github/workflows/gha.yml
vendored
1
.github/workflows/gha.yml
vendored
@ -248,6 +248,7 @@ jobs:
|
|||||||
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
|
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
|
vcpkg update
|
||||||
vcpkg install gtest:x64-windows
|
vcpkg install gtest:x64-windows
|
||||||
vcpkg install zlib:x64-windows
|
vcpkg install zlib:x64-windows
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
|
@ -115,8 +115,11 @@ IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND AND NOT "${MSGPACK_FUZZ_REGRESS
|
|||||||
OPTION (MSGPACK_GEN_COVERAGE "Enable running gcov to get a test coverage report." OFF)
|
OPTION (MSGPACK_GEN_COVERAGE "Enable running gcov to get a test coverage report." OFF)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
INCLUDE (CheckCXXSourceCompiles)
|
|
||||||
CHECK_CXX_SOURCE_COMPILES ("
|
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.1)
|
||||||
|
INCLUDE (CheckCXXSourceCompiles)
|
||||||
|
CHECK_CXX_SOURCE_COMPILES ("
|
||||||
#include <bits/atomicity.h>
|
#include <bits/atomicity.h>
|
||||||
int atomic_sub(int i) { return __gnu_cxx::__exchange_and_add(&i, -1) - 1; }
|
int atomic_sub(int i) { return __gnu_cxx::__exchange_and_add(&i, -1) - 1; }
|
||||||
int atomic_add(int i) { return __gnu_cxx::__exchange_and_add(&i, 1) + 1; }
|
int atomic_add(int i) { return __gnu_cxx::__exchange_and_add(&i, 1) + 1; }
|
||||||
@ -125,7 +128,11 @@ int main(int argc, char * argv[])
|
|||||||
atomic_sub(1);
|
atomic_sub(1);
|
||||||
atomic_add(1);
|
atomic_add(1);
|
||||||
}
|
}
|
||||||
" MSGPACK_ENABLE_GCC_CXX_ATOMIC)
|
"
|
||||||
|
MSGPACK_ENABLE_GCC_CXX_ATOMIC)
|
||||||
|
ENDIF ()
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
|
||||||
INCLUDE (Files.cmake)
|
INCLUDE (Files.cmake)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user