diff options
Diffstat (limited to 'apps/http-proxy/CMakeLists.txt')
-rw-r--r-- | apps/http-proxy/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/http-proxy/CMakeLists.txt b/apps/http-proxy/CMakeLists.txt index d2d02d0dc..8c2043c30 100644 --- a/apps/http-proxy/CMakeLists.txt +++ b/apps/http-proxy/CMakeLists.txt @@ -14,6 +14,18 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) set(CMAKE_CXX_STANDARD 14) +# -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_EQUAL 11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c99-designator") + endif() +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/" |