[CMake] Infinite checks for CMakeCache.txt

Nils H.Busch nilsb at mail.cns.mpg.de
Tue Dec 21 08:25:40 EST 2004


 billlist at nycap.rr.com wrote:
> Most of the time this is caused by CMake writing one of its input files
and not using a copy on different.  If you look in the Makefiles you will
see a CMAKE_MAKEFILE_SOURCES, check to see if your CMakeLists files are
writing any of those input files.

Thanks. That is indeed the case.

In my top-level CMakeLists.txt, I run a FIND_PACKAGE(xxx) for my
third-party package, which in turn parses the respective third-party
config	 file and transforms the variable value pairs into CMake variables
and values and writes them into a file.

The question is now, how can  I write this file from CMakeLists without
causing this error. I tried moving accessing the written variables into
sub directory CMakeLists.txt, copying the written file to another one via
CONFIGURE_FILE and using that file, but the error remains.

Maybe, there is an altogether different approach to extracting variables
and their values from other projects' makefiles, more CMake compliant.
I guess to solve my specific problem, it would need to do some pattern
matching and replacing to adjust the way variables are set and accessed.
Right now, I use a little perl script that does the pattern matching run
from the above Findxxx.cmake and write the found variable,value pairs in
CMake notation to file there.

Any suggestions appreciated.

--
  Nils H. Busch 




More information about the CMake mailing list