#208 CC task doesn't pick up precompiled header

open
Curt Arnold
cpptasks (103)
8
2007-05-16
2007-05-16
Caleb Cittadino
No

If you set the name of the compiler to "vc6" then the prototype file listed in a precompile tag gets picked up. However, if you set the name of the compiler to "gcc" the prototype is not picked up. For example, the below will not result in the file stdafx.cpp being picked up:

<target name="BuildSource" depends="init">
<cc
debug = "false"
multithreaded = "false"
name = "gcc"
objdir = "build/objdir"
outfile = "build/XDrawServicesTest"
outtype = "executable"
subsystem="console"
>
<linker name="g++" />
<precompile
prototype="/Users/calebcittadino/P4Workspaces/Core/Libraries/XDrawServices/TestBed/TestApp/src/stdafx.cpp">
<except>
<fileset dir="../../../../Common/Constructs/Logging" includes="Log.cpp"/>
</except>
</precompile>
...

while the below does work:

<target name="BuildSource" depends="init">
<cc
debug = "false"
multithreaded = "false"
name = "vc6"
objdir = "build/objdir"
outfile = "build/XDrawServicesTest"
outtype = "executable"
subsystem="console"
>
<linker name="g++" />
<precompile
prototype="/Users/calebcittadino/P4Workspaces/Core/Libraries/XDrawServices/TestBed/TestApp/src/stdafx.cpp">
<except>
<fileset dir="../../../../Common/Constructs/Logging" includes="Log.cpp"/>
</except>
</precompile>
...

Discussion

    • priority: 5 --> 8