Notes |
|
(0026946)
|
David Cole
|
2011-06-22 08:15
|
|
I'm not sure I understand your confusion... All CMake commands are 'cmake' level commands.
Can you give me an example of what you mean by a 'make' level command? |
|
|
(0026948)
|
Tim Cera
|
2011-06-22 08:32
|
|
See the following e-mail:
http://www.cmake.org/pipermail/cmake/2010-September/039927.html [^]
The file() functions only run if you regenerate the files for your build environment using 'cmake' or regeneration is triggered by editing CMakeLists.txt.
Everything worked fine the first time I ran 'make' if I edited the CMakeLists.txt file which triggers a regeneration of the build files. The second time I ran 'make' (or 'make install') it wouldn't work.
I expected file() functions to run EVERY time I ran 'make' - not just after editing CMakeLists.txt.
If file() is the only command affected - just a note in the documentation would be great. If several commands are like this, then I suggest making a separate section.
Kindest regards,
Tim |
|
|
(0026949)
|
David Cole
|
2011-06-22 08:43
|
|
All cmake commands are "cmake level" commands when they are used in the context of a CMakeLists.txt file. They will only run when cmake is run to configure the project, or when cmake is re-run as part of a make because a CMakeLists.txt file changed.
If you write a cmake script, and invoke it via "cmake -P script.cmake" as an add_custom_command build step, then that script will run at build time whenever its inputs change. If you do this, then the script will run at build time.
The file command needs nothing special in the documentation: all CMake commands are like this. |
|
|
(0026950)
|
Tim Cera
|
2011-06-22 09:02
|
|
I am still learning 'cmake', but I think there is a difference between file() and most (maybe all) other functions.
For example add_custom_command() creates some feature in the build system that does something during the build. The file() command does not. |
|
|
(0026951)
|
David Cole
|
2011-06-22 09:40
|
|
A discussion in the bug tracker is not really the ideal way to learn CMake.
Perhaps more questions on the mailing list would be in order. There, you have thousands of people who might be able to help you out.
Here you have me telling you that all CMake commands are the same and file does not need any special documentation.
add_custom_command and add_custom_target (and add_library and add_executable) are the "special" commands that cause something to happen at build time. I believe those commands are documented appropriately.
Please take this to the mailing list so you have an audience larger than 1. Thanks. |
|
|
(0027008)
|
David Cole
|
2011-07-05 10:41
|
|
If you would still like to re-open this issue, please clarify exactly what you would like to see as a bug fix. I'm not sure I understand what sort of fix you're looking for to this issue. |
|
|
(0028096)
|
David Cole
|
2012-01-02 15:56
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|