0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 01:37:56 +08:00

Merge pull request #4227 from ChrisThrasher/remove_language_extensions

Use standard C and C++
This commit is contained in:
Luca Boccassi 2021-07-01 19:21:20 +01:00 committed by GitHub
commit 5cc6755174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 5 deletions

View File

@ -113,15 +113,15 @@ endif()
if (NOT MSVC)
if(NOT CMAKE_CXX_FLAGS MATCHES "-std=")
# use C++11 by default if supported
check_cxx_compiler_flag("-std=gnu++11" COMPILER_SUPPORTS_CXX11)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
endif()
if(NOT CMAKE_C_FLAGS MATCHES "-std=")
check_c_compiler_flag("-std=gnu11" COMPILER_SUPPORTS_C11)
check_c_compiler_flag("-std=c11" COMPILER_SUPPORTS_C11)
if(COMPILER_SUPPORTS_C11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
endif()

View File

@ -0,0 +1,15 @@
# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL
This is a statement by Chris Thrasher that grants permission to relicense
its copyrights in the libzmq C++ library (ZeroMQ) under the Mozilla Public
License v2 (MPLv2) or any other Open Source Initiative approved license chosen
by the current ZeroMQ BDFL (Benevolent Dictator for Life).
A portion of the commits made by the Github handle "ChrisThrasher", with
commit author "Chris Thrasher <chris.j.thrasher@gmail.com>", are copyright of
Chris Thrasher. This document hereby grants the libzmq project team to
relicense libzmq, including all past, present and future contributions of the
author listed above.
Chris Thrasher
2021/07/01

View File

@ -65,7 +65,7 @@ ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}"
# Checks for programs.
AC_PROG_CC
AX_CHECK_COMPILE_FLAG([-std=gnu11], [CFLAGS+=" -std=gnu11"], [AC_PROG_CC_C99])
AX_CHECK_COMPILE_FLAG([-std=c11], [CFLAGS+=" -std=c11"], [AC_PROG_CC_C99])
AC_PROG_CXX
AX_CODE_COVERAGE
AM_PROG_CC_C_O