1 Star 0 Fork 450

刘永/Paddle

forked from PaddlePaddle/Paddle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
co63oc 提交于 2024-02-01 10:41 . Fix pruns prunes (#61383)
set(PYTHON_TESTS_DIR
${PADDLE_BINARY_DIR}/python/paddle/base/tests
CACHE INTERNAL "python tests directory")
add_subdirectory(utils)
add_subdirectory(common)
add_subdirectory(pir)
add_subdirectory(scripts)
add_subdirectory(testing)
add_subdirectory(phi)
add_subdirectory(fluid)
# NOTE(zhiqiu): The changes of cc tests
# Before, (1) the source file of cc tests are distributed in different sub-directories,
# (2) the tests are added and configured by calling `cc_test()` in each `CMakeLists.txt`,
# (3) the tests links static libraries of paddle modules,
# (4) the tests binaries are generated in different directories, as the same as the
# folder of source file.
# Now, we want to make all cc tests dynamically linked to the main paddle library,
# i.e., `libpaddle.so`, so we changes the logic of (2), (3), (4):
# (2) calling `cc_test()` in each `CMakeLists.txt` will not `exactly` add test, but
# record all tests and its source files, the action of add tests is defered to HERE.
# Why doing so? since the target of `libpaddle.so` is mostly the last target, and
# the tests should be added after that according to dependency.
# (3) the tests links dynamic libraries, `libpaddle.so`
# (4) the tests are generated to the same directory, i.e., `CC_TESTS_DIR` defined above.
# Next, (to be discussed)
# (1) move all source files to same folder,
# (2) naturally, and configure tests in only one `CMakeLists.txt`,
# (3) cc tests support linking pre-built dynamic libraries. For example, use the dynamic
# library in the installed paddle by `pip`.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/liu-yong-123/Paddle.git
[email protected]:liu-yong-123/Paddle.git
liu-yong-123
Paddle
Paddle
develop

搜索帮助