Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
ec7f1e99
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ec7f1e99
编写于
5月 25, 2018
作者:
T
Tao Luo
提交者:
GitHub
5月 25, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10907 from reyoung/feature/remove_cpplint_while_compile
Remove cpplint in cmake
上级
bab11969
a229734c
变更
18
显示空白变更内容
内联
并排
Showing
18 changed file
with
3 addition
and
122 deletion
+3
-122
CMakeLists.txt
CMakeLists.txt
+0
-2
cmake/cpplint.cmake
cmake/cpplint.cmake
+0
-62
cmake/generic.cmake
cmake/generic.cmake
+0
-4
go/pserver/client/c/test/CMakeLists.txt
go/pserver/client/c/test/CMakeLists.txt
+0
-1
paddle/capi/CMakeLists.txt
paddle/capi/CMakeLists.txt
+0
-3
paddle/cuda/CMakeLists.txt
paddle/cuda/CMakeLists.txt
+0
-5
paddle/function/CMakeLists.txt
paddle/function/CMakeLists.txt
+0
-6
paddle/gserver/CMakeLists.txt
paddle/gserver/CMakeLists.txt
+0
-2
paddle/math/CMakeLists.txt
paddle/math/CMakeLists.txt
+0
-4
paddle/parameter/CMakeLists.txt
paddle/parameter/CMakeLists.txt
+0
-2
paddle/pserver/CMakeLists.txt
paddle/pserver/CMakeLists.txt
+0
-6
paddle/scripts/docker/build.sh
paddle/scripts/docker/build.sh
+1
-4
paddle/scripts/docker/build_android.sh
paddle/scripts/docker/build_android.sh
+0
-3
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+1
-8
paddle/scripts/travis/build_doc.sh
paddle/scripts/travis/build_doc.sh
+1
-1
paddle/scripts/travis/build_ios.sh
paddle/scripts/travis/build_ios.sh
+0
-1
paddle/trainer/CMakeLists.txt
paddle/trainer/CMakeLists.txt
+0
-5
paddle/utils/CMakeLists.txt
paddle/utils/CMakeLists.txt
+0
-3
未找到文件。
CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -41,7 +41,6 @@ option(WITH_MKL "Compile PaddlePaddle with MKL support." ${AVX_FO
option
(
WITH_DSO
"Compile PaddlePaddle with dynamic linked CUDA"
ON
)
option
(
WITH_TESTING
"Compile PaddlePaddle with unit testing"
OFF
)
option
(
WITH_SWIG_PY
"Compile PaddlePaddle with inference api"
ON
)
option
(
WITH_STYLE_CHECK
"Compile PaddlePaddle with style check"
ON
)
option
(
WITH_PYTHON
"Compile PaddlePaddle with python interpreter"
ON
)
option
(
WITH_DOUBLE
"Compile PaddlePaddle with double precision"
OFF
)
option
(
WITH_RDMA
"Compile PaddlePaddle with RDMA support"
OFF
)
...
...
@@ -155,7 +154,6 @@ include(cupti)
include
(
configure
)
# add paddle env configuration
include
(
generic
)
# simplify cmake module
include
(
package
)
# set paddle packages
include
(
cpplint
)
# set paddle c++ style
include
(
ccache
)
# set ccache for compilation
include
(
util
)
# set unittest and link libs
include
(
rdma
)
# set rdma libraries
...
...
cmake/cpplint.cmake
已删除
100644 → 0
浏览文件 @
bab11969
# util to check C++ file style
# * it basically use google cpplint.py.
# * It provide "add_style_check_target" for cmake.
# Usage see add_style_check_target's document
#
# TODO(yuyang18): Add python style check.
set
(
STYLE_FILTER
)
# diable unwanted filters
# paddle do not indent public/potected/private in class
set
(
STYLE_FILTER
"
${
STYLE_FILTER
}
-whitespace/indent,"
)
# paddle use mutable reference. BUT IT IS NOT RECOMMANDED
set
(
STYLE_FILTER
"
${
STYLE_FILTER
}
-runtime/references,"
)
# paddle use relative path for include.
set
(
STYLE_FILTER
"
${
STYLE_FILTER
}
-build/include,"
)
# paddle use <thread>, <mutex>, etc.
set
(
STYLE_FILTER
"
${
STYLE_FILTER
}
-build/c++11,"
)
# paddle use c style casting. BUT IT IS NOT RECOMMANDED
set
(
STYLE_FILTER
"
${
STYLE_FILTER
}
-readability/casting"
)
# IGNORE SOME FILES
set
(
IGNORE_PATTERN
.*ImportanceSampler.*
.*cblas\\.h.*
.*\\.pb\\.txt
.*MultiDataProvider.*
.*pb.*
.*pybind.h
)
# add_style_check_target
#
# attach check code style step for target.
#
# first argument: target name to attach
# rest arguments: source list to check code style.
#
# NOTE: If WITH_STYLE_CHECK is OFF, then this macro just do nothing.
macro
(
add_style_check_target TARGET_NAME
)
if
(
WITH_STYLE_CHECK
)
set
(
SOURCES_LIST
${
ARGN
}
)
list
(
REMOVE_DUPLICATES SOURCES_LIST
)
foreach
(
filename
${
SOURCES_LIST
}
)
foreach
(
pattern
${
IGNORE_PATTERN
}
)
if
(
filename MATCHES
${
pattern
}
)
list
(
REMOVE_ITEM SOURCES_LIST
${
filename
}
)
endif
()
endforeach
()
endforeach
()
if
(
SOURCES_LIST
)
add_custom_command
(
TARGET
${
TARGET_NAME
}
POST_BUILD
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"
${
PADDLE_SOURCE_DIR
}
/paddle/scripts/cpplint.py"
"--filter=
${
STYLE_FILTER
}
"
${
SOURCES_LIST
}
COMMENT
"cpplint: Checking source code style"
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
endif
()
endif
()
endmacro
()
cmake/generic.cmake
浏览文件 @
ec7f1e99
...
...
@@ -206,8 +206,6 @@ function(cc_library TARGET_NAME)
list
(
APPEND cc_library_HEADERS
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
source
}
.h
)
endif
()
endforeach
()
add_style_check_target
(
${
TARGET_NAME
}
${
cc_library_SRCS
}
${
cc_library_HEADERS
}
)
else
(
cc_library_SRCS
)
if
(
cc_library_DEPS
)
merge_static_libs
(
${
TARGET_NAME
}
${
cc_library_DEPS
}
)
...
...
@@ -271,7 +269,6 @@ function(nv_library TARGET_NAME)
list
(
APPEND nv_library_HEADERS
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
source
}
.h
)
endif
()
endforeach
()
add_style_check_target
(
${
TARGET_NAME
}
${
nv_library_SRCS
}
${
nv_library_HEADERS
}
)
else
(
nv_library_SRCS
)
if
(
nv_library_DEPS
)
merge_static_libs
(
${
TARGET_NAME
}
${
nv_library_DEPS
}
)
...
...
@@ -344,7 +341,6 @@ function(hip_library TARGET_NAME)
list
(
APPEND hip_library_HEADERS
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
source
}
.h
)
endif
()
endforeach
()
add_style_check_target
(
${
TARGET_NAME
}
${
hip_library_SRCS
}
${
hip_library_HEADERS
}
)
else
(
hip_library_SRCS
)
if
(
hip_library_DEPS
)
merge_static_libs
(
${
TARGET_NAME
}
${
hip_library_DEPS
}
)
...
...
go/pserver/client/c/test/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -13,4 +13,3 @@
# limitations under the License.
#
cc_test
(
test_cclient SRCS test_cclient.c DEPS paddle_pserver_cclient paddle_go_optimizer
)
add_style_check_target
(
test_cclient test_cclient.c
)
paddle/capi/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -33,9 +33,6 @@ add_library(paddle_capi STATIC ${CAPI_HEADERS} ${CAPI_PRIVATE_HEADER}
target_include_directories
(
paddle_capi PUBLIC
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_style_check_target
(
paddle_capi
${
CAPI_SOURCES
}
${
CAPI_HEADER
}
${
CAPI_PRIVATE_HEADER
}
)
add_dependencies
(
paddle_capi paddle_proto paddle_gserver
)
# TODO: paddle_capi_whole will be removed.
...
...
paddle/cuda/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -87,8 +87,3 @@ else()
endif
()
add_dependencies
(
paddle_cuda paddle_proto
${
external_project_dependencies
}
)
add_style_check_target
(
paddle_cuda
${
CUDA_SOURCES
}
${
CUDA_HEADERS
}
${
CUDA_CXX_SOURCES
}
)
paddle/function/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -52,9 +52,3 @@ add_simple_unittest(Im2ColTest)
add_simple_unittest
(
GemmConvOpTest
)
add_simple_unittest
(
DepthwiseConvOpTest
)
endif
()
add_style_check_target
(
paddle_function
${
h_files
}
)
add_style_check_target
(
paddle_function
${
cpp_files
}
)
if
(
WITH_GPU
)
add_style_check_target
(
paddle_function
${
cu_files
}
)
endif
()
paddle/gserver/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -146,8 +146,6 @@ else()
${
GSERVER_SOURCES
}
)
endif
()
add_style_check_target
(
paddle_gserver
${
GSERVER_SOURCES
}
)
add_style_check_target
(
paddle_gserver
${
GSERVER_HEADER
}
)
add_dependencies
(
paddle_gserver paddle_proto
${
external_project_dependencies
}
)
if
(
WITH_TESTING
)
add_subdirectory
(
tests
)
...
...
paddle/math/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -51,10 +51,6 @@ else()
endif
()
add_style_check_target
(
paddle_math
${
MATH_SOURCES
}
)
add_style_check_target
(
paddle_math
${
MATH_HEADERS
}
)
add_dependencies
(
paddle_math paddle_proto
${
external_project_dependencies
}
)
# depends
if
(
WITH_TESTING
)
add_subdirectory
(
tests
)
...
...
paddle/parameter/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -5,8 +5,6 @@ file(GLOB PARAMETERS_SOURCES . *.cpp)
add_library
(
paddle_parameter STATIC
${
PARAMETERS_SOURCES
}
)
add_style_check_target
(
paddle_parameter
${
PARAMETERS_SOURCES
}
)
add_style_check_target
(
paddle_parameter
${
PARAMETERS_HEADERS
}
)
add_dependencies
(
paddle_parameter paddle_proto
${
external_project_dependencies
}
)
if
(
WITH_TESTING
)
add_subdirectory
(
tests
)
...
...
paddle/pserver/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -14,9 +14,6 @@ set(NETWORK_HEADERS
add_library
(
paddle_network STATIC
${
NETWORK_SOURCES
}
)
add_style_check_target
(
paddle_network
${
NETWORK_SOURCES
}
)
add_style_check_target
(
paddle_network
${
NETWORK_HEADERS
}
)
add_dependencies
(
paddle_network paddle_proto
${
external_project_dependencies
}
)
################### paddle_pserver ######################
...
...
@@ -37,9 +34,6 @@ set(PSERVER_HEADERS
add_library
(
paddle_pserver STATIC
${
PSERVER_SOURCES
}
)
add_style_check_target
(
paddle_pserver
${
PSERVER_SOURCES
}
)
add_style_check_target
(
paddle_pserver
${
PSERVER_HEADERS
}
)
add_dependencies
(
paddle_pserver paddle_proto
${
external_project_dependencies
}
)
set
(
PSERVER_MAIN_SOURCES
...
...
paddle/scripts/docker/build.sh
浏览文件 @
ec7f1e99
...
...
@@ -48,7 +48,6 @@ function cmake_gen() {
-DWITH_PYTHON=
${
WITH_PYTHON
:-
ON
}
-DWITH_SWIG_PY=
${
WITH_SWIG_PY
:-
ON
}
-DCUDNN_ROOT=/usr/
-DWITH_STYLE_CHECK=
${
WITH_STYLE_CHECK
:-
ON
}
-DWITH_TESTING=
${
WITH_TESTING
:-
ON
}
-DWITH_FAST_BUNDLE_TEST=ON
-DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake
...
...
@@ -75,7 +74,6 @@ EOF
-DWITH_C_API
=
${
WITH_C_API
:-
OFF
}
\
-DWITH_PYTHON
=
${
WITH_PYTHON
:-
ON
}
\
-DCUDNN_ROOT
=
/usr/
\
-DWITH_STYLE_CHECK
=
${
WITH_STYLE_CHECK
:-
ON
}
\
-DWITH_TESTING
=
${
WITH_TESTING
:-
ON
}
\
-DWITH_FAST_BUNDLE_TEST
=
ON
\
-DCMAKE_MODULE_PATH
=
/opt/rocm/hip/cmake
\
...
...
@@ -125,8 +123,7 @@ EOF
-DWITH_DOC
=
ON
\
-DWITH_GPU
=
OFF
\
-DWITH_AVX
=
${
WITH_AVX
:-
ON
}
\
-DWITH_SWIG_PY
=
ON
\
-DWITH_STYLE_CHECK
=
OFF
-DWITH_SWIG_PY
=
ON
make
-j
`
nproc
`
paddle_docs paddle_apis
popd
...
...
paddle/scripts/docker/build_android.sh
浏览文件 @
ec7f1e99
...
...
@@ -47,7 +47,6 @@ if [ $ANDROID_ABI == "armeabi-v7a" ]; then
-DUSE_EIGEN_FOR_BLAS
=
ON
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
..
elif
[
$ANDROID_ABI
==
"arm64-v8a"
]
;
then
cmake
-DCMAKE_SYSTEM_NAME
=
Android
\
...
...
@@ -61,7 +60,6 @@ elif [ $ANDROID_ABI == "arm64-v8a" ]; then
-DUSE_EIGEN_FOR_BLAS
=
OFF
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
..
elif
[
$ANDROID_ABI
==
"armeabi"
]
;
then
cmake
-DCMAKE_SYSTEM_NAME
=
Android
\
...
...
@@ -74,7 +72,6 @@ elif [ $ANDROID_ABI == "armeabi" ]; then
-DCMAKE_BUILD_TYPE
=
MinSizeRel
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
..
else
echo
"Invalid ANDROID_ABI:
$ANDROID_ABI
"
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
ec7f1e99
...
...
@@ -99,7 +99,6 @@ function cmake_gen() {
-DWITH_PYTHON=
${
WITH_PYTHON
:-
ON
}
-DWITH_SWIG_PY=
${
WITH_SWIG_PY
:-
ON
}
-DCUDNN_ROOT=/usr/
-DWITH_STYLE_CHECK=
${
WITH_STYLE_CHECK
:-
ON
}
-DWITH_TESTING=
${
WITH_TESTING
:-
ON
}
-DWITH_FAST_BUNDLE_TEST=ON
-DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake
...
...
@@ -126,7 +125,6 @@ EOF
-DWITH_C_API
=
${
WITH_C_API
:-
OFF
}
\
-DWITH_PYTHON
=
${
WITH_PYTHON
:-
ON
}
\
-DCUDNN_ROOT
=
/usr/
\
-DWITH_STYLE_CHECK
=
${
WITH_STYLE_CHECK
:-
ON
}
\
-DWITH_TESTING
=
${
WITH_TESTING
:-
ON
}
\
-DWITH_FAST_BUNDLE_TEST
=
ON
\
-DCMAKE_MODULE_PATH
=
/opt/rocm/hip/cmake
\
...
...
@@ -231,7 +229,6 @@ EOF
-DUSE_EIGEN_FOR_BLAS
=
ON
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
..
elif
[
$ANDROID_ABI
==
"arm64-v8a"
]
;
then
cmake
-DCMAKE_SYSTEM_NAME
=
Android
\
...
...
@@ -245,7 +242,6 @@ EOF
-DUSE_EIGEN_FOR_BLAS
=
OFF
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
..
elif
[
$ANDROID_ABI
==
"armeabi"
]
;
then
cmake
-DCMAKE_SYSTEM_NAME
=
Android
\
...
...
@@ -258,7 +254,6 @@ EOF
-DCMAKE_BUILD_TYPE
=
MinSizeRel
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
..
else
echo
"Invalid ANDROID_ABI:
$ANDROID_ABI
"
...
...
@@ -287,7 +282,6 @@ function build_ios() {
-DUSE_EIGEN_FOR_BLAS
=
ON
\
-DWITH_TESTING
=
OFF
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
-DCMAKE_BUILD_TYPE
=
Release
make
-j
2
...
...
@@ -375,8 +369,7 @@ EOF
-DCMAKE_BUILD_TYPE
=
Release
\
-DWITH_DOC
=
ON
\
-DWITH_GPU
=
OFF
\
-DWITH_MKL
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
-DWITH_MKL
=
OFF
make
-j
`
nproc
`
paddle_docs paddle_apis
...
...
paddle/scripts/travis/build_doc.sh
浏览文件 @
ec7f1e99
...
...
@@ -6,7 +6,7 @@ mkdir -p $TRAVIS_BUILD_DIR/build
cd
$TRAVIS_BUILD_DIR
/build
# Compile Documentation only.
cmake ..
-DCMAKE_BUILD_TYPE
=
Release
-DWITH_GPU
=
OFF
-DWITH_MKL
=
OFF
-DWITH_DOC
=
ON
-DWITH_STYLE_CHECK
=
OFF
cmake ..
-DCMAKE_BUILD_TYPE
=
Release
-DWITH_GPU
=
OFF
-DWITH_MKL
=
OFF
-DWITH_DOC
=
ON
make
-j
`
nproc
`
paddle_docs paddle_apis
...
...
paddle/scripts/travis/build_ios.sh
浏览文件 @
ec7f1e99
...
...
@@ -13,7 +13,6 @@ cmake -DCMAKE_SYSTEM_NAME=iOS \
-DUSE_EIGEN_FOR_BLAS
=
ON
\
-DWITH_TESTING
=
OFF
\
-DWITH_SWIG_PY
=
OFF
\
-DWITH_STYLE_CHECK
=
OFF
\
-DCMAKE_BUILD_TYPE
=
Release
\
..
...
...
paddle/trainer/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -36,17 +36,12 @@ endif()
add_library
(
paddle_trainer_lib STATIC
${
TRAINER_SOURCES
}
)
add_style_check_target
(
paddle_trainer_lib
${
TRAINER_SOURCES
}
)
add_style_check_target
(
paddle_trainer_lib
${
TRAINER_HEADERS
}
)
add_dependencies
(
paddle_trainer_lib
paddle_proto
${
external_project_dependencies
}
)
macro
(
add_paddle_exe TARGET_NAME
)
add_executable
(
${
TARGET_NAME
}
${
ARGN
}
)
add_style_check_target
(
${
TARGET_NAME
}
${
ARGN
}
)
link_paddle_exe
(
${
TARGET_NAME
}
)
endmacro
()
...
...
paddle/utils/CMakeLists.txt
浏览文件 @
ec7f1e99
...
...
@@ -14,9 +14,6 @@ add_library(paddle_utils STATIC
${
UTIL_SOURCES
}
${
UTIL_ARCH_SOURCES
}
${
UTIL_RES
}
)
add_style_check_target
(
paddle_utils
${
UTIL_HEADERS
}
)
add_style_check_target
(
paddle_utils
${
UTIL_SOURCES
}
${
UTIL_ARCH_SOURCES
}
)
add_dependencies
(
paddle_utils paddle_proto
${
external_project_dependencies
}
)
if
(
WITH_TESTING
)
add_subdirectory
(
tests
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录