From d27f7107e1090088eaf1cc79865c436037e4a7d1 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 3 May 2017 00:05:30 +0800 Subject: [PATCH] fix bug in clang++ --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10840fae..5d059900 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,8 +76,12 @@ add_definitions(-DENABLE_RTMP2RTSP -DENABLE_RTSP2RTMP -DENABLE_HLS) #引用头文件路径 include_directories(${PROJECT_SOURCE_DIR}/src) + #使能c++11 -add_compile_options(-std=c++11) +if(CMAKE_COMPILER_IS_GNUCXX) + add_compile_options(-std=c++11) +endif(CMAKE_COMPILER_IS_GNUCXX) + #关闭过期接口警告 add_compile_options(-Wno-deprecated-declarations) #关闭__FUNCTION__宏在函数外警告