Skip to content

Commit 849485e

Browse files
Merge pull request #116 from chen-honggang/dev/uri-exception
fixed macos compile error
2 parents 7d76677 + ce8fc53 commit 849485e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ if (${OS_TYPE} STREQUAL "WINDOWS")
3838
#需要加该参数,不然VS会报错
3939
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
4040
else()
41-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wextra")
4241
set(POCO_LINK_DIR ${CMAKE_SOURCE_DIR}/third_party/lib/linux/poco/)
4342
if (${OS_TYPE} STREQUAL "APPLE")
4443
set(POCO_LINK_DIR ${CMAKE_SOURCE_DIR}/third_party/lib/macOS/poco/)
44+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
45+
else()
46+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wextra")
4547
endif()
4648
set(POCO_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/include/)
4749
set(POCO_LIBS PocoNetSSL PocoNet PocoCrypto PocoUtil PocoJSON PocoFoundation PocoXML)

include/request/object_req.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ class GetObjectByFileReq : public GetObjectReq {
176176
#endif
177177

178178
private:
179+
#if defined(_WIN32)
179180
bool mb_is_widechar_path;
181+
#endif
180182
std::string m_local_file_path;
181183
};
182184

0 commit comments

Comments
 (0)