Skip to content

Commit

Permalink
Fixed warn: mangled name for .. will change in C++17 because the exce…
Browse files Browse the repository at this point in the history
…ption specification is part of a function type
  • Loading branch information
maksimandrianov committed Jun 25, 2018
1 parent bb257b4 commit 8497b01
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -261,6 +261,8 @@ add_compile_options(
)

add_clang_compile_options("-Wshorten-64-to-32")
add_clang_cpp_compile_options("-Wno-noexcept-type")
add_gcc_cpp_compile_options("-Wno-noexcept-type")

add_subdirectory(base)
add_subdirectory(coding)
Expand Down
12 changes: 12 additions & 0 deletions cmake/OmimHelpers.cmake
Expand Up @@ -168,6 +168,18 @@ function(add_gcc_compile_options)
endif()
endfunction()

function(add_clang_cpp_compile_options)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:${ARGV}>")
endif()
endfunction()

function(add_gcc_cpp_compile_options)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:${ARGV}>")
endif()
endfunction()

function(export_directory_flags filename)
get_directory_property(include_directories INCLUDE_DIRECTORIES)
get_directory_property(definitions COMPILE_DEFINITIONS)
Expand Down

0 comments on commit 8497b01

Please sign in to comment.