Brad King wrote: >> Yes, versioning is a good idea to think about. >> >>write_compiler_detection_header( >>FILE ${CMAKE_CURRENT_BINARY_DIR}/grantlee_compiler_detection.h >>PREFIX Grantlee_ >>VERSION 3 >>) > > This could help somewhat because we could change what is produced > by a newer version while still knowing how to generate the old > version. The version argument must be required.
Ok, I see what you mean. Another option would be not to have the VERSION in the signature, but always use CMAKE_MINIMUM_VERSION_REQUIRED to determine what to generate. The content generated depends only on the features of the cmake binary being run, so it relieves users of the need to additionally maintain the VERSION here and figure out how that maps to their minimum cmake version. > > Rather than a single versioned header we should also consider > asking the caller to list the information and features needed. > That way a project can expose a header without more information > than they want to support. Yes, good idea. Thanks, Steve. -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers