Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Per file compile flags
Re: Per file compile flags [message #39133 is a reply to message #39132] Mon, 18 February 2013 07:28 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

rxantos wrote on Mon, 18 February 2013 03:48

How do I add a different compile flag to just one file inside a project?

I'm using MSVC.

Specifically I want to be able to use pre-compiled headers and it requires one file to have the flags to create the pre-compiled headers, while the rest have the flags to just use the pre-compiled headers.




Hi,

The precompiled headers are AFAIK not supported in TheIDE. You can in theory use a custom build step for this. Just create a dummy file, with some distinct extension (anything goes, eg. cppforheaders Smile ) and make it include the headers to be precompiled. Then you can set the the 'cl.exe -Yc"header.pch" ... ' command as a custom build step (see this page for details) for files with your special extension (you can do this in Poject -> Custom build steps). The other files can then get the -Yu parameter by adding it as an additional compiler option to your package in Package manager.

Disclaimer: I never used precompiled headers nor MSVC, so I might be partially all completely wrong Wink

Best regards,
Honza
 
Read Message
Read Message
Read Message
Previous Topic: Is there any trick to reduce the executable even further?
Next Topic: How to create a U++ based DLL?
Goto Forum:
  


Current Time: Sun Aug 24 14:29:45 CEST 2025

Total time taken to generate the page: 0.06954 seconds