Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
b4ccae75
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2305
Star
20932
Fork
5423
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b4ccae75
编写于
1月 21, 2019
作者:
T
Tao Luo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove legacy target in cmake/util.cmake
上级
e000d17a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
115 deletion
+0
-115
cmake/util.cmake
cmake/util.cmake
+0
-115
未找到文件。
cmake/util.cmake
浏览文件 @
b4ccae75
...
...
@@ -53,118 +53,3 @@ function(target_circle_link_libraries TARGET_NAME)
"-Wl,--end-group"
)
endif
()
endfunction
()
# compile_cu_as_cpp
# Make a cu file compiled as C++
# Arguments: Source files
macro
(
compile_cu_as_cpp
)
foreach
(
s
${
ARGN
}
)
set_source_files_properties
(
${
s
}
PROPERTIES LANGUAGE CXX
)
set_source_files_properties
(
${
s
}
PROPERTIES COMPILE_FLAGS
"-x c++"
)
endforeach
()
endmacro
()
# link_paddle_exe
# add paddle library for a paddle executable, such as trainer, pserver.
#
# It will handle WITH_PYTHON etc.
function
(
link_paddle_exe TARGET_NAME
)
if
(
WITH_RDMA
)
generate_rdma_links
()
endif
()
if
(
MOBILE_INFERENCE
)
target_circle_link_libraries
(
${
TARGET_NAME
}
ARCHIVE_START
paddle_gserver
paddle_function
ARCHIVE_END
paddle_math
paddle_utils
paddle_parameter
paddle_proto
paddle_cuda
${
EXTERNAL_LIBS
}
${
CMAKE_THREAD_LIBS_INIT
}
${
CMAKE_DL_LIBS
}
${
RDMA_LD_FLAGS
}
${
RDMA_LIBS
}
)
else
()
target_circle_link_libraries
(
${
TARGET_NAME
}
ARCHIVE_START
paddle_gserver
paddle_function
ARCHIVE_END
paddle_pserver
paddle_trainer_lib
paddle_network
paddle_math
paddle_utils
paddle_parameter
paddle_proto
paddle_cuda
paddle_optimizer
${
EXTERNAL_LIBS
}
${
CMAKE_THREAD_LIBS_INIT
}
${
CMAKE_DL_LIBS
}
${
RDMA_LD_FLAGS
}
${
RDMA_LIBS
}
)
endif
()
if
(
ANDROID
)
target_link_libraries
(
${
TARGET_NAME
}
log
)
endif
(
ANDROID
)
if
(
WITH_MKLML AND MKLML_LIB_DIR AND MKLML_IOMP_LIB
)
target_link_libraries
(
${
TARGET_NAME
}
"-L
${
MKLML_LIB_DIR
}
-liomp5 -Wl,--as-needed"
)
endif
()
add_dependencies
(
${
TARGET_NAME
}
${
external_project_dependencies
}
)
endfunction
()
# link_paddle_test
# Link a paddle unittest for target
# TARGET_NAME: the unittest target name
# Rest Arguemnts: not used.
function
(
link_paddle_test TARGET_NAME
)
link_paddle_exe
(
${
TARGET_NAME
}
)
target_link_libraries
(
${
TARGET_NAME
}
paddle_test_main
paddle_test_util
${
GTEST_LIBRARIES
}
)
endfunction
()
# add_unittest_without_exec
#
# create a paddle unittest. not specifically define how to run this unittest.
# TARGET_NAME: the unittest target name, same as executable file name
# Rest Arguments: the source files to compile this unittest.
macro
(
add_unittest_without_exec TARGET_NAME
)
add_executable
(
${
TARGET_NAME
}
${
ARGN
}
)
link_paddle_test
(
${
TARGET_NAME
}
)
endmacro
()
# add_unittest
# create a paddle unittest and just to execute this binary to make unittest.
#
# TARGET_NAME: the unittest target name, same as executable file name
# Rest Arguments: the source files to compile this unittest.
macro
(
add_unittest TARGET_NAME
)
add_unittest_without_exec
(
${
TARGET_NAME
}
${
ARGN
}
)
add_test
(
${
TARGET_NAME
}
${
TARGET_NAME
}
)
endmacro
()
# add_simple_unittest
# create a paddle unittest with file name. It just compile ${TARGET_NAME}.cpp to
# ${TARGET_NAME} and then execute it.
macro
(
add_simple_unittest TARGET_NAME
)
add_unittest
(
${
TARGET_NAME
}
${
TARGET_NAME
}
.cpp
)
endmacro
()
# Creates C resources file from files in given resource file
function
(
create_resources res_file output_file
)
add_custom_command
(
OUTPUT
${
output_file
}
COMMAND python ARGS
${
PADDLE_SOURCE_DIR
}
/cmake/make_resource.py
${
res_file
}
${
output_file
}
DEPENDS
${
res_file
}
${
PADDLE_SOURCE_DIR
}
/cmake/make_resource.py
)
endfunction
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录