mirror of https://github.com/microsoft/vcpkg.git
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 851c1e9..23bd55f 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -288,6 +288,8 @@ target_compile_features(
|
|
PRIVATE cxx_std_11
|
|
)
|
|
|
|
+target_compile_definitions(${target_name} PRIVATE NOMINMAX)
|
|
+
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
|
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
|
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
|
diff --git a/src/snippets/snippet.cpp b/src/snippets/snippet.cpp
|
|
index d9ec4dc..660d375 100644
|
|
--- a/src/snippets/snippet.cpp
|
|
+++ b/src/snippets/snippet.cpp
|
|
@@ -9,6 +9,7 @@
|
|
#include <iostream>
|
|
|
|
#include "../utils/common.hpp"
|
|
+#include "../utils/utils.hpp"
|
|
|
|
namespace cpptrace {
|
|
namespace detail {
|
|
@@ -36,7 +37,7 @@ namespace detail {
|
|
}
|
|
// else load file
|
|
file.seekg(0, std::ios::beg);
|
|
- contents.resize(size);
|
|
+ contents.resize(to<std::size_t>(size));
|
|
if(!file.read(&contents[0], size)) {
|
|
// error ...
|
|
}
|