[CMake] Let CMake convert CMAKE_MODULE_PATH to absolute path

Alexander Neundorf a.neundorf-work at gmx.net
Fri Sep 4 15:48:25 EDT 2009


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


More information about the CMake mailing list