Skip to content

Commit

Permalink
[build] Fix build with default configuration for GCC <4.7 (#2160)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsantiago0 committed Oct 13, 2021
1 parent fa1c373 commit 15f33d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ endif()

# options
option(CYGWIN_USE_POSIX "Should the POSIX API be used for cygwin. Ignored if the system isn't cygwin." OFF)
option(ENABLE_CXX11 "Should the c++11 parts (srt-live-transmit) be enabled" ON)
if (CMAKE_CXX_COMPILER_ID MATCHES "^GNU$" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
option(ENABLE_CXX11 "Should the c++11 parts (srt-live-transmit) be enabled" OFF)
else()
option(ENABLE_CXX11 "Should the c++11 parts (srt-live-transmit) be enabled" ON)
endif()
option(ENABLE_APPS "Should the Support Applications be Built?" ON)
option(ENABLE_EXPERIMENTAL_BONDING "Should the EXPERIMENTAL bonding functionality be enabled?" OFF)
option(ENABLE_TESTING "Should the Developer Test Applications be Built?" OFF)
Expand Down
2 changes: 1 addition & 1 deletion docs/build/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The `pkg-confg` file (`srt.pc`) will be generated with the `libstdc++` library
as a dependency. This may be required in some cases where you have an application
written in C which therefore won't link against `libstdc++` by default.

**`--enable-c++11`** (default: ON)
**`--enable-c++11`** (default: ON except for GCC<4.7)

Enable compiling in C++11 mode for those parts that may require it.
Parts that don't require it will still be compiled in C++03 mode,
Expand Down

0 comments on commit 15f33d4

Please sign in to comment.