提交 dbd0075b 编写于 作者: D dzhwinter

Merge branch 'windows/support' into lb

......@@ -309,7 +309,7 @@ function(cc_test TARGET_NAME)
if(WIN32)
target_link_libraries(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main lod_tensor memory gtest gflags glog shlwapi openblas)
else(WIN32)
target_link_libraries(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main lod_tensor memory gtest gflags glog openblas)
target_link_libraries(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main lod_tensor memory gtest gflags glog)
endif(WIN32)
add_dependencies(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main lod_tensor memory gtest gflags glog)
add_test(NAME ${TARGET_NAME}
......
......@@ -51,11 +51,18 @@ function(copy TARGET)
COMMAND ${CMAKE_COMMAND} -E copy "${src_file}" "${dst}"
COMMENT "copying ${src_file} -> ${dst}")
endforeach()
else() # not windows
add_custom_command(TARGET ${TARGET} PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${dst}"
COMMAND ${CMAKE_COMMAND} -E copy "${src_files}" "${dst}"
else(WIN32) # not windows
add_custom_command(TARGET ${TARGET} PRE_BUILD
COMMAND mkdir -p "${dst}"
COMMAND cp -r "${src}" "${dst}"
COMMENT "copying ${src} -> ${dst}")
#add_custom_command(TARGET ${TARGET} PRE_BUILD
# COMMAND ${CMAKE_COMMAND} -E make_directory "${dst}")
#message("mkdir " ${TARGET})
#add_custom_command(TARGET ${TARGET} PRE_BUILD
# COMMAND ${CMAKE_COMMAND} -E make_directory "${dst}"
# COMMAND ${CMAKE_COMMAND} -E copy_directory "${src_files}" "${dst}"
# COMMENT "copying ${src} -> ${dst}")
endif(WIN32)
endforeach()
endfunction()
......
......@@ -17,8 +17,9 @@ limitations under the License. */
namespace paddle {
namespace framework {
namespace ir {
// msvc15 don't support constexpr in correct way.
#if !defined(_WIN32)
constexpr char Node::kControlDepVarName[] = "__control_var";
constexpr char Node::kControlDepVarName[];
#else
const char Node::kControlDepVarName[] = "__control_var";
#endif
......
......@@ -49,7 +49,7 @@ class SaveCombineOp : public framework::OperatorBase {
}
MkDirRecursively(DirName(filename).c_str());
std::ofstream fout(filename);
std::ofstream fout(filename, std::ios_base::out | std::ios_base::binary);
PADDLE_ENFORCE(static_cast<bool>(fout), "Cannot open %s to write",
filename);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册