Re: Let CMake convert CMAKE_MODULE_PATH to absolute path

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Let CMake convert CMAKE_MODULE_PATH to absolute path

Marcel Loose
On Fri, 2009-09-04 at 21:48 +0200, Alexander Neundorf wrote:

> On Tuesday 25 August 2009, Marcel Loose wrote:
> > Hi all,
> >
> > I've been bitten by this more than once. When specifying a module path
> > on the command line, you must not forget to make this an absolute path,
> > otherwise calling a macro from a (CMakeLists.txt file in a) subdirectory
> > will fail.
> >
> > Would it be an idea to let CMake always convert a relative module path
> > to an absolute path, before putting it in the cache?
>
> Hmm, that would be special handling for that one variable.
> I guess it should be interpreted as relative to CMAKE_BINARY_DIR ? Wouldn't it
> be confusing if this one variable would be handled differently than all
> others ?
>
> Alex

Well, I don't know how many variables might be affected by this. Maybe
it's breaking more things that it's supposed to fix. I was just
wondering, because I ran into this problem more than once. Besides, you
do not have to specify the absolute path to the CMakeLists.txt file
you're feeding to cmake (I agree, though, that that's not exactly the
same thing.)

Best regards,
Marcel Loose.




_______________________________________________
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