MantisBT - CMake
View Issue Details
0003512CMakeCMakepublic2006-07-13 16:582007-03-12 12:35
Peter Kahn 
Brad King 
normalminoralways
closedfixed 
 
 
0003512: Cannot Specify Precompiled Header Settings for VS.Net 2003
1. /Yc /YX /Yu CMAKE_CXX_FLAGS should turn into "UsePrecompiledHeader" settings in VS.Net 2003 xml.

2. "PrecompiledHeaderFile" should be setup with pch file output

3. User should be able to specify the "PrecompiledHeaderThrough" setting

FYI, I have a fix for 1 and 2, but haven't yet figured out how to setup 3. I also don't yet know how to register so I can get my code in. I have attached the source file.
No tags attached.
cxx cmLocalVisualStudio7Generator.cxx (52,521) 1969-12-31 19:00
https://public.kitware.com/Bug/file/574/cmLocalVisualStudio7Generator.cxx
diff pch.diff (11,414) 1969-12-31 19:00
https://public.kitware.com/Bug/file/773/pch.diff
Issue History

Notes
(0005565)
Brad King   
2006-10-26 16:40   
The following options also need to be mapped (addresses 0000002 and 0000003):

  PrecompiledHeaderThrough <==> /Yc[name] or /YX[name] or Yu[name]
  PrecompiledHeaderFile <==> /Fp[name]

Some slightly less trivial code will be needed in the generator to identify and parse these flags.
(0005566)
Brad King   
2006-10-26 16:42   
Bug 0001260 requests a more generic interface for precompiled headers. That is a separate feature which we do plan to add (though not with the interface requested in the bug).

This bug asks for support in the VS IDE generators to do low-level control of PCH features.
(0005935)
Malte Clasen   
2006-12-09 19:08   
The patch "pch.diff" (cmake 2.4.5) addresses all three issues. It doesn't seem to fit to the CMake coding guidelines, but it does the job. Perhaps someone more familiar with CMake could have a look at it?
(0005937)
Brad King   
2006-12-11 09:51   
Actually full-fledged PCH support for all platforms is an upcoming feature sometime in the next year. That support will address this issue also.
(0006304)
Brad King   
2007-02-01 11:49   
The following changes are an incremental step for fixing the PCH flag mapping:

/cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v <-- cmSystemTools.cxx
new revision: 1.334; previous revision: 1.333
/cvsroot/CMake/CMake/Source/cmSystemTools.h,v <-- cmSystemTools.h
new revision: 1.135; previous revision: 1.134
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v <-- cmLocalVisualStudio7Generator.cxx
new revision: 1.161; previous revision: 1.160
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.h,v <-- cmLocalVisualStudio7Generator.h
new revision: 1.31; previous revision: 1.30
(0006310)
Brad King   
2007-02-01 15:03   
The change below allows full mapping of all PCH related flags requested by this bug report.

/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v <-- cmLocalVisualStudio7Generator.cxx
new revision: 1.164; previous revision: 1.163
(0006345)
Brad King   
2007-02-05 11:44   
Since the specific problem reported here has been fixed I'm closing this entry. The fix will be included in CMake 2.4.7.
(0006720)
Brad King   
2007-03-12 12:35   
The following changes create a separate flag mapping for VS7 and VS8 since the IDEs seem to use different XML attribute values for the same flags.

/cvsroot/CMake/CMake/Source/cmGlobalVisualStudio71Generator.cxx,v <-- cmGlobalVisualStudio71Generator.cxx
new revision: 1.37; previous revision: 1.36
/cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v <-- cmGlobalVisualStudio7Generator.cxx
new revision: 1.81; previous revision: 1.80
/cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.h,v <-- cmGlobalVisualStudio7Generator.h
new revision: 1.41; previous revision: 1.40
/cvsroot/CMake/CMake/Source/cmGlobalVisualStudio8Generator.cxx,v <-- cmGlobalVisualStudio8Generator.cxx
new revision: 1.17; previous revision: 1.16
/cvsroot/CMake/CMake/Source/cmGlobalVisualStudio8Generator.h,v <-- cmGlobalVisualStudio8Generator.h
new revision: 1.9; previous revision: 1.8
/cvsroot/CMake/CMake/Source/cmGlobalVisualStudio8Win64Generator.cxx,v <-- cmGlobalVisualStudio8Win64Generator.cxx
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v <-- cmLocalVisualStudio7Generator.cxx
new revision: 1.179; previous revision: 1.178
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.h,v <-- cmLocalVisualStudio7Generator.h
new revision: 1.36; previous revision: 1.35
/cvsroot/CMake/CMake/Tests/PrecompiledHeader/CMakeLists.txt,v <-- CMakeLists.txt
new revision: 1.2; previous revision: 1.1