[cmake-developers] [CMake 0011928]: Wrong percentage value with Makefile generator.
Mantis Bug Tracker
mantis at public.kitware.com
Fri Mar 4 12:00:07 EST 2011
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=11928
======================================================================
Reported By: Nicolas Despres
Assigned To:
======================================================================
Project: CMake
Issue ID: 11928
Category: CMake
Reproducibility: always
Severity: minor
Priority: low
Status: new
======================================================================
Date Submitted: 2011-03-04 12:00 EST
Last Modified: 2011-03-04 12:00 EST
======================================================================
Summary: Wrong percentage value with Makefile generator.
Description:
It seems that the Makefile generator does not count custom commands but only
targets. I would have expect that it counts both.
Steps to Reproduce:
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8.4)
project(cmake_wrong_percentage)
# Generate input files.
foreach(i RANGE 1 10)
file(WRITE "${PROJECT_SOURCE_DIR}/file${i}" "content ${i}")
endforeach(i)
# Add one custom command for each input file.
set(OUTPUT_FILES "")
foreach(i RANGE 1 10)
set(input "file${i}")
set(output "${PROJECT_BINARY_DIR}/${input}.out")
add_custom_command(
OUTPUT ${output}
COMMAND ${CMAKE_COMMAND} -E copy "${input}" "${output}"
DEPENDS ${input}
COMMENT "Copying ${output}"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
VERBATIM
)
list(APPEND OUTPUT_FILES "${output}")
endforeach(i)
# Add the target that trigger the custom commands.
add_custom_target(copy
DEPENDS ${OUTPUT_FILES}
)
$ mkdir _build
$ cd _build
$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/despre_n/src/test/cmake-wrong-percentage/_build
$ make copy
Scanning dependencies of target copy
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file1.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file2.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file3.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file4.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file5.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file6.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file7.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file8.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file9.out
[ 0%] Copying /home/despre_n/src/test/cmake-wrong-percentage/_build/file10.out
[100%] Built target copy
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-03-04 12:00 Nicolas DespresNew Issue
======================================================================
More information about the cmake-developers
mailing list