栗子現場直播 千篇一栗
有很多簡單的道理,若不是被遺忘,不是察覺不到,就是知易行難。

2008年11月19日 星期三

/Gm?

The compiler stores dependency information between source files and class definitions in the project's .idb file during the first compile. (Dependency information tells which source file is dependent on which class definition, and which .h file the definition is located in.) Subsequent compiles use the information stored in the .idb file to determine whether a source file needs to be compiled, even if it includes a modified .h file.
Minimal rebuild relies on class definitions not changing between include files. Class definitions must be global for a project (there should be only one definition of a given class), because the dependency information in the .idb file is created for the entire project. If you have more than one definition for a class in your project, disable minimal rebuild.
  好心寒,真的好心寒。 MS 用 class definition 去做重新 compile 的判定,是不是太轉彎抹角?

Ref: /Gm (Enable Minimal Rebuild) (C++)

沒有留言: