Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
09b4a1a3
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
09b4a1a3
编写于
4月 05, 2018
作者:
L
Lei Wang
提交者:
Yi Wang
4月 05, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Build: generate all the build related files into one directory. (#9512)
上级
30061d48
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
68 addition
and
59 deletion
+68
-59
.gitignore
.gitignore
+0
-9
cmake/generic.cmake
cmake/generic.cmake
+3
-3
doc/fluid/CMakeLists.txt
doc/fluid/CMakeLists.txt
+2
-2
doc/fluid/api/CMakeLists.txt
doc/fluid/api/CMakeLists.txt
+1
-1
doc/templates/conf.py.cn.in
doc/templates/conf.py.cn.in
+1
-1
doc/templates/conf.py.en.in
doc/templates/conf.py.en.in
+1
-1
doc/v2/CMakeLists.txt
doc/v2/CMakeLists.txt
+2
-2
doc/v2/api/CMakeLists.txt
doc/v2/api/CMakeLists.txt
+1
-1
paddle/api/CMakeLists.txt
paddle/api/CMakeLists.txt
+6
-5
paddle/api/test/CMakeLists.txt
paddle/api/test/CMakeLists.txt
+5
-0
paddle/fluid/framework/CMakeLists.txt
paddle/fluid/framework/CMakeLists.txt
+2
-2
paddle/fluid/inference/tests/book/CMakeLists.txt
paddle/fluid/inference/tests/book/CMakeLists.txt
+1
-1
paddle/fluid/operators/CMakeLists.txt
paddle/fluid/operators/CMakeLists.txt
+2
-2
paddle/fluid/platform/CMakeLists.txt
paddle/fluid/platform/CMakeLists.txt
+2
-2
paddle/gserver/tests/CMakeLists.txt
paddle/gserver/tests/CMakeLists.txt
+12
-7
paddle/trainer/tests/CMakeLists.txt
paddle/trainer/tests/CMakeLists.txt
+9
-4
paddle/utils/CMakeLists.txt
paddle/utils/CMakeLists.txt
+2
-2
proto/CMakeLists.txt
proto/CMakeLists.txt
+3
-2
python/CMakeLists.txt
python/CMakeLists.txt
+5
-3
python/paddle/fluid/tests/unittests/CMakeLists.txt
python/paddle/fluid/tests/unittests/CMakeLists.txt
+2
-2
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
+4
-4
python/paddle/trainer_config_helpers/tests/configs/generate_protostr.sh
...trainer_config_helpers/tests/configs/generate_protostr.sh
+0
-1
python/setup.py.in
python/setup.py.in
+2
-2
未找到文件。
.gitignore
浏览文件 @
09b4a1a3
...
...
@@ -25,12 +25,3 @@ third_party/
# clion workspace.
cmake-build-*
# generated while compiling
paddle/pybind/pybind.h
CMakeFiles
cmake_install.cmake
paddle/.timestamp
python/paddlepaddle.egg-info/
paddle/fluid/pybind/pybind.h
python/paddle/version.py
cmake/generic.cmake
浏览文件 @
09b4a1a3
...
...
@@ -251,7 +251,7 @@ function(cc_test TARGET_NAME)
add_dependencies
(
${
TARGET_NAME
}
${
cc_test_DEPS
}
paddle_gtest_main paddle_memory gtest gflags glog
)
add_test
(
NAME
${
TARGET_NAME
}
COMMAND
${
TARGET_NAME
}
${
cc_test_ARGS
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_
SOURCE
_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_
BINARY
_DIR
}
)
endif
()
endfunction
(
cc_test
)
...
...
@@ -561,9 +561,9 @@ function(py_test TARGET_NAME)
set
(
multiValueArgs SRCS DEPS ARGS ENVS
)
cmake_parse_arguments
(
py_test
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
add_test
(
NAME
${
TARGET_NAME
}
COMMAND env PYTHONPATH=
${
PADDLE_
PYTHON_BUILD_DIR
}
/lib-
python
${
py_test_ENVS
}
COMMAND env PYTHONPATH=
${
PADDLE_
BINARY_DIR
}
/
python
${
py_test_ENVS
}
${
PYTHON_EXECUTABLE
}
-u
${
py_test_SRCS
}
${
py_test_ARGS
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_
SOURCE
_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_
BINARY
_DIR
}
)
endif
()
endfunction
()
...
...
doc/fluid/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -27,7 +27,7 @@ sphinx_add_target(paddle_fluid_docs
${
CMAKE_CURRENT_SOURCE_DIR
}
${
SPHINX_HTML_DIR_EN
}
)
add_dependencies
(
paddle_fluid_docs gen_proto_py
)
add_dependencies
(
paddle_fluid_docs gen_proto_py
paddle_python
)
# configured documentation tools and intermediate build results
set
(
BINARY_BUILD_DIR_CN
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cn/_build"
)
...
...
@@ -50,6 +50,6 @@ sphinx_add_target(paddle_fluid_docs_cn
${
CMAKE_CURRENT_SOURCE_DIR
}
${
SPHINX_HTML_DIR_CN
}
)
add_dependencies
(
paddle_fluid_docs_cn gen_proto_py
)
add_dependencies
(
paddle_fluid_docs_cn gen_proto_py
paddle_python
)
add_subdirectory
(
api
)
doc/fluid/api/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -19,4 +19,4 @@ sphinx_add_target(paddle_fluid_apis
${
CMAKE_CURRENT_SOURCE_DIR
}
${
SPHINX_HTML_DIR_EN
}
)
add_dependencies
(
paddle_fluid_apis gen_proto_py framework_py_proto copy_paddle_pybind
)
add_dependencies
(
paddle_fluid_apis gen_proto_py framework_py_proto copy_paddle_pybind
paddle_python
)
doc/templates/conf.py.cn.in
浏览文件 @
09b4a1a3
...
...
@@ -13,7 +13,7 @@
# serve to show the default.
import sys
import os, subprocess
sys.path.insert(0, os.path.abspath('@PADDLE_
SOURCE
_DIR@/python'))
sys.path.insert(0, os.path.abspath('@PADDLE_
BINARY
_DIR@/python'))
import shlex
from recommonmark import parser, transform
import paddle
...
...
doc/templates/conf.py.en.in
浏览文件 @
09b4a1a3
...
...
@@ -13,7 +13,7 @@
# serve to show the default.
import sys
import os, subprocess
sys.path.insert(0, os.path.abspath('@PADDLE_
SOURCE
_DIR@/python'))
sys.path.insert(0, os.path.abspath('@PADDLE_
BINARY
_DIR@/python'))
import shlex
from recommonmark import parser, transform
import paddle
...
...
doc/v2/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -27,7 +27,7 @@ sphinx_add_target(paddle_v2_docs
${
CMAKE_CURRENT_SOURCE_DIR
}
${
SPHINX_HTML_DIR_EN
}
)
add_dependencies
(
paddle_v2_docs gen_proto_py
)
add_dependencies
(
paddle_v2_docs gen_proto_py
paddle_python
)
# configured documentation tools and intermediate build results
set
(
BINARY_BUILD_DIR_CN
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cn/_build"
)
...
...
@@ -50,6 +50,6 @@ sphinx_add_target(paddle_v2_docs_cn
${
CMAKE_CURRENT_SOURCE_DIR
}
${
SPHINX_HTML_DIR_CN
}
)
add_dependencies
(
paddle_v2_docs_cn gen_proto_py
)
add_dependencies
(
paddle_v2_docs_cn gen_proto_py
paddle_python
)
add_subdirectory
(
api
)
doc/v2/api/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -19,4 +19,4 @@ sphinx_add_target(paddle_v2_apis
${
CMAKE_CURRENT_SOURCE_DIR
}
${
SPHINX_HTML_DIR_EN
}
)
add_dependencies
(
paddle_v2_apis gen_proto_py framework_py_proto copy_paddle_pybind
)
add_dependencies
(
paddle_v2_apis gen_proto_py framework_py_proto copy_paddle_pybind
paddle_python
)
paddle/api/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -89,16 +89,17 @@ SWIG_LINK_LIBRARIES(swig_paddle
${
START_END
}
)
add_custom_command
(
OUTPUT
${
PADDLE_SOURCE_DIR
}
/paddle/py_paddle/_swig_paddle.so
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/swig_paddle.py
${
PADDLE_SOURCE_DIR
}
/paddle/py_paddle
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/_swig_paddle.so
${
PADDLE_SOURCE_DIR
}
/paddle/py_paddle
COMMAND
${
CMAKE_COMMAND
}
-E touch .timestamp
add_custom_command
(
OUTPUT
${
PADDLE_BINARY_DIR
}
/python/py_paddle/_swig_paddle.so
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_BINARY_DIR
}
/python/py_paddle
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/swig_paddle.py
${
PADDLE_BINARY_DIR
}
/python/py_paddle
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/_swig_paddle.so
${
PADDLE_BINARY_DIR
}
/python/py_paddle
COMMAND
${
CMAKE_COMMAND
}
-E touch
${
PADDLE_BINARY_DIR
}
/.timestamp
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
DEPENDS _swig_paddle
)
# TODO(yuyang18) : make wheel name calculated by cmake
add_custom_target
(
python_api_wheel ALL DEPENDS
${
PADDLE_
SOURCE_DIR
}
/paddle
/py_paddle/_swig_paddle.so
)
add_custom_target
(
python_api_wheel ALL DEPENDS
${
PADDLE_
BINARY_DIR
}
/python
/py_paddle/_swig_paddle.so
)
if
(
WITH_TESTING
)
IF
(
NOT PY_PIP_FOUND
)
...
...
paddle/api/test/CMakeLists.txt
浏览文件 @
09b4a1a3
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/testTrain.py
COMMAND cp -r
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.py
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_custom_target
(
copy_api_test ALL DEPENDS testTrain.py
)
py_test
(
testTrain SRCS testTrain.py
)
py_test
(
testMatrix SRCS testMatrix.py
)
py_test
(
testVector SRCS testVector.py
)
...
...
paddle/fluid/framework/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -74,8 +74,8 @@ py_proto_compile(framework_py_proto SRCS framework.proto)
add_custom_target
(
framework_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_dependencies
(
framework_py_proto framework_py_proto_init
)
add_custom_command
(
TARGET framework_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/proto
COMMAND cp *.py
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/proto/
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/proto
COMMAND cp *.py
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/proto/
COMMENT
"Copy generated python proto into directory paddle/fluid/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
...
...
paddle/fluid/inference/tests/book/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -4,7 +4,7 @@ function(inference_test TARGET_NAME)
set
(
multiValueArgs ARGS
)
cmake_parse_arguments
(
inference_test
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
set
(
PYTHON_TESTS_DIR
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/tests
)
set
(
PYTHON_TESTS_DIR
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/tests
)
set
(
arg_list
""
)
if
(
inference_test_ARGS
)
foreach
(
arg
${
inference_test_ARGS
}
)
...
...
paddle/fluid/operators/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -3,8 +3,8 @@ string(REPLACE "_mkldnn" "" GENERAL_OPS "${GENERAL_OPS}")
string
(
REPLACE
".cc"
""
GENERAL_OPS
"
${
GENERAL_OPS
}
"
)
list
(
REMOVE_DUPLICATES GENERAL_OPS
)
set
(
DEPS_OPS
""
)
set
(
pybind_file
${
PADDLE_
SOURCE
_DIR
}
/paddle/fluid/pybind/pybind.h
)
file
(
WRITE
${
pybind_file
}
"// Generated by the paddle/operator/CMakeLists.txt. DO NOT EDIT!
\n\n
"
)
set
(
pybind_file
${
PADDLE_
BINARY
_DIR
}
/paddle/fluid/pybind/pybind.h
)
file
(
WRITE
${
pybind_file
}
"// Generated by the paddle/
fluid/
operator/CMakeLists.txt. DO NOT EDIT!
\n\n
"
)
function
(
op_library TARGET
)
# op_library is a function to create op library. The interface is same as
# cc_library. But it handle split GPU/CPU code and link some common library
...
...
paddle/fluid/platform/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -6,8 +6,8 @@ add_custom_target(profiler_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E touch _
add_dependencies
(
profiler_py_proto profiler_py_proto_init
)
add_custom_command
(
TARGET profiler_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/proto/profiler
COMMAND cp *.py
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/proto/profiler
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/proto/profiler
COMMAND cp *.py
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/proto/profiler
COMMENT
"Copy generated python proto into directory paddle/fluid/proto/profiler."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
...
...
paddle/gserver/tests/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -14,6 +14,11 @@ function(gserver_test TARGET)
COMMAND
${
TARGET
}
)
endfunction
()
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/concat_dotmul_a.conf
COMMAND cp -r
${
CMAKE_CURRENT_SOURCE_DIR
}
/*
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_custom_target
(
copy_gserver_conf ALL DEPENDS concat_dotmul_a.conf
)
gserver_test
(
test_LayerGrad
)
gserver_test
(
test_CRFLayerGrad
)
gserver_test
(
test_CrossEntropyOverBeamGrad
)
...
...
@@ -31,12 +36,12 @@ gserver_test(test_Upsample)
set
(
PYTHON_PATH
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_
SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE
_DIR
}
/paddle/gserver/tests
)
${
PADDLE_
BINARY_DIR
}
/python/:
${
PADDLE_BINARY
_DIR
}
/paddle/gserver/tests
)
function
(
gserver_test_with_python TARGET
)
add_unittest_without_exec
(
${
TARGET
}
${
TARGET
}
.cpp
)
add_test
(
NAME
${
TARGET
}
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
TARGET
}
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle/
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle/
)
endfunction
()
gserver_test_with_python
(
test_PyDataProvider2
)
...
...
@@ -57,7 +62,7 @@ if(WITH_MKLDNN)
LayerGradUtil.cpp
)
add_test
(
NAME test_MKLDNN
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/test_MKLDNN
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle
)
endif
()
############### test_WarpCTCLayer #######################
...
...
@@ -66,7 +71,7 @@ if(NOT WITH_DOUBLE AND NOT MOBILE_INFERENCE)
test_WarpCTCLayer.cpp
)
add_test
(
NAME test_WarpCTCLayer
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/test_WarpCTCLayer --warpctc_dir=
${
WARPCTC_LIB_DIR
}
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle
)
endif
()
if
(
NOT MOBILE_INFERENCE
)
...
...
@@ -84,15 +89,15 @@ if(NOT MOBILE_INFERENCE)
endif
()
add_test
(
NAME test_NetworkCompare
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=
${
use_gpu
}
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle
)
############ test_CompareSparse ################
add_unittest_without_exec
(
test_CompareSparse
test_CompareSparse.cpp
)
if
(
NOT ON_TRAVIS
)
add_test
(
NAME test_CompareSparse
COMMAND
${
PYTHON_PATH
}
.
/.set_port.sh -p port -n 6
COMMAND
${
PYTHON_PATH
}
${
PADDLE_SOURCE_DIR
}
/paddle
/.set_port.sh -p port -n 6
${
CMAKE_CURRENT_BINARY_DIR
}
/test_CompareSparse
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle/
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle/
)
endif
()
endif
()
paddle/trainer/tests/CMakeLists.txt
浏览文件 @
09b4a1a3
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/sample_trainer_config.conf
COMMAND cp -r
${
CMAKE_CURRENT_SOURCE_DIR
}
/*
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_custom_target
(
copy_trainer_conf ALL DEPENDS sample_trainer_config.conf
)
set
(
PYTHON_PATH
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_
SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE
_DIR
}
/paddle/trainer/tests
)
${
PADDLE_
BINARY_DIR
}
/python/:
${
PADDLE_BINARY
_DIR
}
/paddle/trainer/tests
)
function
(
trainer_test TARGET
)
add_unittest_without_exec
(
${
TARGET
}
${
TARGET
}
.cpp
)
add_test
(
NAME
${
TARGET
}
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
TARGET
}
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle/
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle/
)
endfunction
()
trainer_test
(
test_Compare
)
...
...
@@ -22,11 +27,11 @@ if(WITH_PYTHON)
add_test
(
NAME test_TrainerOnePass
COMMAND
${
PYTHON_PATH
}
${
PADDLE_SOURCE_DIR
}
/paddle/.set_port.sh -p port
${
CMAKE_CURRENT_BINARY_DIR
}
/test_TrainerOnePass
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle/
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle/
)
endif
()
#################### test_config_parser #########################
add_test
(
NAME test_config_parser
COMMAND
${
PYTHON_PATH
}
${
PYTHON_EXECUTABLE
}
${
PADDLE_SOURCE_DIR
}
/paddle/trainer/tests/config_parser_test.py
WORKING_DIRECTORY
${
PADDLE_
SOURCE
_DIR
}
/paddle/
)
WORKING_DIRECTORY
${
PADDLE_
BINARY
_DIR
}
/paddle/
)
paddle/utils/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -2,8 +2,8 @@
file
(
GLOB UTIL_HEADERS . *.h
)
file
(
GLOB UTIL_SOURCES . *.cpp
)
create_resources
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/enable_virtualenv.py
${
CMAKE_CURRENT_
SOURCE
_DIR
}
/enable_virtualenv.c
)
set
(
UTIL_RES
${
CMAKE_CURRENT_
SOURCE
_DIR
}
/enable_virtualenv.c
)
${
CMAKE_CURRENT_
BINARY
_DIR
}
/enable_virtualenv.c
)
set
(
UTIL_RES
${
CMAKE_CURRENT_
BINARY
_DIR
}
/enable_virtualenv.c
)
if
(
APPLE
)
file
(
GLOB UTIL_ARCH_SOURCES . arch/osx/*.cpp
)
...
...
proto/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -15,13 +15,14 @@ foreach(filename ${proto_filenames})
get_filename_component
(
ABS_FIL
${
filename
}
ABSOLUTE
)
get_filename_component
(
FIL_WE
${
filename
}
NAME_WE
)
set
(
CUR_PROTO_GEN_PY
${
PADDLE_
SOURCE
_DIR
}
/paddle/python/paddle/proto/
${
FIL_WE
}
_pb2.py
)
${
PADDLE_
BINARY
_DIR
}
/paddle/python/paddle/proto/
${
FIL_WE
}
_pb2.py
)
set
(
PROTO_GEN_PY
${
CUR_PROTO_GEN_PY
}
${
PROTO_GEN_PY
}
)
add_custom_command
(
OUTPUT
${
CUR_PROTO_GEN_PY
}
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_BINARY_DIR
}
/python/paddle/proto
COMMAND
${
PROTOBUF_PROTOC_EXECUTABLE
}
ARGS
"--python_out=
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/proto"
ARGS
"--python_out=
${
PADDLE_
BINARY
_DIR
}
/python/paddle/proto"
"-I"
${
CMAKE_CURRENT_SOURCE_DIR
}
${
ABS_FIL
}
DEPENDS
${
ABS_FIL
}
protoc
)
endforeach
()
...
...
python/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -47,14 +47,16 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
${
CMAKE_CURRENT_BINARY_DIR
}
/setup.py
)
add_custom_command
(
OUTPUT
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/core.so
COMMAND cmake -E copy $<TARGET_FILE:paddle_pybind>
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/core.so
add_custom_command
(
OUTPUT
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/core.so
COMMAND cmake -E copy $<TARGET_FILE:paddle_pybind>
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/core.so
DEPENDS paddle_pybind
)
add_custom_target
(
copy_paddle_pybind ALL DEPENDS
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/fluid/core.so
)
add_custom_target
(
copy_paddle_pybind ALL DEPENDS
${
PADDLE_
BINARY
_DIR
}
/python/paddle/fluid/core.so
)
add_custom_command
(
OUTPUT
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
COMMAND touch stub.cc
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
PADDLE_SOURCE_DIR
}
/python/paddle
${
PADDLE_BINARY_DIR
}
/python/paddle
COMMAND cp -r
${
PADDLE_SOURCE_DIR
}
/paddle/py_paddle
${
PADDLE_BINARY_DIR
}
/python/
COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py bdist_wheel
COMMAND
${
CMAKE_COMMAND
}
-E touch
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
...
...
python/paddle/fluid/tests/unittests/CMakeLists.txt
浏览文件 @
09b4a1a3
...
...
@@ -22,9 +22,9 @@ function(py_test_modules TARGET_NAME)
set
(
multiValueArgs MODULES DEPS ARGS ENVS
)
cmake_parse_arguments
(
py_test_modules
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
add_test
(
NAME
${
TARGET_NAME
}
COMMAND env PYTHONPATH=
${
PADDLE_
PYTHON_BUILD_DIR
}
/lib-
python
${
py_test_modules_ENVS
}
COMMAND env PYTHONPATH=
${
PADDLE_
BINARY_DIR
}
/
python
${
py_test_modules_ENVS
}
${
PYTHON_EXECUTABLE
}
-u -m unittest --verbose
${
py_test_modules_MODULES
}
${
py_test_modules_ARGS
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_
SOURCE
_DIR
}
)
WORKING_DIRECTORY
${
CMAKE_CURRENT_
BINARY
_DIR
}
)
endif
()
endfunction
()
...
...
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
浏览文件 @
09b4a1a3
#################### test_config_parser #########################
add_test
(
NAME layers_test
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_
SOURCE
_DIR
}
/python/
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_
BINARY
_DIR
}
/python/
${
PYTHON_EXECUTABLE
}
${
PADDLE_SOURCE_DIR
}
/python/paddle/trainer_config_helpers/tests/layers_test.py
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/python/paddle
)
add_test
(
NAME test_reset_hook
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_
SOURCE
_DIR
}
/python/
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_
BINARY
_DIR
}
/python/
${
PYTHON_EXECUTABLE
}
${
PADDLE_SOURCE_DIR
}
/python/paddle/trainer_config_helpers/tests/test_reset_hook.py
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/python/paddle
)
add_paddle_exe
(
protobuf_equal ProtobufEqualMain.cpp
)
add_test
(
NAME test_layerHelpers
COMMAND
${
PADDLE_
SOURCE
_DIR
}
/python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
${
PYTHON_EXECUTABLE
}
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_BINARY_DIR
}
/python/
${
PADDLE_
BINARY
_DIR
}
/python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_BINARY_DIR
}
/protobuf_equal
)
python/paddle/trainer_config_helpers/tests/configs/generate_protostr.sh
浏览文件 @
09b4a1a3
...
...
@@ -2,7 +2,6 @@
set
-e
cd
`
dirname
$0
`
export
PYTHONPATH
=
$PWD
/../../../../
protostr
=
$PWD
/protostr
.
file_list.sh
...
...
python/setup.py.in
浏览文件 @
09b4a1a3
...
...
@@ -58,7 +58,7 @@ def mkl():
'istaged': ISTAGED,
'with_mkl': '@WITH_MKL@'})
write_version_py(filename='@PADDLE_
SOURCE
_DIR@/python/paddle/version.py')
write_version_py(filename='@PADDLE_
BINARY
_DIR@/python/paddle/version.py')
packages=['paddle',
...
...
@@ -109,7 +109,7 @@ package_dir={
'paddle.fluid.proto': '${PADDLE_BINARY_DIR}/paddle/fluid/framework',
}
if '${WITH_FLUID_ONLY}'== 'OFF':
package_dir['py_paddle']='${PADDLE_
SOURCE_DIR}/paddle
/py_paddle'
package_dir['py_paddle']='${PADDLE_
BINARY_DIR}/python
/py_paddle'
paddle_rt_lib_dir = 'lib'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录