Skip to content

Commit

Permalink
Set c++ version 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickhopes committed Mar 1, 2023
1 parent f502ed8 commit 08acdd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ if(NOT ANDROID)
check_include_file(sys/shm.h HAVE_SYS_SHM_H)
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")# need this for check_cxx_source_compiles because CMAKE_CXX_STANDARD doesn't work.
set (CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_FLAGS_BAK "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")# need this for check_cxx_source_compiles because CMAKE_CXX_STANDARD doesn't work.
check_cxx_source_compiles("#include <atomic>
using namespace std;
int main(int argc, char *argv[]) {
Expand All @@ -100,6 +103,7 @@ return 0;
if(NOT HAVE_ATOMIC)
message(FATAL_ERROR "Atomic(C++) libraries have not been found for ORTP.")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK}")

check_function_exists(arc4random HAVE_ARC4RANDOM)
check_symbol_exists(recvmsg "sys/socket.h" HAVE_RECVMSG)
Expand Down
2 changes: 0 additions & 2 deletions tester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ set(SOURCE_FILES_C
rtp_tester.c
)

set (CMAKE_CXX_STANDARD 11)

set(IOS_RESOURCE_FILE)
set(SOURCE_FILES_CXX
fec_tester.cc
Expand Down

0 comments on commit 08acdd1

Please sign in to comment.