[CMake] Issues with CMakeOutput.log and CMakeError.log

Bill Lorensen bill.lorensen at gmail.com
Sun Feb 17 14:46:06 EST 2008


Most CMake projects use TRY_COMPILE and CMake macros to test for include
files, flags, capabilities of the compiler etc. The CMake/Modules macros
append the output of these commands to
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log. The location of
these files is by convention.

1) The CMake/Module/CheckIncludeFiles.cmake stores its output in :
Note the duplicate use of  ${CMAKE_FILES_DIRECTORY}. Is this a bug?

2) ITK and Slicer3 (and I suspect other cmake projects)  do not remove these
two files. Consequently, these two files grow over time since the output is
APPENDed. Certainly if a project cleans its ${CMAKE_BINARY_DIR} before each
build, then this is not a problem. But in ITK and Slicer3, many of our
builds are not cleaned routinely. I looked at a couple of my nightly and
continuous builds and they had very large log files. I have modified the ITK
CMakeLists.txt to remove the CMakeOutput.log and CMakeError.log files.

3) That brings me to a project-specific issue. I noticed that ITK sometimes
APPENDs the output to ${CMAKE_BINARY_DIR}/CMakeOutput.log and other times to
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log. So, we have to
REMOVE both files. That's when I discovered the 3rd location used in

#1 seems like a bug, #2 is FYI and #3 is the motivation for the questions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080217/9920a497/attachment.html

More information about the CMake mailing list