On Tue, Mar 31, 2009 at 9:45 AM, Bill Hoffman <bill.hoff...@kitware.com>wrote:
> James Bigler wrote: > > >> >> If this feature comes to fruition, I would like the ability to specify >> which flags make it into what header. In one project I worked on all our >> configuration defines were in a single header. This caused extremely long >> recompiles if something happened to change the one autoheader. We >> eventually broke it into multiple files, and got targeted recompiles. >> >> I also like the idea of not having to have a configure.h.in < >> http://configure.h.in> file like Hendrik Sattler suggested (put these >> variables in this header here). >> >> Do you have an API suggestion? What should this look like? > > -Bill > > Why not something similar to what you proposed, but without the intermediate configure.h.in step and being able to specify comments and perhaps custom strings. You could also specify things multiple kinds and they all just get inserted one after the other. CMake could generate the .in file and use configure_file in the background. The point is that you don't have to maintain two files. set(VARS HAS_A HAS_B HAS_C) set(STRING_VARS STRING_A STRING_B) cmake_autoheader( CMAKEDEFINE_VARS ${VARS} STRING_VARS ${STRING_VARS} CUSTOM_VAR "#define \"I like @my_...@\" COMMENT "Here's a comment" CMAKEDEFINE_VARS "SOME_OTHER_VAR;AND_ANOTHER;" HEADER ${CMAKE_BINARY_DIR}/include/config.h )
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake