summaryrefslogtreecommitdiff
path: root/libunwind/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libunwind/src/CMakeLists.txt')
-rw-r--r--libunwind/src/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index df32e53d69e6..cced6b4cf9e8 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -135,8 +135,11 @@ set_property(SOURCE ${LIBUNWIND_C_SOURCES}
# ease, but does not rely on C++ at runtime.
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
+include(WarningFlags)
+
# Build the shared library.
add_library(unwind_shared_objects OBJECT EXCLUDE_FROM_ALL ${LIBUNWIND_SOURCES} ${LIBUNWIND_HEADERS})
+cxx_add_warning_flags(unwind_shared_objects ${LIBUNWIND_ENABLE_WERROR} ${LIBUNWIND_ENABLE_PEDANTIC})
if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
target_compile_options(unwind_shared_objects PRIVATE /GR-)
else()
@@ -174,6 +177,7 @@ endif()
# Build the static library.
add_library(unwind_static_objects OBJECT EXCLUDE_FROM_ALL ${LIBUNWIND_SOURCES} ${LIBUNWIND_HEADERS})
+cxx_add_warning_flags(unwind_static_objects ${LIBUNWIND_ENABLE_WERROR} ${LIBUNWIND_ENABLE_PEDANTIC})
if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
target_compile_options(unwind_static_objects PRIVATE /GR-)
else()