Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cmake expressions error #32815

Merged
merged 1 commit into from
May 11, 2021

Conversation

Avin0323
Copy link
Contributor

@Avin0323 Avin0323 commented May 10, 2021

PR types

Others

PR changes

Others

Describe

修复因cmake生成表达式引起的问题。

image

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -78,6 +78,21 @@ if(WITH_ASCEND OR WITH_ASCEND_CL)
-DCMAKE_INSTALL_PREFIX:PATH=${WARPCTC_INSTALL_DIR}
)
else()
if(WIN32)
set(WARPCTC_C_FLAGS $<FILTER:${CMAKE_C_FLAGS},EXCLUDE,/Zc:inline>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_C_FLAGS 这个是不是在cmake阶段 还没有完全确定,所以只能用生成表达式?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_C_FLAGS已经确定了,生成表达式用于该场景比较简单易用所以采用这种方式。

@@ -78,6 +78,21 @@ if(WITH_ASCEND OR WITH_ASCEND_CL)
-DCMAKE_INSTALL_PREFIX:PATH=${WARPCTC_INSTALL_DIR}
)
else()
if(WIN32)
set(WARPCTC_C_FLAGS $<FILTER:${CMAKE_C_FLAGS},EXCLUDE,/Zc:inline>)
set(WARPCTC_C_FLAGS_DEBUG $<FILTER:${CMAKE_C_FLAGS_DEBUG},EXCLUDE,/Zc:inline>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

生成表达式支持输入 "${CMAKE_C_FLAGS_DEBUG}" 吗,这样可能不会被误解析为多个参数

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不支持,使用"${CMAKE_C_FLAGS_DEBUG}"形式有一样的错误。

Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 84eca16 into PaddlePaddle:develop May 11, 2021
@Avin0323 Avin0323 deleted the fix-cmake-expressions branch May 12, 2021 07:53
@Avin0323 Avin0323 restored the fix-cmake-expressions branch June 17, 2021 03:31
lanxianghit pushed a commit that referenced this pull request Jun 18, 2021
@Avin0323 Avin0323 deleted the fix-cmake-expressions branch June 22, 2021 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants