diff --git a/3party/agg/CMakeLists.txt b/3party/agg/CMakeLists.txt index 1d21209693..5c506574b9 100644 --- a/3party/agg/CMakeLists.txt +++ b/3party/agg/CMakeLists.txt @@ -1,6 +1,7 @@ project(agg) add_clang_compile_options("-Wno-deprecated-declarations") +add_gcc_compile_options("-Wno-deprecated-declarations") set(CMAKE_PREFIX_PATH ./) diff --git a/3party/freetype/CMakeLists.txt b/3party/freetype/CMakeLists.txt index bc4005c2b9..d3ab9c9a70 100644 --- a/3party/freetype/CMakeLists.txt +++ b/3party/freetype/CMakeLists.txt @@ -9,6 +9,8 @@ endif () add_compile_options("-Wall") add_clang_compile_options("-Wno-unused-function") +add_gcc_compile_options("-Wno-pointer-to-int-cast") +add_gcc_compile_options("-Wno-unused-function") include_directories(include) diff --git a/3party/icu/CMakeLists.txt b/3party/icu/CMakeLists.txt index 7c1ffbc423..fb1ec350bb 100644 --- a/3party/icu/CMakeLists.txt +++ b/3party/icu/CMakeLists.txt @@ -11,6 +11,7 @@ add_definitions( ) add_clang_compile_options("-Wno-deprecated-declarations") +add_gcc_compile_options("-Wno-deprecated-declarations") set(CMAKE_PREFIX_PATH ./) diff --git a/3party/minizip/CMakeLists.txt b/3party/minizip/CMakeLists.txt index 728f1f5a55..8e41eafbaa 100644 --- a/3party/minizip/CMakeLists.txt +++ b/3party/minizip/CMakeLists.txt @@ -3,6 +3,7 @@ project(minizip) add_definitions(-DUSE_FILE32API -DNOCRYPT) add_clang_compile_options("-Wno-unused-value") +add_gcc_compile_options("-Wno-unused-value") set( SRC diff --git a/3party/opening_hours/CMakeLists.txt b/3party/opening_hours/CMakeLists.txt index 752184c616..616d9fc769 100644 --- a/3party/opening_hours/CMakeLists.txt +++ b/3party/opening_hours/CMakeLists.txt @@ -12,6 +12,8 @@ add_compile_options( ) add_clang_compile_options("-Wno-unused-local-typedef") +add_gcc_compile_options("-Wno-unused-local-typedef") +add_gcc_compile_options("-Wno-return-type") set( SRC diff --git a/3party/succinct/CMakeLists.txt b/3party/succinct/CMakeLists.txt index 030f2f055b..ad3d1e2ae0 100644 --- a/3party/succinct/CMakeLists.txt +++ b/3party/succinct/CMakeLists.txt @@ -5,6 +5,7 @@ add_definitions(-DLTC_NO_ROLC) include_directories(src/headers) add_clang_compile_options("-Wno-unused-local-typedef") +add_gcc_compile_options("-Wno-unused-local-typedef") set( SRC diff --git a/cmake/OmimHelpers.cmake b/cmake/OmimHelpers.cmake index 340de3905a..4fb6e4e4b4 100644 --- a/cmake/OmimHelpers.cmake +++ b/cmake/OmimHelpers.cmake @@ -162,6 +162,12 @@ function(add_clang_compile_options) endif() endfunction() +function(add_gcc_compile_options) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + add_compile_options(${ARGV}) + endif() +endfunction() + function(export_directory_flags filename) get_directory_property(include_directories INCLUDE_DIRECTORIES) get_directory_property(definitions COMPILE_DEFINITIONS)