[CMake] [PATCh] Precompiled headers support for VC++ 7.x generator

David Cole david.cole at kitware.com
Mon Jul 10 11:06:03 EDT 2006


To implement this properly across the board, we should allow an 
arbitrary string as the name of the precompiled header file. ("stdafx.h" 
is default, but a developer should be able to have a "myproject.h" 
header, i.e. - don't force me to use a "stdafx.h")

Also, we should support it in as many generators as possible. (DevStudio 
6, NMake, Xcode)

speedy wrote:

>Hello Cmake crew,
>
>      attached to the email is the patch for VC++ 7.x generator which
>      adds proper(?) support for precompiled headers to generated
>      .vcproj files.
>
>      Usage is pretty straightforward:
>      
># Create a library called "Hello" which includes the source file "hello.cxx".
># The extension is already found.  Any number of sources could be listed here.
>add_library (Hello hello.cxx hello.h stdafx.cpp stdafx.h)
>
>SET_TARGET_PROPERTIES(Hello PROPERTIES COMPILE_FLAGS "/Yu")
>
>SET_SOURCE_FILES_PROPERTIES(stdafx.cpp COMPILE_FLAGS "/Yc")
>
>      All comments and corrections are welcome. :)
>      
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list