mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Upgrade libsrt to v1.5.3. v5.0.183 (#3808)
This commit is contained in:
parent
389a62ee3a
commit
632d457194
154 changed files with 39813 additions and 17038 deletions
62
trunk/3rdparty/srt-1-fit/scripts/CheckCXXAtomic.cmake
vendored
Normal file
62
trunk/3rdparty/srt-1-fit/scripts/CheckCXXAtomic.cmake
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
#
|
||||
# SRT - Secure, Reliable, Transport
|
||||
# Copyright (c) 2021 Haivision Systems Inc.
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
# Check for c++11 std::atomic.
|
||||
#
|
||||
# Sets:
|
||||
# HAVE_CXX_ATOMIC
|
||||
# HAVE_CXX_ATOMIC_STATIC
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(CheckLibraryExists)
|
||||
|
||||
function(CheckCXXAtomic)
|
||||
|
||||
unset(HAVE_CXX_ATOMIC CACHE)
|
||||
unset(HAVE_CXX_ATOMIC_STATIC CACHE)
|
||||
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
unset(CMAKE_REQUIRED_LINK_OPTIONS)
|
||||
|
||||
set(CheckCXXAtomic_CODE
|
||||
"
|
||||
#include<cstdint>
|
||||
#include<atomic>
|
||||
int main(void)
|
||||
{
|
||||
std::atomic<std::ptrdiff_t> x(0);
|
||||
std::atomic<std::intmax_t> y(0);
|
||||
return x + y;
|
||||
}
|
||||
")
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
|
||||
|
||||
check_cxx_source_compiles(
|
||||
"${CheckCXXAtomic_CODE}"
|
||||
HAVE_CXX_ATOMIC)
|
||||
|
||||
if(HAVE_CXX_ATOMIC)
|
||||
# CMAKE_REQUIRED_LINK_OPTIONS was introduced in CMake 3.14.
|
||||
if(CMAKE_VERSION VERSION_LESS "3.14")
|
||||
set(CMAKE_REQUIRED_LINK_OPTIONS "-static")
|
||||
else()
|
||||
set(CMAKE_REQUIRED_FLAGS "-std=c++11 -static")
|
||||
endif()
|
||||
check_cxx_source_compiles(
|
||||
"${CheckCXXAtomic_CODE}"
|
||||
HAVE_CXX_ATOMIC_STATIC)
|
||||
endif()
|
||||
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
unset(CMAKE_REQUIRED_LINK_OPTIONS)
|
||||
|
||||
endfunction(CheckCXXAtomic)
|
Loading…
Add table
Add a link
Reference in a new issue