On 1/31/2012 11:00 AM, Brad King wrote:
On 1/31/2012 10:55 AM, Nicolas Desprès wrote:
All these considerations are important but maybe we could just do
first the easy path which is: add a -f option which change the default
name every where, for all sub-directories, try_compile, etc...

I'm willing to entertain patches but I really think this is a can of worms.

I still don't understand the use case.  Version control tools can
be used to fork build systems during refactoring.  If your project
permanently wants multiple options then just put this in the top of
each CMakeLists.txt:

  if(MYPROJ_ALTERNATE_CMAKE)
    include(CMakeLists.alt)
    return()
  endif()

Another option is to take advantage of CMake's capability to do
"out-of-source source".  Create a separate source tree that has
only CMakeLists.txt files in it and that has an option to get
its source files from other paths.  You can even add_subdirectory
into another source tree that is not below the current one.

-Brad
--

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

Reply via email to