-
-
Notifications
You must be signed in to change notification settings - Fork 803
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
在项目中使一些源文件不使用预编译头 #5960
Comments
Title: Make some source files in the project not use precompiled headers In what scenario do you need this function?Generally, all source files in a project will use the compiled header, but some source files do not want to be used. In VS, you can design a cpp independently without using the compiled header. I saw that xmake can set the compilation options of a single file, but I don’t know what the compilation options are without using precompiled headers, and I didn’t find any by searching the issues and communities. Describe possible solutionsCMAKE seems to be done by using SKIP_PRECOMPILE_HEADERS attached to the cpp attachment. Describe your alternativesAdd a command add_skip_pch_sources()? Other informationNo response |
/Y- 可禁用 |
/Y- can be disabled |
add_files("xxx.cpp",{cxxflags="/Y-"}),没有效果 |
add_files("xxx.cpp",{cxxflags="/Y-"}), has no effect |
你在什么场景下需要该功能?
一般项目所有源文件都会用到编译头,然而有个别源文件不想使用。在vs中,独立选中某个cpp可以设计不使用编译头。xmake我看到可以设置单个文件的编译选项,但我不知道不使用预编译头的编译选项是什么,搜索议题与社区也未发现有。
描述可能的解决方案
CMAKE中似乎是使用SKIP_PRECOMPILE_HEADERS附加到cpp附属来做的。
描述你认为的候选方案
加个命令add_skip_pch_sources()?
其他信息
No response
The text was updated successfully, but these errors were encountered: