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
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to