Recent Posts

Tags

News

  • A blog about Microsoft Windows development, focused on kernel-mode driver development, the Windows DDK, WDK, and related tools.

    To elaborate on the copyright notice at the bottom: all content produced by me on this site is copyright and licensed as follows:

    <!-- Creative Commons License --> Creative Commons License
    This work is licensed under a Creative Commons License. <!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> <license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-nc/2.0/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" /> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> </License> </rdf:RDF> -->

    Although I work for Positive Networks, this work is my own and is not connected with my employer in any way.

    <!-- technorati again --> <script type="text/javascript" src="http://embed.technorati.com/embed/8xz8dihr.js"> </script>

Community

Email Notifications

Other Blogs

General

Technical Resources

About Me

Archives

Kernel Mustard

Reflections on Windows System Programming
Steve Dispensa, MVP - Windows DDK

/YX Switch Is The Best Thing Ever

I guess I miss a lot of things, but in particular, Microsoft managed to sneak the /YX switch into the compiler without my noticing. Wow! I could never decide if I hated the absymally slow C++ compile times I was getting for our products or the Hell Of Pre-Compiled Header Setup And Maintenance (to quote Big Trouble In Little China, I have a lot of hells...). This newfangled /YX thingy figures out where the headers stop automatically and builds PCH files all by itself, and then next time it finds them and uses them! I'm sure that this is common knowledge, but automatic PCH generation is about the Best Thing Ever (apologies to whatevs).

Then again, Johnny Cash's American IV, now playing, is a close #2.

Comments

Steve Dispensa said:

/YX is flawed. Don't use it.

Every single project I've created or that I've seen which uses it ends up rebuilding the PCH on every single compile. You might as well not be using PCH at all.

Setting up manual PCH takes a second or two and as an added bonus, it actually works correctly too!
# March 17, 2005 1:53 PM

Steve Dispensa said:

Looks great to me - I tried it out on a few small projects and it looked like it worked. Any idea why it would just decide to not work? Anyway, I still say that keeping pch working is a pain, for any reasonable-sized, multi-developer project.

This does, of course, ignore the much more fundamental header organization principles that should be used regardless of pch.
# March 17, 2005 10:27 PM

TrackBack said:

^_~,pretty good!csharpsseeoo
# May 17, 2005 10:20 PM

TrackBack said:

/YX Switch Is The Best Thing Everooeess
# June 10, 2005 2:02 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)