diff options
Diffstat (limited to 'apps/http-proxy/CMakeLists.txt')
-rw-r--r-- | apps/http-proxy/CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/http-proxy/CMakeLists.txt b/apps/http-proxy/CMakeLists.txt index 5901c31f7..e7bcb551a 100644 --- a/apps/http-proxy/CMakeLists.txt +++ b/apps/http-proxy/CMakeLists.txt @@ -14,7 +14,17 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c99-designator") +# -Wno-c99-designator issue +# +# Unsure about version for which this was introduced +# clang version 9.0.8 (no flag), 11.0.5 (ndk22, flag) +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + EXECUTE_PROCESS( COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string ) + string (REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string}) + if (CLANG_VERSION_STRING VERSION_GREATER 11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c99-designator") + endif() +endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} |