Skip to content

Commit bedc1e5

Browse files
committed
silence C4251 when building shared in msvc
1 parent 6f6ab3f commit bedc1e5

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
4141
target_compile_options(${PROJECT_NAME}
4242
PRIVATE
4343
/W4
44+
PUBLIC
45+
$<$<BOOL:${ORYX_CHRON_BUILD_SHARED_LIBS}>:/wd4251>
4446
)
4547
else()
4648
target_compile_options(${PROJECT_NAME}

src/clock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ auto TzClock::TrySetTimezone(std::string_view name) -> bool {
3939

4040
try {
4141
new_zone = locate_zone(name);
42-
} catch (std::runtime_error &err) {
42+
} catch (std::runtime_error &) {
4343
return false;
4444
}
4545

0 commit comments

Comments
 (0)