summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-11 16:56:59 +0000
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2021-05-11 16:56:59 +0000
commite99a75d28ad26fab80eeb0ac4641ca60704cf087 (patch)
tree176ac77395e35b479c6d9542094ab0c14c88b2de
parent646a6dad2ff5f8b56f44e787b1a8385fe9c1735a (diff)
parent584b0d1374915ea6128db62c6e2df84dce11e227 (diff)
Merge branch 'master' into 'master'
cairomm/exception.h: Export Cairo::logic_error selectively See merge request cairo/cairomm!17
-rw-r--r--MSVC_NMake/config-msvc.mak1
-rw-r--r--cairomm/exception.h13
-rw-r--r--examples/meson.build8
-rw-r--r--meson.build2
4 files changed, 12 insertions, 12 deletions
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 1d14b2e..1ab468c 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -27,7 +27,6 @@ CAIROMM_BASE_CFLAGS = \
/I.. /I.\cairomm \
/D_USE_MATH_DEFINES \
/EHsc /utf-8 \
- /wd4251 /wd4275 /wd4530 \
/std:c++17
CAIROMM_EXTRA_INCLUDES = \
diff --git a/cairomm/exception.h b/cairomm/exception.h
index b60c190..6af99b8 100644
--- a/cairomm/exception.h
+++ b/cairomm/exception.h
@@ -24,24 +24,19 @@
#include <cairomm/enums.h>
#include <stdexcept>
-#if defined(_MSC_VER) && (_MSC_VER < 1900)
-#define _ALLOW_KEYWORD_MACROS 1
-#define noexcept _NOEXCEPT
-#endif
-
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 c3ba43e..c7f12ef 100644
--- a/meson.build
+++ b/meson.build
@@ -221,7 +221,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