No subject
Wed Apr 10 07:51:04 EDT 2013
what should be going on here was that the add_custom_command does the
required copy with correct file dependency on the source CMakeLists.txt
file for the copy, and the update_build_system step file-depends on
that OUTPUT file and creates an OUTPUT timestamp file. Then because
update_build_system was mentioned as one of the STEP_TARGETS, a custom
target would be created that file depended on that timestamp file.
To test that mental model, I do the following steps.
(1) Do a fresh configure in an initially empty build tree.
(2) build
(3) build again #no commands executed as expected
(4) touch source file
(5) build
(6) build again #commands are executed.... why?
(7) build for a third time # no commands executed, but why didn't
this happen at step 6?
Details of those steps:
1.
wine at raven> rm -rf /home/wine/newstart/build_script/build_dir/*
wine at raven> cmake ..
-- CMake version = 2.8.10.2
-- CMAKE_SYSTEM = Linux-3.2.0-4-amd64
-- EP_BASE = /home/wine/newstart/build_script/build_dir/build_projects
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/wine/newstart/build_script/build_dir
2.
wine at raven> make build_shapelib-update_build_system
Scanning dependencies of target build_shapelib-update_build_system
[ 50%] Generating build_projects/Source/build_shapelib/CMakeLists.txt
[100%] Updating build system
[100%] Built target build_shapelib-update_build_system
3.
wine at raven> make build_shapelib-update_build_system
[100%] Built target build_shapelib-update_build_system
4.
wine at raven> touch ../shapelib/CMakeLists.txt
5.
wine at raven> make build_shapelib-update_build_system
[ 50%] Generating build_projects/Source/build_shapelib/CMakeLists.txt
[100%] Updating build system
[100%] Built target build_shapelib-update_build_system
6.
wine at raven> make build_shapelib-update_build_system
[ 50%] Updating build system
[100%] Built target build_shapelib-update_build_system
7.
wine at raven> make build_shapelib-update_build_system
[100%] Built target build_shapelib-update_build_system
Why do two build steps (6 and 7) have to be done to satisfy the file
depends after the touch? I must be doing something wrong with the
file depends above, but I cannot see what it is.
This is a simple example of a more important issue where the
complete build shows the same behaviour. After the touch,
the first make does a complete rebuild, but then so does
the second. And it is only the third that shows no build activity.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list