View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012441 | CMake | CMake | public | 2011-09-01 23:35 | 2012-07-09 06:52 | ||||
Reporter | vastevaste | ||||||||
Assigned To | David Cole | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | CMake 2.8.7 | Fixed in Version | CMake 2.8.7 | ||||||
Summary | 0012441: No progress reporting for add_custom_command | ||||||||
Description | Progress reporting doesn't seem to work for individual rules added by add_custom_commands. Progress isn't updated until the add_custom_target-target is built. Is this intentional? I get this: $ make [ 0%] Generating test1.txt [ 0%] Generating test2.txt [ 0%] Generating test3.txt [ 0%] Generating test4.txt [ 0%] Generating test5.txt [ 0%] Generating test6.txt [100%] Built target test But I expected this: $ echo include CMakeFiles/test.dir/progress.make >> CMakeFiles/test.dir/build.make $ make clean && make [ 16%] Generating test1.txt [ 33%] Generating test2.txt [ 50%] Generating test3.txt [ 66%] Generating test4.txt [ 83%] Generating test5.txt [100%] Generating test6.txt [100%] Built target test | ||||||||
Additional Information | The generated build file looks like this: test1.txt: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_1) @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating test1.txt" touch test1.txt But VERBOSE=1 shows this (without $(CMAKE_PROGRESS_1)): /home/vaste/src/cmake-2.8.5/build/bin/cmake -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles [ 0%] Generating test1.txt touch test1.txt If I manually include progress.make in build.make it seems to work. Like this: $ echo include CMakeFiles/test.dir/progress.make >> CMakeFiles/test.dir/build.make $ make clean && make | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeLists.txt [^] (423 bytes) 2011-09-01 23:35 [Show Content]
fix_custom_target_progress.patch [^] (1,682 bytes) 2011-09-13 05:51 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0027318) vastevaste (reporter) 2011-09-01 23:38 edited on: 2011-09-01 23:39 |
Build attached CMakeLists.txt to try. CMake 2.5 seems to have the same behavior. # make # echo include CMakeFiles/test.dir/progress.make >> CMakeFiles/test.dir/build.make # make clean && make cmake_minimum_required(VERSION 2.8) project(test) macro(addtests) foreach(x ${ARGN}) add_custom_command(OUTPUT ${x} COMMAND touch ${x}) endforeach(x) endmacro(addtests) set(files test1.txt test2.txt test3.txt test4.txt test5.txt test6.txt) addtests(${files}) add_custom_target(test ALL DEPENDS ${files}) |
(0027411) vastevaste (reporter) 2011-09-12 23:13 |
It seems to be a problem with add_custom_target. I tried adding a c++ target tutorial.cxx by changing: add_custom_target(test ALL DEPENDS ${files}) to: add_executable(Tut tutorial.cxx ${files}) This then gives: $ grep -R progress . ./CMakeFiles/Tut.dir/build.make:# Include the progress variables for this target. ./CMakeFiles/Tut.dir/build.make:include CMakeFiles/Tut.dir/progress.make ./CMakeFiles/Tut.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_1) ./CMakeFiles/Tut.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_2) ./CMakeFiles/Tut.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_3) ./CMakeFiles/Tut.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_4) ./CMakeFiles/Tut.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_5) ./CMakeFiles/Tut.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_6) ./CMakeFiles/Tut.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_7) However, if I have: add_custom_target(test ALL DEPENDS ${files}) instead, I only get the following: $ grep -R progress . ./CMakeFiles/test.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_1) ./CMakeFiles/test.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_2) ./CMakeFiles/test.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_3) ./CMakeFiles/test.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_4) ./CMakeFiles/test.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_5) ./CMakeFiles/test.dir/build.make: $(CMAKE_COMMAND) -E cmake_progress_report /home/vaste/src/cmaketest/build/CMakeFiles $(CMAKE_PROGRESS_6) Notice how there's no include directive. |
(0027413) vastevaste (reporter) 2011-09-13 05:53 |
Added an (admittedly ugly) patch that fixes it for me. |
(0027980) David Cole (manager) 2011-12-13 20:34 |
Fix pushed to 'next': http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ab1162eaa1490be745f2b2a24ba7b4a3ec69112 [^] |
(0029973) David Cole (manager) 2012-07-09 06:52 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-09-01 23:35 | vastevaste | New Issue | |
2011-09-01 23:35 | vastevaste | File Added: CMakeLists.txt | |
2011-09-01 23:38 | vastevaste | Note Added: 0027318 | |
2011-09-01 23:38 | vastevaste | Note Added: 0027319 | |
2011-09-01 23:39 | vastevaste | Note Edited: 0027318 | |
2011-09-01 23:39 | vastevaste | Note Deleted: 0027319 | |
2011-09-12 23:13 | vastevaste | Note Added: 0027411 | |
2011-09-13 05:51 | vastevaste | File Added: fix_custom_target_progress.patch | |
2011-09-13 05:53 | vastevaste | Note Added: 0027413 | |
2011-10-28 12:25 | David Cole | Target Version | => CMake 2.8.7 |
2011-12-13 19:38 | David Cole | Assigned To | => David Cole |
2011-12-13 19:38 | David Cole | Status | new => assigned |
2011-12-13 20:34 | David Cole | Note Added: 0027980 | |
2011-12-13 20:34 | David Cole | Status | assigned => resolved |
2011-12-13 20:34 | David Cole | Resolution | open => fixed |
2011-12-16 17:16 | David Cole | Fixed in Version | => CMake 2.8.7 |
2012-07-09 06:52 | David Cole | Note Added: 0029973 | |
2012-07-09 06:52 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |