diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-05-11 16:56:21 +0000 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-05-11 16:56:21 +0000 |
commit | a5a4cbdc2c762a155fc9a33b68e7297b2a0a3e73 (patch) | |
tree | 69751abb6788d0662a11660ee6c644f4bc52409a | |
parent | c47657158a0bfddf526e24191c233567ff0b2708 (diff) | |
parent | a5795244b493aa4c12db51fbe316bba738cfe616 (diff) |
Merge branch 'cairomm-1-14' into 'cairomm-1-14'
cairomm/exception.h: Export Cairo::logic_error selectively (cairomm-1-14 branch)
See merge request cairo/cairomm!18
-rw-r--r-- | MSVC_NMake/config-msvc.mak | 3 | ||||
-rw-r--r-- | cairomm/exception.h | 8 | ||||
-rw-r--r-- | examples/meson.build | 8 | ||||
-rw-r--r-- | meson.build | 2 |
4 files changed, 13 insertions, 8 deletions
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak index 65b343a..2b96c39 100644 --- a/MSVC_NMake/config-msvc.mak +++ b/MSVC_NMake/config-msvc.mak @@ -22,8 +22,7 @@ CAIROMM_BASE_CFLAGS = \ /D_CRT_NONSTDC_NO_WARNINGS \ /I.. /I.\cairomm \ /D_USE_MATH_DEFINES \ - /EHsc \ - /wd4251 /wd4275 /wd4530 + /EHsc !if $(VSVER) > 12 CAIROMM_BASE_CFLAGS = $(CAIROMM_BASE_CFLAGS) /utf-8 diff --git a/cairomm/exception.h b/cairomm/exception.h index b60c190..bffabed 100644 --- a/cairomm/exception.h +++ b/cairomm/exception.h @@ -34,14 +34,14 @@ namespace Cairo /** */ -class CAIROMM_API logic_error: public std::logic_error +class logic_error: public std::logic_error { public: - explicit logic_error(ErrorStatus status); - ~logic_error() noexcept override; + CAIROMM_API explicit logic_error(ErrorStatus status); + CAIROMM_API ~logic_error() noexcept override; //virtual const char* what() const noexcept; - ErrorStatus get_status_code() const; + CAIROMM_API ErrorStatus get_status_code() const; private: ErrorStatus m_status; diff --git a/examples/meson.build b/examples/meson.build index adc0e68..bc948b6 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -13,6 +13,12 @@ examples = [ [['text'], 'user-font', ['user-font.cc']], ] +if is_msvc + ex_disabled_warnings = cpp_compiler.get_supported_arguments('/wd4127') +else + ex_disabled_warnings = [] +endif + foreach ex : examples dir = '' foreach dir_part : ex[0] @@ -25,7 +31,7 @@ foreach ex : examples endforeach executable(ex_name, ex_sources, - cpp_args: '-DCAIROMM_DISABLE_DEPRECATED', + cpp_args: [ '-DCAIROMM_DISABLE_DEPRECATED' ] + ex_disabled_warnings, dependencies: cairomm_own_dep, implicit_include_directories: false, gui_app: false, diff --git a/meson.build b/meson.build index 028a09c..b5d58e7 100644 --- a/meson.build +++ b/meson.build @@ -214,7 +214,7 @@ msvc14x_toolset_ver = '' # MSVC: Ignore warnings that aren't really harmful, but make those # that should not be overlooked stand out. if is_msvc - foreach wd : ['/FImsvc_recommended_pragmas.h', '/wd4251', '/wd4267', '/wd4275', '/wd4530', '/utf-8'] + foreach wd : ['/FImsvc_recommended_pragmas.h', '/wd4267', '/wd4800', '/utf-8'] disabled_warning = cpp_compiler.get_supported_arguments(wd) add_project_arguments(disabled_warning, language: 'cpp') endforeach |