-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix cmake expressions error #32815
Conversation
Thanks for your contribution! |
@@ -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>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMAKE_C_FLAGS 这个是不是在cmake阶段 还没有完全确定,所以只能用生成表达式?
There was a problem hiding this comment.
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>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
生成表达式支持输入 "${CMAKE_C_FLAGS_DEBUG}" 吗,这样可能不会被误解析为多个参数
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不支持,使用"${CMAKE_C_FLAGS_DEBUG}"
形式有一样的错误。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Describe
修复因cmake生成表达式引起的问题。