File tree 4 files changed +15
-0
lines changed
4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ jobs:
103
103
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
104
104
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
105
105
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
106
+ -DADM_DISABLE_MSVC_EXCEPTION_DLL_BOUNDARY_WARNINGS=ON
106
107
107
108
- name : ' print ccache stats'
108
109
run : ccache -s
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ option(ADM_HIDE_INTERNAL_SYMBOLS "Hide symbols by default" TRUE)
36
36
option (ADM_UNIT_TESTS "Build units tests" ${IS_ROOT_PROJECT} )
37
37
option (ADM_EXAMPLES "Build examples" ${IS_ROOT_PROJECT} )
38
38
option (ADM_PACKAGE_AND_INSTALL "Package and install libadm" ${IS_ROOT_PROJECT} )
39
+ option (ADM_DISABLE_MSVC_EXCEPTION_DLL_BOUNDARY_WARNINGS "Disable warnings C4275 and C4251 for exceptions derived
40
+ from std::exception in errors.hpp" OFF )
39
41
include (GNUInstallDirs)
40
42
set (ADM_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries" )
41
43
set (ADM_INSTALL_BIN_DIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Installation directory for binaries" )
Original file line number Diff line number Diff line change 7
7
#include < adm/elements/audio_track_format_id.hpp>
8
8
#include " adm/export.h"
9
9
10
+ #ifdef ADM_DISABLE_MSVC_EXCEPTION_DLL_BOUNDARY_WARNINGS
11
+ #pragma warning(disable : 4275 4251)
12
+ #endif
13
+
10
14
namespace adm {
11
15
namespace error {
12
16
@@ -103,3 +107,7 @@ namespace adm {
103
107
104
108
} // namespace error
105
109
} // namespace adm
110
+
111
+ #ifdef ADM_DISABLE_MSVC_EXCEPTION_DLL_BOUNDARY_WARNINGS
112
+ #pragma warning(default : 4275 4251)
113
+ #endif
Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ target_include_directories(adm
84
84
target_link_libraries (adm PUBLIC Boost::boost)
85
85
target_link_libraries (adm PRIVATE $<BUILD_INTERFACE:rapidxml>)
86
86
87
+ if (ADM_DISABLE_MSVC_EXCEPTION_DLL_BOUNDARY_WARNINGS)
88
+ target_compile_options (adm PUBLIC $<$<CXX_COMPILER_ID:MSVC >:/DADM_DISABLE_MSVC_EXCEPTION_DLL_BOUNDARY_WARNINGS=1>)
89
+ endif ()
90
+
87
91
if (UNIX )
88
92
target_link_libraries (adm PUBLIC dl)
89
93
endif ()
You can’t perform that action at this time.
0 commit comments