[CMake] CMAKE_MODULE_PATH not remembered?

Matthew Woehlke mw_triad at users.sourceforge.net
Thu Aug 23 17:29:03 EDT 2007


If I set up a build dir with 'cmake -DCMAKE_MODULE_PATH=<somwehere> 
<path-to-src>', I find that 'make' in the build dir, when cmake needs to 
be re-run (IIRC 'cmake .' has the same problem) will then fail because 
it cannot find a module I INCLUDE().

I was able to work around the problem with the following snippet:

if(CMAKE_MODULE_PATH)
     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} CACHE PATH "")
endif(CMAKE_MODULE_PATH)

Is there a reason why this is necessary? I would have thought that 
anything fed to the initial cmake invocation is always cached?

-- 
Matthew
.rorrim a ot pu rotinom ruoy dloh ,egassem siht daer oT



More information about the CMake mailing list